• 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

rich:comboBox valueChangeListener is not working

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

I created an XHTML file in my JSF project, and I put a rich:comboBox component into a rich:panel like this:



I put a valueChangeListener method into the BaseInfo bean:



I don't understand why, but it's not working. There are no any error messages, just nothing happens, when I'm selecting another value in the comboBox. I can see all the items in the comboBox which cames from the BaseInfo bean, so this part is working fine.
Do You have any idea about it?
When I used h:selectOneListBox before this code worked fine.

I'm using Richfaces 3.2.1 with JBoss 4.2.2.

Thanks,
Tamas
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi there, are you 100% everything is enclosed by a <h:form></h:form> tags??...just said because that happened to me a while ago...
 
Ranch Hand
Posts: 50
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try removing immediate="true", I guess it is preventing the backing bean from being updated.. and so your valuechangeListener is not fired as the value is not changed....

not sure.. just a guess.. hope this helps...
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
Try calling FacesContext.getCurrentInstance().renderResponse(); in your vauueChangeListener method to force the view to recreate.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tamas,

Did you able to fix the issue? I cant get it run anytime after trying the other inputs. Any thoughts?

Thanks,
Megan.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
add a4j:support to rich:comboBox.

-Gaurav
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the same problem. The onchange event is only triggerd when I do a sublit off my form. I want it to be triggered everytime i change something in teh combobox. How can I do it?
here's my code
JSP;


MetaDataDetail CLASS;




When changing the combobox, the method changePerson is not triggerd. How can I trigger it?
If i replace the rich:comboBox with a h:selectOneListbox it works.

Kindest regards,

Roel

 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A ValueChangeListener will only be called after a form submit so Tamas , you should have onclick="this.form.submit()" and your ValueChangeEvent will be fired.

Alternately, if you don't want a form submit then as Rajshekhar suggested use <a4j:support> , an example for this can be found at

RichFaces live demo
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, the correct syntax to invoke a submit on the combo value change is:



Danny
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic