Joe:

I was lobbying for the optional form bean when using the struts
<html:form> tag.  My suggestion was directed at an implementation
strategy.  Instead of adding the extra attribute to the <html:form>, I
thought it might be simpler to add a "default" attribute to the action
xml definition.  Or, a "reserved word" in the name attribute, maybe
something like "default" (input="default").  The thought was that maybe
the request processor, seeing this "flag" could just instantiate an
org.apache.struts.action.ActionForm placing it in request scope. The
<html:form> tag would be happy because there was a formbean associated
with the action.

My perspective was not in terms of separation of roles of development.
I see your argument as far as making it a feature of the jsp library as
it relates to the evolution of html into a dynamic application.

I felt this feature would be beneficial when creating inquiry pages and
menu pages that you wanted to use submit buttons for navigation and
still want to take advantage of the synchronization token and jsessionid
that the custom form tag handles for you.

Gary

From: Joe Germuska [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 15, 2004 8:46 AM
To: Struts Developers List
Subject: RE: why are form beans required for html:form?

At 8:25 AM -0700 1/15/04, <[EMAIL PROTECTED]> wrote:
>I think this is a great idea.  We often use buttons on the form for
> navigation between inquiry/dispaly pages which requires that we use a
> default formbean.  Maybe you could add the attributre to the action
noded
>of the struts config file instead of making it a custom tag attribute?
> This would allow you to let the request processor do the check and
> instantiate a base/dummy action form.  Then you wouldn't have to
refactor
>the tag libraries?  I suppose this might sound like a kluge.

Gary:

which is the great idea?  Using some config param to make the form
optional?  Or just making it optional in general?  I'm not sure what the
dummy form is for, unless the form wasn't optional.

I'm wondering if I might not also like behavior that also let you use
HTML form tags in the absence of a backing form bean; just skip the
re-filling instead of throwing an error.  That would allow us to have
non-programmers flesh out JSPs including forms with the right Struts
tags at any time ahead of programmers coming along and implementing  the
form pieces.  They're already familiar with substituting <html:*>  for
<input type="*"> in production apps, but they aren't ready to do  a lot
of struts-config work defining form beans and action mappings.

Would people object to reworking the form tags for more graceful
degradation at all levels in the absence of a form bean, instead of
exception throwing?

Joe




>Gary VanMatre
>
>-----Original Message-----
>From: Joe Germuska [mailto:[EMAIL PROTECTED]
>Sent: Thursday, January 15, 2004 7:09 AM
>To: Struts Developers List
>Subject: RE: why are form beans required for html:form?
>
>At 8:59 PM -0700 1/14/04, Richard Hightower wrote:
>>how about another attribute, i.e.,
>>
>><html:form checkFormBean="false" ...
>>
>>The checkFormBean defaults to true so it is backwards compatible with
>other
>>versions.
>>
>>
>>I like the idea that html:form checks for the form bean. It makes it
>easier
>>to debug the way it is.
>>However, I can see when you would not want that....
>
>Well, I'm figuring that if you actually NEED the form bean, then
>something else would throw an exception; presumably the first input
tag
>which isn't backed by some explicitly named bean.
>
>I'd probably leave out the parameter in preference of error checking
at
>the right spot.  I think what Ted was getting at in his email was  that
> other tags might not be doing good error checking because
>they've always deferred to html:form -- and yes, it would be bad to
> remove the check and then start having NPEs thrown that might be much
> harder to debug.
>
>Joe
>
>--
>Joe Germuska
>[EMAIL PROTECTED]
>http://blog.germuska.com
>        "Imagine if every Thursday your shoes exploded if you tied them
>the usual way.  This happens to us all the time with computers, and
> nobody thinks of complaining."
>              -- Jef Raskin
>
>---------------------------------------------------------------------
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]


-- 
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
       "Imagine if every Thursday your shoes exploded if you tied them
the usual way.  This happens to us all the time with computers, and
nobody thinks of complaining."
             -- Jef Raskin

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