Incidentally, can antone tell me the difference between id, name, and
property?  (org.apache.struts.taglib.bean)


----- Original Message -----
From: "James Howe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 12:01 PM
Subject: Re: Required vs. optional "name" attribute


> At 10:00 PM 4/22/2001 -0700, you wrote:
>
>
> >On Wed, 18 Apr 2001, James Howe wrote:
> >
> > > I apologize in advance if this topic has come up before, but ...
> > >
> > > I'm building a Struts JSP page containing a form.  I've noticed that
the
> > > HTML tags typically do not require the specification of a "name"
attribute
> > > in order to retrieve property values from a bean.  If the name isn't
> > > specified, the property value is retrieved from the bean associated
with
> > > the form.  However, logic tags require the use of the name attribute
in
> > > order to retrieve a property.  [...]
> >
> >The HTML-oriented tags that allow you to default the "name" attribute can
> >*only* be used within an <html:form> tag -- they are not useful in any
> >other context.
> >
> >The logic tags (and the bean tags as well) are general purpose tools,
> >useful either inside or outside a form.  It would be technically feasible
> >to do what you suggest, but IMHO it would be very confusing to have the
> >same tag do two different things depending on whether you nested it or
> >not.
> >
> >Craig
>
>
> I understand your point.  How about if there were a new tag in Struts
> called "defaultName" (or something similar).  In the defaultName tag, you
> could identify a bean which automatically be referred to by all other tags
> unless a different bean name attribute were specified on a tag.  This
would
> let you include common code and the common code wouldn't have to know the
> name of the bean from which it got its value unless it wanted to.
>
>
> James W. Howe                   mailto:[EMAIL PROTECTED]
> Allen Creek Software, Inc.              pgpkey:
http://ic.net/~jwh/pgpkey.html
> Ann Arbor, MI 48103
>

Reply via email to