1 Answer
1

You need to keep passing request parameters to the subsequent request. In "plain vanilla" HTML you'd indeed have used <input type="hidden"> for this, but the JSF <h:inputHidden> unfortunately doesn't work that way. In case of a general validation failure, caused by another input field, the model value associated with <h:inputHidden> won't be updated at all.

You should be using a <f:param> in the UICommand component instead to retain request parameters for the subsequent request. E.g.

Alternatively, you can use the <o:form> of the OmniFaces JSF utility library, it basically extends the <h:form> with an additional attribute includeViewParams which enables you to retain the view parameters for the subsequent request.

<o:form includeViewParams="true">
...
</o:form>

This may end up to be easier if you have multiple command buttons/links and ajax actions.

Thanks! I just forget to try <f:param> tag in the commandButton. For the temprory solution, I remove the "required" and "requiredMessage" atributes from inputText and check values via itemsBean and navigation rules.
–
gooamokoSep 8 '12 at 2:12