Hello,

I want to add a new window in the dashboard to display query results.

First of all, I created a new QueryModel in a querymodel-contrib.xml :

<?xml version="1.0"?>
<component name="com.nuxeo.sample.querymodels">
  <extension 
target="org.nuxeo.ecm.core.search.api.client.querymodel.QueryModelService"
    point="model">
     <queryModel name="dashboardDocsPersoQueryModel">
        <pattern>
                SELECT * FROM Document
        </pattern>
        <sortable value="true" defaultSortColumn="dc:title" 
defaultSortAscending="true" />
     </queryModel>
  </extension>
</component>



Then I added a resultprovider in resultprovider-contrib.xml
I think the problem is linked with the farm, but I don't know how it works
.
<?xml version="1.0"?>

<component name="com.nuxeo.sample.resultsprovider">
  <extension
    target="org.nuxeo.ecm.webapp.pagination.ResultsProviderService"
    point="model">
    <resultsProvider name="dashboardDocsPersoQueryModel" farm=
"dashboardActions"/>
  </extension>
</component>



Then, I created a dashboard_docs_perso.xhtml which calls the QueryModel :
<nxu:methodResult name="provider" 
value="#{resultsProvidersCache.get('dashboardDocsPersoQueryModel')}">
  <ui:decorate template="/incl/foldable_box_document_listing.xhtml"
     xmlns:ui="http://java.sun.com/jsf/facelets";>
    <ui:param name="documents" value="#{provider.currentPage}" />
    <ui:param name="provider" value="#{provider}" />
    <ui:param name="heading" value="Documents Perso" />
    <ui:param name="idParam" value="dashboardDocsPersoQueryModel" />
  </ui:decorate>
</nxu:methodResult>


To finish, I modified the theme-contrib.xml to add a new view with this 
xhtml file :
    <view name="nuxeo5 docs perso">
      <!-- Fragment to be displayed as part of the dashboard to display 
the
        list of documents that have been modified recently -->
      <format-type>widget</format-type>
      <class>org.nuxeo.theme.jsf.views.JSFView</class>
      <template>incl/dashboard_docs_perso.xhtml</template>
      <resource>foldable-box.js</resource>
    </view>


I add the new fragment with the theme editor and I have this error :

org.nuxeo.ecm.core.api.ClientException: Unknown board: 
dashboardDocsPersoQueryModel
        at 
org.nuxeo.ecm.webapp.dashboard.DashBoardActionsBean.getResultsProvider(DashBoardActionsBean.java:346)


Thank you.
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to