You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by kalyan inuganti <bu...@yahoo.com> on 2004/08/24 07:02:34 UTC

Nested Tags Question

Hi,
I have some thing like - 

<c:choose>
			        <c:when test='${registrationForm.dobYear !=
""}'>
			            <date:complete monthName="dobMonth"
dayName="dobDay" yearName="dobYear" dayValue="<c:out
value='${registrationForm.dobDay}'/>"
monthValue="<c:out
value='${registrationForm.dobMonth}'/>"
yearValue="<c:out
value='${registrationForm.dobYear}'/>" /> 
			        </c:when>
			       <c:otherwise>
			            <date:complete monthName="dobMonth"
dayName="dobDay" yearName="dobYear" /> 
			       </c:otherwise>
			    </c:choose>
However, the value that is being passed to the
date:complete tag for dayValue, monthValue, and
yearValue are the exact strings eg. <c:out
value='${registrationForm.dobMonth}'/>. If i print the
same thing out on the page it prints the value. It
looks pretty obvious to me that nesting the tags is
blocking interpretation of the inner tag. Any
suggestions please?

Thanks,
-kalyan



		
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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


Re: Nested Tags Question

Posted by Kris Schneider <kr...@dotech.com>.
For JSP 1.2 and earlier, <rtexprvalue> means an attribute can take an expression
of the form <%= ... %> as its value. It's not until JSP 2.0 that the container
provides the same level of built-in support for EL expressions. If you want to
use EL expressions for attribute values in your own tags you have to handle it
yourself and set <rtexprvalue> to false. See the following for an example:

http://www.onjava.com/pub/a/onjava/2002/10/30/jstl3.html

Quoting kalyan inuganti <bu...@yahoo.com>:

> Guys - Thanks for the response but in the below
> example,
> 
> <c:set var="aux"><thevaluetag/></c:set>
> <othertag attibute="${aux}"/>
> 
> the othertag is literally taking the String "${aux}"
> instead of its value. I do have
> <rtexprvalue>true</rtexprvalue> for that particular
> attribute set. Any thoughts?
> 
> Thanks
> 
> --- Kris Schneider <kr...@dotech.com> wrote:
> 
> > Yes. In that case, "aux" will be a page-scoped
> > variable whose value is the
> > result of trimming the string produced by the
> > <thevaluetag/> tag.
> > 
> > Quoting Helios Alonso <ha...@atg.com.uy>:
> > 
> > > Would it work?
> > > 
> > > <c:set var="aux"><thevaluetag/></c:set>
> > > <othertag attibute="${aux}"/>
> > > 
> > > At 08:18 24/08/2004 -0400, you wrote:
> > > >You can't use one tag as an attribute value for
> > another tag...
> > > >
> > > >Quoting kalyan inuganti <bu...@yahoo.com>:
> > > >
> > > > > Hi,
> > > > > I have some thing like -
> > > > >
> > > > > <c:choose>
> > > > >                               <c:when
> > test='${registrationForm.dobYear
> > > !=
> > > > > ""}'>
> > > > >                                  
> > <date:complete monthName="dobMonth"
> > > > > dayName="dobDay" yearName="dobYear"
> > dayValue="<c:out
> > > > > value='${registrationForm.dobDay}'/>"
> > > > > monthValue="<c:out
> > > > > value='${registrationForm.dobMonth}'/>"
> > > > > yearValue="<c:out
> > > > > value='${registrationForm.dobYear}'/>" />
> > > > >                               </c:when>
> > > > >                              <c:otherwise>
> > > > >                                  
> > <date:complete monthName="dobMonth"
> > > > > dayName="dobDay" yearName="dobYear" />
> > > > >                              </c:otherwise>
> > > > >                           </c:choose>
> > > > > However, the value that is being passed to the
> > > > > date:complete tag for dayValue, monthValue,
> > and
> > > > > yearValue are the exact strings eg. <c:out
> > > > > value='${registrationForm.dobMonth}'/>. If i
> > print the
> > > > > same thing out on the page it prints the
> > value. It
> > > > > looks pretty obvious to me that nesting the
> > tags is
> > > > > blocking interpretation of the inner tag. Any
> > > > > suggestions please?
> > > > >
> > > > > Thanks,
> > > > > -kalyan
> > > >
> > > >--
> > > >Kris Schneider <ma...@dotech.com>
> > > >D.O.Tech       <http://www.dotech.com/>
> > 
> > -- 
> > Kris Schneider <ma...@dotech.com>
> > D.O.Tech       <http://www.dotech.com/>

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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


