when actionListener is called - new value of comboBox already populated to model bean. you could just get it from there.
Thanks for the reply.
Yes, in noraml case that will be how it works.But my problem is like,
suppose user has selected a value 'A' from one main combobox ,then I will be having say some 10 components of which some will be HtmlComboBox and some will be HtmlInputNumber spinner .If the user selects another value say 'B' there will be another set of components that needs to be shown.I am creating these components dynamically and adding to one HtmlGrid which is having a binding with an HmlGrid in my bean class and rerendering.Since these components are created dynamically there will not be an attribute in the bean corresponding to the value of each component.So I have no option to get the value in this way.
Hope you got my problem.Pleas let me know if I can have a solution for this.
I see... but the comboBox which change should affect the dynamic part of UI being submitted. And it has current Value already set. And it populates ValueChange Event which also contains this new value.. So not sure.. seems still not getting the problem.
So you mean to say, I have to add a valueChangeListener for the HtmlComboBoxes that I am creating dynamically ,and in the valueChangeListener method the new value of the component will be available as component.getNewValue()?
ok.But I am not sure how I can add a value change listener dynamically.If you dont mind can you please give a sample code for the same.