07-16-2013 04:29 PM
I have designed a content view in my nuxeo studio and I want to define an event to refresh it when I create a document in another custom view, the created document only is showed in my content view when I do click the content view refresh button. I want to create a event and configure my content view with this event for refresh it automatically.
I have developed a view with my custom method: createDocument in a seam action and sent a event documentCreatedAnotherView but in my nuxeo studio I dont know where can I configure this event inside my content view.
07-17-2013 05:40 AM
Hi,
This cannot be configured directly in Studio interface for now, but you can add an "XML extension" feature with a configuration similar to:
<extension target="org.nuxeo.ecm.platform.ui.web.ContentViewService" point="contentViews">
<contentView name="myContentView">
<refresh>
<event>documentChanged</event>
<event>documentChildrenChanged</event>
<event>documentCreatedAnotherView</event>
</refresh>
</contentView>
</extension>
Note that content views created via Studio do have the documentChanged and documentChildrenChanged events as refresh events by default, so if you create another document, you should probably send the documentChildrenChanged event on the container to benefit from other listeners to it.
07-17-2013 05:40 AM
Hi,
This cannot be configured directly in Studio interface for now, but you can add an "XML extension" feature with a configuration similar to:
<extension target="org.nuxeo.ecm.platform.ui.web.ContentViewService" point="contentViews">
<contentView name="myContentView">
<refresh>
<event>documentChanged</event>
<event>documentChildrenChanged</event>
<event>documentCreatedAnotherView</event>
</refresh>
</contentView>
</extension>
Note that content views created via Studio do have the documentChanged and documentChildrenChanged events as refresh events by default, so if you create another document, you should probably send the documentChildrenChanged event on the container to benefit from other listeners to it.
07-17-2013 11:53 AM
Thanks, I used this
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.