Re: ActionErrors in my JSP: how can I rewrite this RT snippet as EL?
Ha, ha - you have to stand firm mate ;-) - having said that if my wife says "down tools" I do too - PDQ! The ActionMessages class and tag are new versions which it seems are there to replace ActionErrors and so I guess they are the future. So far I haven't got round to moving over to them yet but yes, essentially it does the same thing but in a slightly different way. >From what I understand the tag differs in the following ways: * You specify an "id" attribute in which specifies a page scope bean in which the tag will store the current message for each iteration - I believe you then have to use something to write out the message - like * Using the message="true" will display messages stored under the Globals.MESSAGE_KEY constant (rather than the default Globals.ERROR_KEY ) - means you can use it for other messages as well as errors. * uses the "errors.footer" and "errors.header" keys to get the header/footer from the application resources - you can specify these keys using "header" and "footer" attributes on the tag - means you can have different header/footer for different pages. So to do you're example I believe you would have to do the following: rather than As I said, I haven't tried them out yet - maybe someone who uses them can confirm whether this is correct or not. Niall - Original Message - From: "bOOyah" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 23, 2004 12:49 PM Subject: Re: ActionErrors in my JSP: how can I rewrite this RT snippet as EL? > Niall Pemberton wrote: > > > It should be > > > > > > > > > > > > .. or even > > > > > > > > > > Sorry for the delay in replying Niall...my wife MADE ME down tools for a > day. > > Yes, indeed both your suggestions work perfectly. I'm using the 2nd > one. Am I right then in guessing that > > > > > > would display all messages (errors or otherwise)? Is it now that simple? > > What threw me originally is that 'org.apache.struts.action.ERROR' no > longer exists in the online Struts javadocs. So I got embroiled in > following the path of deprecation, and I couldn't get the current > recommendations to work :-( > > Thanks a mill for your help. > > -- > bOOyah > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionErrors in my JSP: how can I rewrite this RT snippet as EL?
Takhar, Sandeep wrote: Craig McLanahan wrote something about this recently. I may be wrong since I haven't done this, but you may need '' quotes around the property since there are '.'s in it. No Sandeep, wrapping single quotes around the property didn't seem to make any difference. Not even wrapping the single quotes in double quotes ;-) Niall's suggestion worked well though. Thanks anyway. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionErrors in my JSP: how can I rewrite this RT snippet as EL?
Niall Pemberton wrote: It should be .. or even Sorry for the delay in replying Niall...my wife MADE ME down tools for a day. Yes, indeed both your suggestions work perfectly. I'm using the 2nd one. Am I right then in guessing that would display all messages (errors or otherwise)? Is it now that simple? What threw me originally is that 'org.apache.struts.action.ERROR' no longer exists in the online Struts javadocs. So I got embroiled in following the path of deprecation, and I couldn't get the current recommendations to work :-( Thanks a mill for your help. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ActionErrors in my JSP: how can I rewrite this RT snippet as EL?
Craig McLanahan wrote something about this recently. I may be wrong since I haven't done this, but you may need '' quotes around the property since there are '.'s in it. sandeep -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 8:52 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: ActionErrors in my JSP: how can I rewrite this RT snippet as EL? It should be .. or even - Original Message - From: "bOOyah" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 22, 2004 1:31 AM Subject: ActionErrors in my JSP: how can I rewrite this RT snippet as EL? > Hi > > I'm displaying validate() ActionErrors in my JSP using the RT > html:errors tag. But I can't seem to be able to successfully rewrite my > snippet of Struts RT in EL. > > This works: > ><%@ page import="org.apache.struts.Globals"%> ><%@ page import="org.apache.struts.action.ActionMessages"%> >... > > > > > > But this doesn't work (using the logic & html EL taglibs): > ><%@ page import="org.apache.struts.Globals"%> ><%@ page import="org.apache.struts.action.ActionMessages"%> >... > > property="org.apache.struts.action.ActionMessages.GLOBAL_MESSAGE"/> > > > > > Can anyone help? > > Thanks > -- > bOOyah > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionErrors in my JSP: how can I rewrite this RT snippet as EL?
It should be .. or even - Original Message - From: "bOOyah" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 22, 2004 1:31 AM Subject: ActionErrors in my JSP: how can I rewrite this RT snippet as EL? > Hi > > I'm displaying validate() ActionErrors in my JSP using the RT > html:errors tag. But I can't seem to be able to successfully rewrite my > snippet of Struts RT in EL. > > This works: > ><%@ page import="org.apache.struts.Globals"%> ><%@ page import="org.apache.struts.action.ActionMessages"%> >... > > > > > > But this doesn't work (using the logic & html EL taglibs): > ><%@ page import="org.apache.struts.Globals"%> ><%@ page import="org.apache.struts.action.ActionMessages"%> >... > > property="org.apache.struts.action.ActionMessages.GLOBAL_MESSAGE"/> > > > > > Can anyone help? > > Thanks > -- > bOOyah > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ActionErrors in my JSP: how can I rewrite this RT snippet as EL?
Hi I'm displaying validate() ActionErrors in my JSP using the RT html:errors tag. But I can't seem to be able to successfully rewrite my snippet of Struts RT in EL. This works: <%@ page import="org.apache.struts.Globals"%> <%@ page import="org.apache.struts.action.ActionMessages"%> ... But this doesn't work (using the logic & html EL taglibs): <%@ page import="org.apache.struts.Globals"%> <%@ page import="org.apache.struts.action.ActionMessages"%> ... Can anyone help? Thanks -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]