Hi,
  This is more of a general JSP/EL question then a stripes one but I can't
seem to find an answer.
I have a layout definition that uses a stripes:link tag. When I call the
layout I pass an argument to set the class on the link.

Is there any short-hand way I can set the class attribute on the
stripes:link tag only when the argument is not empty?
This general issue crops of often for me and I'd like to avoid doing this
all the time:

<c:choose>
  <c:when test="${!empty linkClass}">
   <stripes:link class="${linkClass}".../>
</c:when>
  <c:otherwise>
    <stripes:link .../>
  </c:otherwise>
</c:choose>

The best I've got so far is

<stripes:link class="${!empty linkClass ? linkClass:' ' }"/>

Which is much better but still not exactly what I want since it outputs an
empty "class" attribute for the empty case.

Thanks!


-- 
Ross Sargant
Software Engineer
p: 954-623-6015 x2108
email: [email protected]

TVR Communications LLC
541 S. State Road 7,Suite 5,Margate, Florida,33068

http://www.tvrc.com
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to