Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Ajax listener method is not fire for other(except first) component  RSS feed

Posts: 7
Java Netbeans IDE PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi !

i've set pagination in ajax with four command button like first,next,previous,last.
it works fine for the first(any among four) button that i have pressed ....... all the subsequent click on that button , ajax listener method is fired ...
but other button's listener method is not fired then onwards

<h:form >
<h:datatable id=myDatatable >
// some code
<h:commandButton id="btnFirst" value="First" >
<f:ajax execute="@form" event="action" render="myDatatable hdnPage" listener="#{zoneBean.first}" />
<h:commandButton id="btnPrevious" value="Previous" >
<f:ajax execute="@form" event="action" render="myDatatable hdnPage" listener="#{zoneBean.previous}"/>
<h:commandButton id="btnNext" value="Next" >
<f:ajax execute="@form" event="action" render="myDatatable hdnPage" listener="#{} />
<h:commandButton id="btnLast" value="Last" >
<f:ajax execute="@form" event="action" render="myDatatable hdnPage" listener="#{zoneBean.last}" />

<h:inputHidden id="hdnPage" value="#{}" />

// sample of managed bin

// bean scope : requestScope

public void next(AjaxBehaviourEvent e) {
zoneList = port.getAllZones().subList(page * pageRows, page * pageRows + pageRows);

i hope you understand my problem .. . so any idea how can i call more than one listener method for the JSF components ?

thanks in advance !!!

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!