0
votes

I have a xpage which contains one big table with 1 row and 2 columns. I created this table to separate the xpage into 2 parts: the left one where I have some buttons and the right one where I want to display some views.

From the container controls I drag a View on the right column, but is there any chance to do this in such a way that 1st button clicked => 1st view is shown, 2nd button clicked => 2nd view is shown and so on.

Or every xpage should contain one view?

I raise this question considering the fact that in Lotus Notes if you had one frameset with 2 frames, you could easily create an outline in one frame, and some views that will be open by every outline entry in the 2nd frame. What I want to do is quite the same thing.

I appreciate your time. If you think this question isn't 'good' enough, I will just delete it. I'm new in XPages development.

4
Check out the switch and dynamicContent components of the Extension Library. They are designed for exactly this type of use case.Tim Tripcony

4 Answers

1
votes

Use simple table with one row and two columns. Place your buttons inside the left cell. Put the switch control (mentioned by Tim) to the right one. More about the control in extlib demo DB... online demo here

1
votes

Create separate custom control for each view and drag and drop "Include Page" from container control to the right column of your table and compute the page name instead of selecting an XPage. You can compute like this sessionScope.CCName + ".xsp". And onclick of the button set appropriate custom control(which contains the view) name as the value to the sessionScope variable and reload the page. This will do what you want. I hope this too helps.

1
votes

You could do this on a single XPage using a xe:navigator control in the left column and an xe:dynamicViewPanel control in the right. These controls are available in the Extension Library if you are running 8.5.3 and natively available in release 9.

The Dynamic View Panel control is the dynamic content control for displaying one of several Domino views. Only the component for the displayed view is loaded in the component tree so it is highly efficient compared to alternative designs (like an xp:viewPanel control in each facet of an xe:switchFacet control as each viewPanel is loaded in the component tree on the server, not just the one that is rendered).

See this online demo http://xpages.jp/demos/xpagesext.nsf/Domino_DynamicView.xsp

0
votes

put each content on a seperate panel in a custom control. Have those custom controls in seperate divs and show/hide divs based on button click.

If you are using different xpages, you can use IncludePage(from container controls), which will act like a computed subform.