ajax - alternative for h:commandLink in navigation -



ajax - alternative for h:commandLink in navigation -

i have navigation h:commandlinks set backing bean und reload parts of view via ajax. works expected produces horrible mark because h:commandlinks have in form element.

the view follows:

<h:body> <nav> <h:form id="navigation"> <h:commandlink styleclass="#{fragmentspresenter.isactive('fragment-one.xhtml') ? 'active' : 'inactive'}" action="#{fragmentspresenter.setactiveview('fragment-one.xhtml')}"> viewone <f:ajax execute="@this" render="fragment-container navigation" /> </h:commandlink> <h:commandlink styleclass="#{fragmentspresenter.isactive('fragment-two.xhtml') ? 'active' : 'inactive'}" action="#{fragmentspresenter.setactiveview('fragment-two.xhtml')}"> viewtwo <f:ajax execute="@this" render="fragment-container navigation" /> </h:commandlink> </h:form> </nav> <h:panelgroup layout="block" id="fragment-container"> <ui:fragment> <ui:include src="#{fragmentspresenter.activeview}"/> </ui:fragment> </h:panelgroup> </h:body>

is possible accomplish same functionality other jsf elements dont require form?

thanks in advance.

try >>> h:outputlink

<h:outputlink value="anything.xhtml"><h:outputtext value="#{bean.text}" /> </h:outputlink>

ajax jsf navigation commandlink

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -