Jim Seach wrote:
[...]
> Since it's exposing the form values, why not use:
> 
>     public ActionForm getValue()
> 
> This might be more descriptive.  we are exposing it in the view, and
> designers might not have a clue what a JavaBean is.   That would give
> us:
> 
> <input type="text" name="username" value="$form.value.username">

Well, I am not fully sold on it.

How about:

public ActionForm getValues()    // note the 's' to emphasize that
                                     // we retrieve multiple values

public ActionForm getFormBean()


Or, we rename the $form tool to $formtool and name the method getForm()
This would make: $formtool.form to access the form.

Or, we just keep the getBean() Method. It should be easy for designers
to get the concept. 

I need to think a little more about it.


> > Note that the form bean is available in the request or session
> > attributes already. getBean() isn't really necessary. It just a
> > little
> > convenience. I kind of like it because if there is a method in the
> > API
> > this makes it explicit how to get a hold of the form bean.
> >
> 
> As you say, it's just a convenience, but what a convenient one!  I like
> it!

The form is in the context and can be accessed with the name that was
defined in struts-config.xml, eg

<input type="text" name="username" value="$loginForm.username">

So, the convenience offered by the getBean() method is really very minor.


Gabe


> 
> Jim Seach
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland

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

Reply via email to