This is how subforms are supposed to work -- changes and submits in
one subform should not impact the current submitted values of the
others.

If you want to change the submitted values to the backing bean, then
you need to do so in code just as if you wanted to do it for a regular
form.

http://wiki.apache.org/myfaces/ClearInputComponents

That said, I'd not be opposed to adding an attribute to a subform to
configure it to refetch from the model so long as that was not the
default behavior.

On 5/24/07, Mario Ivankovits <[EMAIL PROTECTED]> wrote:
Hi!

It looks like model changes are not reflected in subforms not subject of
the current request.

So if you have stuff like:

<h:form>
    <h:commandInput .... />
    <h:commandButton id="btn1" .... />

    <s:subForm>
        <h:selectOneMenu .... />
        <h:commandButton id="btn2" .... />
    </s:subForm>
</h:form>

Now if you select one of the elements of the selectOneMenu and press
btn2 everything is fine.
If you enter something in the commandInput and press btn1 which will
change the data the selectOneMenu relies on this works too, but if you
change the value of the selectOneMenu (which is the one which will be
selected then) this do not work as during the render phase the
selectOneMenu component will use its submittedValue instead of the model
value.
As far as I can see this happens as the processValidators phase is
skipped for the subform and thus the submitted value will not be reset.

What do you think if we, instead of just skipping the processValidators
phase, iterate through the components and set their submittedValue to
null so they will get their value from the model again.


Ciao,
Mario


Reply via email to