sniezna.stopa schrieb:
It only return the BazaarUser object, which is created in earlier step:
- step 1 (step.jsf) - the bazaarUser is created;
- step 2 (step2.jsf) - the bazaarUser is populated with values entered by
user
- step 3 (step3.jsf) - additional informations are populated with values
entered by user. In this step, if validators or converters throws any
exceptions, then bazaarUser is null.
I am using myFaces 1.3, facelets, myfaces Orchestra.
Ah, ok.

Your Registration bean is access-scoped. Would I be right in guessing that the only things in your step3.jsf page that refer to the registration bean are the "value" expressions of input fields?

In this situation, when a validation failure occurs then the page is re-rendered using the "submitted" values for the input components, rather than trying to read the values from the backing bean. If nothing else refers to the backing bean then Orchestra sees that the "access" scoped bean has not been accessed at all and so throws it away.

This has been reported before, and Orchestra might be modified in future to skip "access-scope" checking when validation/conversion failure has occurred.

In the meantime, for the occasional page where this condition occurs (only value-property of input fields reference the bean) try putting this in your page:
 <h:outputText value="" rendered="#{Registration.class == null}"/>
That hack will ensure that the "Registration" bean is accessed on each postback, regardless of whether validation fails or not. Note that nothing will actually get output; that "rendered" expression obviously always returns false.

Regards,
Simon

Reply via email to