You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "McDowell, Paula" <Pa...@SUG.com> on 2009/04/23 18:16:07 UTC

HTML:errors

All,

Is there a way to check the <html:errors/> field in the jsp for not empty?  I only want to display an html group if the errors field is empty.  I'm using Struts 1.1.

Thanks,
Paula

Private and confidential as detailed here: http://www.sug.com/disclaimers/default.htm#Mail . If you cannot access the link, please e-mail sender.

RE: HTML:errors

Posted by "McDowell, Paula" <Pa...@SUG.com>.
Thanks, this works for my needs.

Paula

-----Original Message-----
From: Dave Newton [mailto:newton.dave@yahoo.com]
Sent: Friday, April 24, 2009 2:57 PM
To: Struts Users Mailing List
Subject: Re: HTML:errors

McDowell, Paula wrote:
> So is "Globals" a session bean with constant variable ERROR_KEY?

No, the value of Globals.ERROR_KEY names a session bean.

http://struts.apache.org/1.2.x/userGuide/struts-html.html#messages

Dave


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


Private and confidential as detailed here: http://www.sug.com/disclaimers/default.htm#Mail . If you cannot access the link, please e-mail sender.

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


Re: HTML:errors

Posted by Dave Newton <ne...@yahoo.com>.
McDowell, Paula wrote:
> So is "Globals" a session bean with constant variable ERROR_KEY?

No, the value of Globals.ERROR_KEY names a session bean.

http://struts.apache.org/1.2.x/userGuide/struts-html.html#messages

Dave


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


RE: HTML:errors

Posted by "McDowell, Paula" <Pa...@SUG.com>.
Thanks, for your response.

So is "Globals" a session bean with constant variable ERROR_KEY?

Thanks,
Paula

-----Original Message-----
From: Lukasz Lenart [mailto:lukasz.lenart@googlemail.com]
Sent: Thursday, April 23, 2009 12:51 PM
To: Struts Users Mailing List
Subject: Re: HTML:errors

2009/4/23 McDowell, Paula <Pa...@sug.com>:
> Is there a way to check the <html:errors/> field in the jsp for not empty?  I only want to display an html group if the errors field is empty.  I'm using Struts 1.1.

I've been using such structure:
<logic:messagesPresent name="<%=Globals.ERROR_KEY%>">
<table width="480" id="ErrorsTableId" class="ErrorsTable">
  <tr>
    <td width="100%" align="right">
      <a href="JavaScript: void(0)" onclick="JavaScript: return hideErrors();">
      <html:image bundle="IMAGES" srcKey="image.close" /></a>
    </td>
  </tr>
    <html:messages id="error" name="<%=Globals.ERROR_KEY%>">
  <tr>
    <td><bean:write name="error" /></td>
  </tr>
</html:messages>
</table>
</logic:messagesPresent>


Regards
--
Lukasz
http://www.lenart.org.pl/

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


Private and confidential as detailed here: http://www.sug.com/disclaimers/default.htm#Mail . If you cannot access the link, please e-mail sender.

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


Re: HTML:errors

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/4/23 McDowell, Paula <Pa...@sug.com>:
> Is there a way to check the <html:errors/> field in the jsp for not empty?  I only want to display an html group if the errors field is empty.  I'm using Struts 1.1.

I've been using such structure:
<logic:messagesPresent name="<%=Globals.ERROR_KEY%>">
<table width="480" id="ErrorsTableId" class="ErrorsTable">
  <tr>
    <td width="100%" align="right">
      <a href="JavaScript: void(0)" onclick="JavaScript: return hideErrors();">
      <html:image bundle="IMAGES" srcKey="image.close" /></a>
    </td>
  </tr>
    <html:messages id="error" name="<%=Globals.ERROR_KEY%>">
  <tr>
    <td><bean:write name="error" /></td>
  </tr>
</html:messages>
</table>
</logic:messagesPresent>


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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