Re: Nested Tags Question

Posted by kalyan inuganti <bu...@yahoo.com>.
Guys - Thanks for the response but in the below
example,

<c:set var="aux"><thevaluetag/></c:set>
<othertag attibute="${aux}"/>

the othertag is literally taking the String "${aux}"
instead of its value. I do have
<rtexprvalue>true</rtexprvalue> for that particular
attribute set. Any thoughts?

Thanks

--- Kris Schneider <kr...@dotech.com> wrote:

> Yes. In that case, "aux" will be a page-scoped
> variable whose value is the
> result of trimming the string produced by the
> <thevaluetag/> tag.
> 
> Quoting Helios Alonso <ha...@atg.com.uy>:
> 
> > Would it work?
> > 
> > <c:set var="aux"><thevaluetag/></c:set>
> > <othertag attibute="${aux}"/>
> > 
> > At 08:18 24/08/2004 -0400, you wrote:
> > >You can't use one tag as an attribute value for
> another tag...
> > >
> > >Quoting kalyan inuganti <bu...@yahoo.com>:
> > >
> > > > Hi,
> > > > I have some thing like -
> > > >
> > > > <c:choose>
> > > >                               <c:when
> test='${registrationForm.dobYear
> > !=
> > > > ""}'>
> > > >                                  
> <date:complete monthName="dobMonth"
> > > > dayName="dobDay" yearName="dobYear"
> dayValue="<c:out
> > > > value='${registrationForm.dobDay}'/>"
> > > > monthValue="<c:out
> > > > value='${registrationForm.dobMonth}'/>"
> > > > yearValue="<c:out
> > > > value='${registrationForm.dobYear}'/>" />
> > > >                               </c:when>
> > > >                              <c:otherwise>
> > > >                                  
> <date:complete monthName="dobMonth"
> > > > dayName="dobDay" yearName="dobYear" />
> > > >                              </c:otherwise>
> > > >                           </c:choose>
> > > > However, the value that is being passed to the
> > > > date:complete tag for dayValue, monthValue,
> and
> > > > yearValue are the exact strings eg. <c:out
> > > > value='${registrationForm.dobMonth}'/>. If i
> print the
> > > > same thing out on the page it prints the
> value. It
> > > > looks pretty obvious to me that nesting the
> tags is
> > > > blocking interpretation of the inner tag. Any
> > > > suggestions please?
> > > >
> > > > Thanks,
> > > > -kalyan
> > >
> > >--
> > >Kris Schneider <ma...@dotech.com>
> > >D.O.Tech       <http://www.dotech.com/>
> 
> -- 
> Kris Schneider <ma...@dotech.com>
> D.O.Tech       <http://www.dotech.com/>
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> taglibs-user-help@jakarta.apache.org
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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


Re: Nested Tags Question

Posted by Kris Schneider <kr...@dotech.com>.
Yes. In that case, "aux" will be a page-scoped variable whose value is the
result of trimming the string produced by the <thevaluetag/> tag.

Quoting Helios Alonso <ha...@atg.com.uy>:

