Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

rich:comboBox valueChangeListener is not working

 
Tamas Malatinszki
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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
 
camilo casadiego
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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...
 
Srikanth Madasu
Ranch Hand
Posts: 48
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • 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...
 
Mario Campos
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
Try calling FacesContext.getCurrentInstance().renderResponse(); in your vauueChangeListener method to force the view to recreate.
 
Megan Stew
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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.
 
Rajshekhar Anand
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
add a4j:support to rich:comboBox.

-Gaurav
 
roel croonenberghs
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • 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

 
Kavita Tipnis
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • 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
 
Danny Rankevich
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, the correct syntax to invoke a submit on the combo value change is:



Danny
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic