Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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 ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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

 
Greenhorn
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:datatable>
<h:commandButton id="btnFirst" value="First" >
<f:ajax execute="@form" event="action" render="myDatatable hdnPage" listener="#{zoneBean.first}" />
</h:commandButton>
<h:commandButton id="btnPrevious" value="Previous" >
<f:ajax execute="@form" event="action" render="myDatatable hdnPage" listener="#{zoneBean.previous}"/>
</h:commandButton>
<h:commandButton id="btnNext" value="Next" >
<f:ajax execute="@form" event="action" render="myDatatable hdnPage" listener="#{zoneBean.next} />
</h:commandButton>
<h:commandButton id="btnLast" value="Last" >
<f:ajax execute="@form" event="action" render="myDatatable hdnPage" listener="#{zoneBean.last}" />
</h:commandButton>

<h:inputHidden id="hdnPage" value="#{zoneBean.page}" />
</h:form>

// sample of managed bin

// bean scope : requestScope

public void next(AjaxBehaviourEvent e) {
page+=1;
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!