Tuesday, June 16, 2009

Xpages: A Tabbed Panel UI, and remembering which tab you were on..


I kind of like the tabbed panel as a UI for some applications, it seems to lend itself to being able to show more information horizontally than a navigator on the left hand side.  Now in my xpage application, i have a different view on each tab.  When you click on a document link it takes you to another page(the PO Form), and when you leave that page(the po form) the brwoser returns to this page, the tabbed panel. 

To get back to the tab the user was on before they opened the po…

First i set the “Tab opened by default” to a computed value that = sessionScope.whichtab

Next i set a session variable whichtab to the tab id(the id on the properties of the tab) in the on click event.


Now every time you return to this page, or it refreshes, it will open the last tab that was clicked.


Jerry Shelley said...

Am I right in thinking that if you navigate somewhere else, such as a Home Page, and then open another Customer's Purchase Orders XPage, then the last Tab you previously had open will open as default, when in fact you really need to open the first Tab?

If so, is there a way round this, please? Is seesionScope the best Scope to use perhaps?

Thanks for all the XPage info. Jerry.

Mark Hughes said...

you might want to use an application scope in that case. For this example there is one company, it navigates all of thier pos through this ui, so sessionscope works out well, unless you navigate to another page using the same variables, then use applicationscope.

hmmm, you are right applicationscope would be the best option for this!!

Post a Comment