Skip to content

Instantly share code, notes, and snippets.

@olivier-schmitt
Created June 15, 2013 08:48
Show Gist options
  • Save olivier-schmitt/5787439 to your computer and use it in GitHub Desktop.
Save olivier-schmitt/5787439 to your computer and use it in GitHub Desktop.
JSF and AJAX : use case sample
<h:body>
<h:form id="mainform">
<h:commandButton
id="cmd"
action="#{ajaxCounterBean.execute}"
value="Ajax"
immediate="true">
</h:commandButton>
<h:panelGroup id="output">
<input id="counter" value="#{ajaxCounterBean.count}"/>
</h:panelGroup>
</h:form>
<h:panelGroup id="output2">
<input value="#{ajaxCounterBean.count}"/>
</h:panelGroup>
<h:form id="secondform" prependId="false">
<h:panelGroup >
<h:panelGroup id="output3">
<input value="#{ajaxCounterBean.count}"/>
</h:panelGroup>
</h:panelGroup>
</h:form>
</h:body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment