The Navigator and Dynamic View Panel controls of the Extension Library

In this article I implement the Navigator and Dynamic View Panel controls of the XPages Extension Library in a similar way to the navigator and views in a frameset of a lotus database open using the lotus client.

  1. create a lotus database with at least a form, two views and some documents
  2. create a custom control cc_luni_view with the following code:

    compositeData.defaultViewName contains the name of the default view, compositeData.viewName contains the name of the view selected from menu (Navigator control)
  3. in the custom control cc_luni_view add two properties viewName and defaultViewName of type string as in figure
    cc_luni_view

    you can access to these properties with the object compositeData (see the code in the previous step)

  4. create a custom control cc_luni_navigator with the following code

    where in place of [put the label of the first view] and [put the label of the second view] you have to put the view names of your database;
    this custom control contains the Navigator control, in the tab Design -> Properties -> Navigation Items I created two items of type Basic Node and I set the properties:

    • label: displayed to the user
    • submitValue: in order to set the variable context.getSubmittedValue()

    I set an update of the dynamicViewPanel1 control (the view) as in figure
    cc_luni_navigator

    but I have to replace the tag “xe” with “xp” as explained here to avoid the error “The unknown tag xe:eventHandler cannot be used as a control”

  5. create the custom control cc_luni_layout with the following code

    it is the Application Layout control of the Extension Library
  6. create a xpage with code:

    where in place of [put the default view] you have to replace the name of the default view
    at Custom Properties of the custom control cc_luni_view I set the two properties passed to the Dynamic View Panel control

One Reply to “The Navigator and Dynamic View Panel controls of the Extension Library”

  1. hi,
    Navigating works just fine, but there seems to be some problem when i try to collapse category in view. View panel just disappears, leaving 2 small squares.
    Any advice where i could search the bug?
    -Henri

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.