Tomahawk and SaveState

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,229
Latest member
GloryAngul

Latest Threads

Top