Skip to main content

Ajax menu navigation like GlassFish admin?

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2007-05-25

I was looking at GlassFish 3.1 admin page, and wondering how GlassFish implements the Ajax menu navigation. It looks like each menu item has a JSF page associated, e.g. Domain -> serverInstDomainAttrs.jsf, Applications -> applications.jsf. Clicking the menu item will only refresh the content area without changing the header and etc.
Can you provide some guidelines and example of how to do this?
Thank you!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2010-12-29

You can use dynamic include with tag ui:include.
If you have a backing bean as #{bean.includedPage}, you can change this when you click on menuItem maybe just a link with an f:ajax child an jajax just refresh include
<h:commandLink action="#{actionWichChangeIncludedPageValue}">
<f:ajax execute="@this" render="include" />
<h:panelGroup id="include">
<ui:include src="#{bean.includedPage}" />

I'm not sure this code is great but idea is there.