S
SV1000S_31
Hi everyone,
i've a problem with the UISaveState component... I've a JSF page which
contains a form with many inputs.
<h:form id="myForm">
<t:saveState id="save" value="#{mainBean}" />
<h:selectOneMenu id="sessionLabel"
value="#{mainBean.param1}"
immediate="true" onchange="submit()"
valueChangeListener="#{mainBean.param1SelectionChangedHandler}">
<f:selectItems value="#{mainBean.param1List}" />
</h:selectOneMenu>
<h:inputText id="param1" value="#{mainBean.param2}" />
<h:commandButton action="#{mainBean.doValidate}"
value="OK" />
</h:form>
mainBean is a bean which contains :
- param1 attribute ;
- param2 attribute ;
- secondBean : bean to fill param2 in function of param1 selection.
So, my problem :
when the param1 value changes, the param2 don't change even if the
param2 value seems to be calculated and assigned correctly in the
mainBean (the display don't work, saveState, restoreState problem??).
If the secondBean is declared transient, when the param1 value
changes, the param2 value changes too and it's ok but in this case,
there is a problem in the form submission. The value of param2 is
always the calculated value in param1SelectionChangedHandler even if
user change the value directly in the form (the setter of param2
doen't seem to be used)...
Thanks a lot.
i've a problem with the UISaveState component... I've a JSF page which
contains a form with many inputs.
<h:form id="myForm">
<t:saveState id="save" value="#{mainBean}" />
<h:selectOneMenu id="sessionLabel"
value="#{mainBean.param1}"
immediate="true" onchange="submit()"
valueChangeListener="#{mainBean.param1SelectionChangedHandler}">
<f:selectItems value="#{mainBean.param1List}" />
</h:selectOneMenu>
<h:inputText id="param1" value="#{mainBean.param2}" />
<h:commandButton action="#{mainBean.doValidate}"
value="OK" />
</h:form>
mainBean is a bean which contains :
- param1 attribute ;
- param2 attribute ;
- secondBean : bean to fill param2 in function of param1 selection.
So, my problem :
when the param1 value changes, the param2 don't change even if the
param2 value seems to be calculated and assigned correctly in the
mainBean (the display don't work, saveState, restoreState problem??).
If the secondBean is declared transient, when the param1 value
changes, the param2 value changes too and it's ok but in this case,
there is a problem in the form submission. The value of param2 is
always the calculated value in param1SelectionChangedHandler even if
user change the value directly in the form (the setter of param2
doen't seem to be used)...
Thanks a lot.