-
1. Re: Get selected value of dynamic combobox.
ilya_shaikovsky Jul 21, 2010 7:07 AM (in response to deeps83)when actionListener is called - new value of comboBox already populated to model bean. you could just get it from there.
-
2. Re: Get selected value of dynamic combobox.
deeps83 Jul 21, 2010 12:28 PM (in response to ilya_shaikovsky)Hi Ilya,
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.
thanks,
Deeps.
-
3. Re: Get selected value of dynamic combobox.
ilya_shaikovsky Jul 22, 2010 6:52 AM (in response to deeps83)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.
-
4. Re: Get selected value of dynamic combobox.
deeps83 Jul 22, 2010 7:02 AM (in response to ilya_shaikovsky)Hi,
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.
Thanks,
Deeps.
-
5. Re: Get selected value of dynamic combobox.
ilya_shaikovsky Jul 22, 2010 7:12 AM (in response to deeps83)just even.getNewValue