struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From G√ľnther Wieser <gwie...@creative-it.com>
Subject RE: Tags in the body of other tags
Date Fri, 04 Mar 2005 16:07:39 GMT
yes, it's not possible to open a tag within the body of another tag and
close it somewhere else.
look at the tag lifecycle in the j2ee api doc and then you'll understand
why. shortly spoken: tags can only be nested in a hierarchy.

kr,
guenther 

-----Original Message-----
From: Slattery, Tim - BLS [mailto:Slattery.Tim@bls.gov] 
Sent: Friday, March 04, 2005 5:03 PM
To: Struts User List (struts-user@jakarta.apache.org)
Subject: Tags in the body of other tags

In my JSP I want to conditionally make an image and some text into a
hyperlink, depending on conditions. So I've written this code:

     <c:if test="${HistoryBean.noPayGroups == 2}">
        <html-el:link
href="entryForm.do?respondent=${HistoryBean.respondent}&payGroup=1">
     </c:if>
     <html-el:img page="/images/step1a.jpg"/><br>
     Pay Group 1
     <c:if test="${HistoryBean.noPayGroup == 2}">
       </html-el:link>
     </c:if>

I'm getting a syntax error, pointing to the first </c:if> line. I don't see
any syntax problems. Is it impermissible to open a tag within the body of
another tag, but not close it there?


--
Tim Slattery
Slattery_T@bls.gov


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




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


Mime
View raw message