On 17 Jul 2002, David M. Karr wrote:

> Date: 17 Jul 2002 12:07:09 -0700
> From: David M. Karr <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: Subclass Struts tags to work with JSTL?
>
> >>>>> "Tim" == Tim Moore <[EMAIL PROTECTED]> writes:
>
>     >> From: Martin Cooper [mailto:[EMAIL PROTECTED]]
>     >> By the way, a good reason to use the name "var" for the n/p/s
>     >> attribute is because that is what JSTL uses for the
>     >> equivalent functionality. Consistency is good! ;-)
>
>     Tim> Well, I'm not sure that it is the equivalent functionality.  From the
>     Tim> spec: "The convention is to use the name var for attributes that export
>     Tim> information." So it's more like the id attribute, but it doesn't create
>     Tim> a scripting variable.  There doesn't seem to be a standard attribute
>     Tim> name for the n/p/s equivalent...they just use a name appropriate to what
>     Tim> the action does.  So c:out uses "value", the conditional tags use
>     Tim> "test", iterators use "items".  It seems like "var" should only be used
>     Tim> when you're creating in attribute in the scope specified by "scope" and
>     Tim> that perhaps "value" should be used when simply reading a property
>     Tim> (e.g., the form field tags).
>
> Along these lines, I agree that "var" is correct in place if "id", but a more
> general statement about other situations is harder to make.  Except for the
> "id" -> "var" case, each one should be examined individually for what would
> make sense.
>
> Many of the attributes that would take EL values won't even have to have their
> name changed.  For instance, the "key" attribute of "bean:message" is fine as
> it is.  In the case of this tag, the "name" and "property" attributes wouldn't
> be needed in the EL library.
>

If we stay with the "dual libraries" approach, this all makes sense.

One thing we'll want to do *inside* the implementations is maximize the
reuse of the actual tag classes, to minimize the effort of keeping the two
libraries in synch.

> --
> ===================================================================
> David M. Karr          ; Java/J2EE/XML/Unix/C++
> [EMAIL PROTECTED]
>

Craig


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

Reply via email to