You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Christoph Kutzinski <ku...@gmx.de> on 2004/03/23 18:50:58 UTC
Displaying Content only if form errors are present
Hi,
I'm trying to display a piece of HTML only if the previous form submit
create an ActionError. This is what I got so far:
<logic:present name="<%=org.apache.struts.Globals.ERROR_KEY%>">
<td class="error"><html:errors property="company" /></td>
</logic:present>
<td>Company:</td><td><html:text property="company"/></td>
this works, but seems not the "cleanest" way to do this to me.
Does anyone know a better way, e.g. a custom tag for this.
BTW I tried this with JSTL core, too, but couldn't get it to work:
<c:if test="${!empty $org.apache.struts.action.ERROR}">
evaluates always to false.
Does anyone know how to get this to work with JSTL?
thanks in advance,
Christoph
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org