ShowTable of Contents
The traditional way you would approach this problem would be by using a div like this
<div id="staffmember" class="Invisible">
some stuff in here....
</div>
You would then have some JavaScript to change the class from "Invisible" to "Visible" so that the user could see it. This would not cause the web page to refresh, retaining the input the user had already given.
But how to do that in an xpage?
In this example I have split my form into 6 parts, and I'm going to name them Page 1 0f 6 through to Page 6 of 6.
We first need to create a new custom control(CC). On that CC we will need to add a panel to store our pages, and we need to create a new panel for each of the steps we have broken down our form into. Once there we need to embed our six panels into the main one. This is done by using the Outline provided in the Domino Designer, here we simply drag and drop the panels into the main panel as shown below:-
When you look back at your CC it should look like this:-
From here we need to make all panels unique by setting the ID on each of the panels. Again using the Outline saves a lot of fiddly mouse work trying to select the correct panel.
When you have finished the outline should look something like this.
Each panel has a property window that is shown near the bottom of the Designer Client, we are interested in the Visible part for each of the panels as shown here:-
We click the diamond and select "Compute Value", this brings up the Script Editor window and in here we are going to set the condition that allow the panel to be seen by the users.
sessionScope.mp01 == "SHOW"
We need to repeat this for all the panels we are going to hide.