Thanks for reply, comments inline.

Dennis Byrne


Mike Kienenberger <[EMAIL PROTECTED]> wrote on 09/07/2005 07:18:02 AM:

> 1) "graph of objects" = "graph/model" = request-scoped data


Yeah, something like #{OrderBacker.currentOrder.customer.address.zipCode}

> 2) h:outputText reads from the request-scoped data


Yes, OrderBacker is a request scoped bean
 
> Maybe you need to preserve h:outputText's value binding with t:saveState?

The farthest I got was <t:saveState value="#{OrderBacker.currentOrder.customer.address.zipCode}" />  ... which of course blows up because the base is null.

I can confirm however that MyFaces is going to the model after validation fails.  For example, if I change the value binding to #{OrderBacker.string}, logging statements in OrderBacker.getString() show the following ...

1.) request sent
2.) getString is called
3.) response rendered, showing value from the model (zipCode)
4.) submit form, request sent
5.) validation failure
6.) getString is called again
7.) response rendered w/ blank value

It's as if JSF "thinks" like this at the point in which validation has failed:  OK validation has failed for this request, better render the last response w/ the values of this request.  Oops, there is no request value for this h:outputText ... let's look back at the model.

Reply via email to