> Would it work?
> 
> <c:set var="aux"><thevaluetag/></c:set>
> <othertag attibute="${aux}"/>
> 
> At 08:18 24/08/2004 -0400, you wrote:
> >You can't use one tag as an attribute value for another tag...
> >
> >Quoting kalyan inuganti <bu...@yahoo.com>:
> >
> > > Hi,
> > > I have some thing like -
> > >
> > > <c:choose>
> > >                               <c:when test='${registrationForm.dobYear
> !=
> > > ""}'>
> > >                                   <date:complete monthName="dobMonth"
> > > dayName="dobDay" yearName="dobYear" dayValue="<c:out
> > > value='${registrationForm.dobDay}'/>"
> > > monthValue="<c:out
> > > value='${registrationForm.dobMonth}'/>"
> > > yearValue="<c:out
> > > value='${registrationForm.dobYear}'/>" />
> > >                               </c:when>
> > >                              <c:otherwise>
> > >                                   <date:complete monthName="dobMonth"
> > > dayName="dobDay" yearName="dobYear" />
> > >                              </c:otherwise>
> > >                           </c:choose>
> > > However, the value that is being passed to the
> > > date:complete tag for dayValue, monthValue, and
> > > yearValue are the exact strings eg. <c:out
> > > value='${registrationForm.dobMonth}'/>. If i print the
> > > same thing out on the page it prints the value. It
> > > looks pretty obvious to me that nesting the tags is
> > > blocking interpretation of the inner tag. Any
> > > suggestions please?
> > >
> > > Thanks,
> > > -kalyan
> >
> >--
> >Kris Schneider <ma...@dotech.com>
> >D.O.Tech       <http://www.dotech.com/>

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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


Re: Nested Tags Question

Posted by Helios Alonso <ha...@atg.com.uy>.
Would it work?

<c:set var="aux"><thevaluetag/></c:set>
<othertag attibute="${aux}"/>

At 08:18 24/08/2004 -0400, you wrote:
>You can't use one tag as an attribute value for another tag...
>
>Quoting kalyan inuganti <bu...@yahoo.com>:
>
> > Hi,
> > I have some thing like -
> >
> > <c:choose>
> >                               <c:when test='${registrationForm.dobYear !=
> > ""}'>
> >                                   <date:complete monthName="dobMonth"
> > dayName="dobDay" yearName="dobYear" dayValue="<c:out
> > value='${registrationForm.dobDay}'/>"
> > monthValue="<c:out
> > value='${registrationForm.dobMonth}'/>"
> > yearValue="<c:out
> > value='${registrationForm.dobYear}'/>" />
> >                               </c:when>
> >                              <c:otherwise>
> >                                   <date:complete monthName="dobMonth"
> > dayName="dobDay" yearName="dobYear" />
> >                              </c:otherwise>
> >                           </c:choose>
> > However, the value that is being passed to the
> > date:complete tag for dayValue, monthValue, and
> > yearValue are the exact strings eg. <c:out
> > value='${registrationForm.dobMonth}'/>. If i print the
> > same thing out on the page it prints the value. It
> > looks pretty obvious to me that nesting the tags is
> > blocking interpretation of the inner tag. Any
> > suggestions please?
> >
> > Thanks,
> > -kalyan
>
>--
>Kris Schneider <ma...@dotech.com>
>D.O.Tech       <http://www.dotech.com/>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-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


Re: Nested Tags Question

Posted by Kris Schneider <kr...@dotech.com>.
You can't use one tag as an attribute value for another tag...

Quoting kalyan inuganti <bu...@yahoo.com>:

> Hi,
> I have some thing like - 
> 
> <c:choose>
> 			        <c:when test='${registrationForm.dobYear !=
> ""}'>
> 			            <date:complete monthName="dobMonth"
> dayName="dobDay" yearName="dobYear" dayValue="<c:out
> value='${registrationForm.dobDay}'/>"
> monthValue="<c:out
> value='${registrationForm.dobMonth}'/>"
> yearValue="<c:out
> value='${registrationForm.dobYear}'/>" /> 
> 			        </c:when>
> 			       <c:otherwise>
> 			            <date:complete monthName="dobMonth"
> dayName="dobDay" yearName="dobYear" /> 
> 			       </c:otherwise>
> 			    </c:choose>
> However, the value that is being passed to the
> date:complete tag for dayValue, monthValue, and
> yearValue are the exact strings eg. <c:out
> value='${registrationForm.dobMonth}'/>. If i print the
> same thing out on the page it prints the value. It
> looks pretty obvious to me that nesting the tags is
> blocking interpretation of the inner tag. Any
> suggestions please?
> 
> Thanks,
> -kalyan

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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