You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2006/05/01 19:40:54 UTC

DO NOT REPLY [Bug 37098] - Cannot create attributes conditionally in tags

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37098>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37098


markhobson@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markhobson@gmail.com




------- Additional Comments From markhobson@gmail.com  2006-05-01 17:40 -------
The proposed workaround is not always sufficient.  For example, I want to
conditionally add the 'multiple' attribute to an HTML select tag:

<jsp:element name="select">
   <jsp:attribute name="multiple">
      <c:if test="${multiple}">multiple</c:if>
   </jsp:attribute>
   <jsp:body>
      ...
   </jsp:body>
</jsp:element>

This results in:

${multiple == true} : <select multiple="multiple">...</select>
${multiple == false} : <select multiple="">...</select>

Firefox and IE both treat the above as equivalent markup due to legacy reasons,
thus the <select> is always rendered as a multiple-choice listbox rather than a
single-choice drop-down.

Is there any suitable workaround for these scenarios, or is this simply an
omission in the JSP spec?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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