ummmm, hmmm.

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

imho, people who dont use strings exclusively in their AFs deserve whatever
is coming to them... ;->

Seriously though, I dont think I like the idea of changing the form and view
population methodology too much.

<snip>
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
</snip>

Especially if this necessitates changes to the logic required to render the
values out again. One of the advantages of keeping everything buffered in
the ActionForm is that using a bean as the input buffer makes it nice and
easy to find and render these values back into the html in pretty much all
the rendering technologies. It also means even if you are using JSP
(shudder) you dont have to stuff around checking several places for a value
to render the field with when your not using struts tags.

-----Original Message-----
From: Ted Husted [mailto:[EMAIL PROTECTED]
Sent: Friday, 16 January 2004 12:21
To: Struts Developers List
Subject: RE: why are form beans required for html:form?


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]



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

Reply via email to