| Author |
Update another component when selectOneMenu
|
D. Formenton
Ranch Hand
Joined: Mar 20, 2008
Posts: 39
|
|
Hi,
I wold like to update a <h:inputText> when an <h:selectOneMenu> is programmatically filled with values, without any action of operator.
Now if I click on selectOneMenu and select a different item the inputText is update Ok. But if the selectOneMenu has only one item (then cannot change value!)
OR in absence of any user action the input Text is not updated.
The relevant code:
<h:inputText value="#{richiesteOffController.newRow.articolo.measureUnit.descrizione}"
style="width: 40px; text-align: right;"
id="txtMeasUnit" readonly="true" />
<h:selectOneMenu value="#{richiesteOffController.newRow.articolo}"
id="somArticolo" converter="articoliConverter">
<f:selectItems value="#{articoliController.LArticoli}"
var="articolo" itemValue="#{articolo}"
itemLabel="#{articolo.descrizione}"/>
<f:ajax render=" txtMeasUnit"/>
</h:selectOneMenu>
I would like that when <h:selectOneMenu> is filled with one or more values the h:inputText is updated and shows a property of the item currently shown by <h:selectOneMenu.
What I have to do to reach this goal?
Thank you very much.
Domenico>
|
 |
 |
|
|
subject: Update another component when selectOneMenu
|
|
|