Thanks Cedric,
that made the trick but I got some warnings about FacesMessage, so is it
possible to make it without them?
INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been
displayed.
sourceId=j_id29[severity=(ERROR 2), summary=(A value is required.),
detail=(You must enter a value.)]
sourceId=j_id30[severity=(ERROR 2), summary=(A value is required.),
detail=(You must enter a value.)]
Jozef
On 12.5.2010 14:03, Cédric Durmont wrote:
I won't say it's the ideal way, but my trick is to use a
valueChangeListener on the tr:selectBooleanCheckbox, with
immediate="true". When the ValueChangeListener is triggered, I update
the list used by the tr:selectOneChoice, and the partialTrigger does
the rest.
Hope this helps.
Regards,
Cedric Durmont
2010/5/12 Jozef Dropco<[email protected]>:
I have following form, and I need when I toggle checkbox change values of
selectOneChoice. But inputText is first-time blank and selectOneChoice is
first-time null, so when I toggle checkbox javascript validation stops
rerendering, is it possible to change the value without validation. I tried
immediate="true" but no success :-(.
Any ideas?
Thanks Jozef
<tr:panelFormLayout>
<tr:inputText required="true" label="#{msg.price}"
value="#{pensionBean.pension.price.price}">
<tr:validateDoubleRange minimum="0.0"/>
<tr:convertNumber type="number"/>
</tr:inputText>
<tr:selectBooleanCheckbox autoSubmit="true" id="pensionCurrencyChanger"
label="#{msg.useSystemCurrencies}"
value="#{pensionBean.pension.price.discriminator}"/>
<tr:selectOneChoice required="true" label="#{msg.currency}"
partialTriggers="pensionCurrencyChanger"
value="#{pensionBean.pension.price.currentCurrency}">
<f:selectItems value="#{pensionBean.allCurrencies}"/>
</tr:selectOneChoice>
</tr:panelFormLayout>