tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Goodenough <david.goodeno...@btconnect.com>
Subject Re: html taglibs
Date Fri, 28 Oct 2005 08:25:03 GMT
Either I have completely misunderstood your problem or this already exists 
providing you are using the right level of JSP.  I do not know what container
you are using, but with Tomcat, 4.x and before did not allow this, 5.x does.

You also rarely need <c:out> these days, you just put the EL expression in
the text.  It can also be put in attributes.  The only time you have to be
careful is in writing your own tags.  I had some tags which I had written
the support code myself, and in the old setup I had to say that EL was 
allowed for its parameters and then call upon EL handler functions to 
translate the expressions.  I had to take all that code out for the new
Tomcat as the expressions have already been resolved.

David

On Friday 28 October 2005 08:49, pat.turner@barclays.co.uk wrote:
> 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: mfncooper@gmail.com [mailto:mfncooper@gmail.com]On Behalf Of
> Martin Cooper
> Sent: 27 October 2005 16:59
> To: Tag Libraries Developers List
> Subject: Re: html taglibs
>
> On 10/27/05, pat.turner@barclays.co.uk <pat.turner@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
>
> 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

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message