tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Alfors <peter.alf...@irista.com>
Subject Re: Tags nested in Attribute Values
Date Thu, 26 Apr 2001 19:45:37 GMT
It is an admirable goal, but not necessarily an easy one to achieve.
The problem lies (as you pointed out) in the fact that custom tags cannot be
embedded into another one as an attribute.

I think that what you will notice as you move onward is that there are times
when you will want to have a dynamically created attribute for your custom tag.

However, you do have some tricks on your side.  Custom taglibs have the ability
to interact with one another.  A child tag can retrieve attributes that the
parent tag has.
Also, you can use the page/request/etc to store dynamic data that other tags
may need.

You may find yourself writing your own special anchor tag or some other tag to
do what you want.  But in the long run, it is an achievable goal.
You just need to decide how important it is to completely remove all script
from your page.

HTH,
    Pete

Stefan Riegel wrote:

> Hello, to all,
>
> I am not sure, if this is the right list for my question.
>
> My goal is (still a goal, I'am learning JSP), to develop a web application
> by _only_ using JSP Custom Tags and Beans in the JSP Pages. I want to avoid
> Java Scripting.
>
> I noticed the following: JSP Custom Tags can be used as attribute values in
> common HTML. This practice is ugly and not XML but still helpful. In HTML
> one could do for example:
>
>    <form action="<jsp:getAttribute name="pageRef">">
>      ...
>    </form>
>
> It doesn't work with Custom Tags.
>
>    <mytags:myform action='<jsp:getAttribute name="pageRef">'>
>      ...
>    </mytags:myform>
>
> It works with scripting.
>
>    <mytags:myform action= <%=somethingReturningAString()%> >
>      ...
>    </mytags:myform>
>
> (I'am not sure, if all syntax ist correct)
>
> Now my questions to You experienced users and developers:
>
> - Is it very stupid, trying to do what I want to do?
> - Is their a way to do it?
> - How can I avoid Java and scripting in the JSP Pages?
>
> Thanks and regards
> Stefan Riegel

Mime
View raw message