-
Feb 5th, 2012, 01:50 PM
#1
How to handle ajax event?
Could anyone explain how to bind the event on the page with spring bean?
For example if we have page code
<h:commandLink id="nextPageLink" value="More Results" action="next"/>
so we can use "next" in flow definition
<transition on="next">
But what about such evebts like
<p:accordionPanel>
<p:ajax event="tabChange" listener="#{myBean.onTabChange}" />
By primefaces tutorial it can be handled in MyBean in such way:
public void onChange(TabChangeEvent event)
{
Tab activeTab = event.getTab();
}
But how this event may be handled in Spring context?
Thank you
-
Feb 19th, 2012, 01:14 PM
#2
Solution in <p:remoteCommand
RemoteCommand is used by invoking the command from your javascript code.
<p:remoteCommand name="increment" actionListener="#{counter.increment}"
out="count" />
<h:outputText id="count" value="#{counter.count}" />
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules