You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by pa...@barclays.co.uk on 2005/10/27 14:25:28 UTC

html taglibs

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>

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: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org


Re: html taglibs

Posted by Martin Cooper <ma...@apache.org>.
On 10/27/05, pat.turner@barclays.co.uk <pa...@barclays.co.uk> 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: taglibs-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org
>
>