« Return to Thread: custom tag: using el inside el

Re: custom tag: using el inside el

by Mike_ :: Rate this Message:

Reply to Author | View in Thread

Hi

Have you tried :
#{param['id'] == itemid ? 'selected':'unselected'}
or
#{param['id'] eq itemid ? 'selected':'unselected'}

Micke

2009/5/22 smilysep <seproyal@...>

hi all,

iam trying to make a facelets tag which should render a link which style
should be depending on a request param. to avoid copy paste code it whould
be nice to handle this via a facelets tag. Here is what i want to do in a
tag named categoryItem:

<ui:composition>
       <h:outputLink
styleClass="#{param['id']==${itemid}?'selected':'unselected'}">
               <f:param name="id" value="${itemid}" />
               <h:outputText value="${itemvalue}" />
       </h:outputLink>
</ui:composition>

the call whould be something like this:
<a:categoryItem itemid="3" itemvalue="LinkValue1"/>

if i run this it says:
javax.servlet.ServletException: Error Parsing:
#{param['id']==${itemid}?'selected':'unselected'}

I dont wonder about this error message but does anyone know if it is
possible to do something like this?

thanks for guesses
--
View this message in context: http://www.nabble.com/custom-tag%3A-using-el-inside-el-tp23676678p23676678.html
Sent from the java.net - facelets users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


 « Return to Thread: custom tag: using el inside el