> From: news [mailto:[EMAIL PROTECTED]] On Behalf Of Davor Cengija
> Justin Ashworth wrote:
>
> >
> > Thanks, but that's not quite what I'm trying to do. It is more like
> > this:
> >
> > <c:if test="condition">
> > <html:form...>
> > </c:if>
> > ... JSP code ...
> >
> > <c:if test="condition">
> > <!-- All form elements would be enclosed in this condition. -->
> > <html:text ...>
> > </c:if>
> >
> > ... JSP code ...
> > <c:if test="condition">
> > </html:form>
> > </c:if>
>
> Might sound silly, but why not
>
> > ... JSP code ...
> >
> > <c:if test="condition">
> > <html:form...>
> > <!-- All form elements would be enclosed in this condition. -->
> > <html:text ...>
> > </html:form>
> > </c:if>
> >
> > ... JSP code ...
Perhaps I've over-simplified my example. It is more like this...
<c:if test="condition">
<html:form...>
</c:if>
<c:forEach ...>
... JSP code ...
<c:if test="condition">
<!-- All form elements would be enclosed in this condition.
-->
<html:text...>
</c:if>
... JSP code ...
</c:forEach>
<c:if test="condition">
</html:form...>
</c:if>
The difference in this example (which is more representative of my
actual situation) is that there is a form which needs to span all of the
form elements generated within an inner loop. The only reason I don't
want a form under ALL conditions is that I would have to create some
dummy, empty form as a workaround. To me that seems like a hack -
something which I would like to avoid. It's beginning to look like
there is no elegant way to solve my problem.
> > This seems like a limitation of JSP
> > and/or Struts...
> >
>
> JSP's limitations, I'd say, since JSP needs to be a valid xml
> document.
True. Even though my code would work logically, it can't be done
technically. It would be nice if Struts allowed a test condition on
certain tags, but maybe that in and of itself is a hack.
Thanks,
Justin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]