struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Durham, Jr." <david.durham...@gmail.com>
Subject Re: name inconsistency
Date Tue, 10 Jul 2007 15:33:38 GMT
On 7/7/07, Musachy Barroso <musachy@gmail.com> wrote:
> * Move "id" attribute to UIBean so it is in all UI tags
> * Remove "id" from tags that are neither UIBean nor ContextBean (like
> Property for example)

I think this still leaves the issue with jspx.  Say that I have the
same html element within a jspx in 2 spots.  E.g.,

<c:choose>
     <c:when ..>
         <s:textarea id="myId" style="..."/> <!-- for instance -->
     </c:when>
     <c:otherwise>
         <s:textarea id="myId" />
     </c:otherwise>
</c:choose>

It is clear that only one will be rendered to an html page, but it is
not valid jspx syntax.  Seems to me that struts1 dealt with this
use-case by having a styleId attribute that translated to an html id
attribute (or whatever, hence styleId not htmlId).

My example is kind of weak because the argument to the style attribute
could easily be conditionalized, thereby avoiding the id issue.
Nonetheless, I think struts 2 tags should use something besides "id"
across the board, except in cases where struts tags need to refer to
other struts tags. (does that happen?)

-Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message