On Thu, 15 Jan 2004 12:14:46 -0600, Joe Germuska wrote:
> Now, at the risk of sidetracking this discussion, I have to bring
> up my other Struts pet-peeve -- the over complexity of pre-filling
> forms from data rather than from the request.  I'm wondering if
> bringing up some questions about how the form bean is looked up
> gives me a chance to scratch that itch too...?

I don't think this is what you meant, but I've wondered whether the tags should check 
the request for a corresponding attribute if the formbean property returns null.

This could answer the case where the target property is not a String (or boolean).

If the bean property is null, and the same property exists in the request, then we 
have the case where validation failed and the attribute could not be stored in the 
target property. If the tag then displayed the request attribute, we could have typed 
input field on ActionForms. (Essentially, we are using the request as our String 
buffer.)

Though for consistency, a better idea (if this first idea is even good) would be to 
check the request for a corresponding attribute first, and then look to the formbean 
property
if the attribute is absent. Again, this would let us use the request for an input 
buffer, and reserve the ActionForm for validated input.

-Ted.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to