• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jsf Problem with Value Listener datatable binding being broken

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys

I have a code in which depending on the value of dropdown selected a datatable has to be populated .


<h:selectOneMenu value="#{IOUUnitCreationBackingBean.iouSelected}" styleClass="FontArialBoldSmall" valueChangeListener="#{IOUUnitCreationBackingBean.changeValue}"
style="margin-top:15px;border: 6px solid #a8c0e2;margin-left:17px;font-family: Arial;font-size: 11px;font-style: normal;font-weight: normal;text-decoration: none;" disabled="#{IOUUnitCreationBackingBean.numberOfIOUUnderIOUHR == 1}" onchange="this.form.submit();" >


<f:selectItems value="#{IOUUnitCreationBackingBean.list}" />
</h:selectOneMenu>


public void changeValue(ValueChangeEvent vce) {

this.iouSelected=(String)vce.getNewValue();
this.change();
try
{
IOUUnitCreationDAO unitCr = new IOUUnitCreationDAO();
this.unitList = unitCr.unitDetailList(this.iouSelected,activityCode);

}
catch(Exception e){
logger.error(Arrays.asList(e.getMessage()));
logger.error(Arrays.asList(e.getStackTrace()));
message = rb.getString("UNABLE_TO_PROCESS");
ResourceUtils.addMessage(message, FacesMessage.SEVERITY_INFO);

}
//IOUUnitCreationBackingBean i=new IOUUnitCreationBackingBean();

logger.error("this.iouSelected============>"+ this.iouSelected);

}

I am using value listener to get the new value but what is happening is for the first time binding is fine but for the next time onwards old value are being binded in the datatable..tried a lot of things but it didn't work. please suggest what to do.?
 
pankaj upreti
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please help me regarding this thanks..!
 
reply
    Bookmark Topic Watch Topic
  • New Topic