- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2012 09:27 AM
I want to specify into my Nuxeo studio a form with a suggestion box mapped on a Single/Multiple Document suggestion. All work well, but I want to filter the suggestions returned to fetch only a specific kind of documents or path.
How can I do that ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2012 09:33 AM
Dear Me,
So you must have into your form definition (in creation or edition) a single or multiple Document suggestion widget. You have into this widget a field called "document page provider name". Here you will specify the filter.
Today you can't specify the filter directly in studio, waiting that, you can go to:
- Advanced Settings > XML Extensions > New...
- Choose the name of your choice that express the filter behavior and validate
- And add in it the following xml fragment:
_
<extension target="org.nuxeo.ecm.platform.query.api.PageProviderService"
point="providers">
<coreQueryPageProvider name="ListeDiffusion">
<pattern quoteParameters="false" escapeParameters="true">
SELECT * FROM MyDocument WHERE ecm:fulltext LIKE '?*' AND ecm:mixinType !=
'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND
ecm:currentLifeCycleState != 'deleted'
</pattern>
<!-- sort column="dc:title" ascending="true" / sort by fulltext relevance -->
<pageSize>5</pageSize>
</coreQueryPageProvider>
</extension>
You will recognize the NXQL syntax. With your large knowledge on this language, I think you have enough to what you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2014 01:52 PM
Thank you @ThibArg and @thierry-delprat for your answers, which work like a charm. The Page Provider is given an implicit first parameter, which is the text that the end-user has typed in the widget, which accounts for the exception I was experiencing.
Sorry @florent-guillaume for spamming the Nuxeo Studio Answers web site, I will take extra care next time. Nevertheless, I'm pretty sure that other Nuxeo developers will enjoy those detailed explanations 😉
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2014 01:12 PM
The problem is not the explanations, thanks for providing them and telling us about what you tried. The problem is about the format.
