Hi Martin, yes I trimmed down an existing piece of code and didn't rationalise it completely.
I know that I can get this to work with existing taglibs. My question is more about is there a better way? If there was a taglib that allowed you to put EL expressions in standard html tags, I could satisfy requirements such as my example in a much more elegant way. I'm sure it wouldn't be much work to implement standard html taglibs with EL functionality. I'm surprised it doesn't exist already. Or does it..? Thanks, Pat -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Martin Cooper Sent: 27 October 2005 16:59 To: Tag Libraries Developers List Subject: Re: html taglibs On 10/27/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi all, > > apologies if this is an old question, but I've looked around and can't > seem > to find what I want. > > I'm trying to find a taglib which will allow me to write standard html > tags, > with the facility to use EL within the attributes. For example, in order > to > get a label assigned to a checkbox within an iterator tag I would like to > use something like this: > > <c:forEach var="item" items="${container.list}" varStatus="iStatus"> > <html-el:checkbox name="item" styleId="cb${cStatus.count}" > property="status" indexed="true" value="on" /> > <xhtml-el:label for="cb${cStatus.count}"/> > <c:out value="${item.label}" /> > </xhtml-el:label> > </c:forEach> If the above doesn't work, it's probably because you're mixing literals and expressions in your attribute values, and you appear to be referencing 'cStatus' after defining 'iStatus'. So, for example: styleId="cb${cStatus.count}" --> styleId='${"cb" + iStatus.count}' -- Martin Cooper I have a similar need to control a <div> and other html tags in this way > > Does anyone know of a taglib that will satisfy this need. If not, do you > think there would be backing for creating a new taglib project for one. > > Thanks, > Pat > > This e-mail and any attachments are confidential and intended solely > for the addressee and may also be privileged or exempt from disclosure > under applicable law. If you are not the addressee, or have received > this e-mail in error, please notify the sender immediately, delete it > from your system and do not copy, disclose or otherwise act upon any > part of this e-mail or its attachments.. > > Internet communications are not guaranteed to be secure or virus-free. > The Barclays Group does not accept responsibility for any loss arising > from unauthorised access to, or interference with, any Internet > communications by any third party, or from the transmission of any > viruses. Replies to this e-mail may be monitored by the Barclays > Group for operational or business reasons.. > > Any opinion or other information in this e-mail or its attachments > that does not relate to the business of the Barclays Group is personal > to the sender and is not given or endorsed by the Barclays Group. > > Barclays Bank PLC.Registered in England and Wales (registered no. > 1026167). > Registered Office: 1 Churchill Place, London, E14 5HP, United Kingdom. > > Barclays Bank PLC is authorised and regulated by the Financial Services > Authority. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > This e-mail and any attachments are confidential and intended solely for the addressee and may also be privileged or exempt from disclosure under applicable law. If you are not the addressee, or have received this e-mail in error, please notify the sender immediately, delete it from your system and do not copy, disclose or otherwise act upon any part of this e-mail or its attachments.. Internet communications are not guaranteed to be secure or virus-free. The Barclays Group does not accept responsibility for any loss arising from unauthorised access to, or interference with, any Internet communications by any third party, or from the transmission of any viruses. Replies to this e-mail may be monitored by the Barclays Group for operational or business reasons.. Any opinion or other information in this e-mail or its attachments that does not relate to the business of the Barclays Group is personal to the sender and is not given or endorsed by the Barclays Group. Barclays Bank PLC.Registered in England and Wales (registered no. 1026167). Registered Office: 1 Churchill Place, London, E14 5HP, United Kingdom. Barclays Bank PLC is authorised and regulated by the Financial Services Authority. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
