Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use dominoViewListTreeNode to build a menu based on views in a database (and not documents in those views).</p> <p>Here is an example of using xe:dominoViewListTreeNode to dynamically build a menu based on all views called "Test*" (using regex in the filter property). When selecting a menu item from the menu, the name of the view is submitted to the server (using EL notation for the viewEntry.getName() method).</p> <p>The example also contains an onItemClick event handler that "catches" the name of the view as the submitted value and stores this in a sessionScope variable. The event handler then redirects to a views.xsp XPage that could contain a Dynamic View Panel control where you could use the sessionScope variable to control what view to show.</p> <p>The sessionScope variable is also used to mark the selected menu item as "selected".</p> <pre><code>&lt;xe:navigator id="navigator1"&gt; &lt;xe:this.treeNodes&gt; &lt;xe:dominoViewListTreeNode filter="Test.*" submitValue="#{viewEntry.name}" var="viewEntry"&gt; &lt;xe:this.selected&gt;&lt;![CDATA[#{javascript:viewEntry.getName() == sessionScope.clickedView}]]&gt;&lt;/xe:this.selected&gt; &lt;/xe:dominoViewListTreeNode&gt; &lt;/xe:this.treeNodes&gt; &lt;xp:eventHandler event="onItemClick" submit="true" refreshMode="complete"&gt; &lt;xp:this.action&gt; &lt;![CDATA[#{javascript:sessionScope.clickedView = context.getSubmittedValue(); context.redirectToPage("views.xsp");}]]&gt; &lt;/xp:this.action&gt; &lt;/xp:eventHandler&gt; &lt;/xe:navigator&gt; </code></pre> <p>Instead of the onItemClick method to redirect to an XPage, you could compute the href property of xe:dominoViewListTreeNode to return the name of an XPage.</p> <p>I have a short presentation called "<a href="http://www.slideshare.net/perlausten/xpages-extension-library-create-an-app-in-1-hour-almost" rel="nofollow">XPages Extension Library - Create an app in 1 hour (almost)</a>" that presents this technique (and other techniques).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload