This should be handled by the default portlet interceptor stack. If it doesn't, it's a bug...
Nils-H On Mon, Feb 9, 2009 at 8:19 PM, Musachy Barroso <musa...@gmail.com> wrote: > Messages will be lost if a redirectAction is used, unless the > MessageStoreInterceptor is used, or is that different in portlets > Nils? > > musachy > > On Mon, Feb 9, 2009 at 1:54 PM, Dean Pullen <dean.pul...@msp-uk.com> wrote: >> I can confirm that using validation xml instead of annotations does >> exactly the same thing. >> >> i.e. a forward to a JSP will display the messages, a redirectAction type >> result will 'lose' the messages during the dispatch. >> >> Dean. >> >> -----Original Message----- >> From: Nils-Helge Garli Hegvik [mailto:nil...@gmail.com] >> Sent: 09 February 2009 18:07 >> To: Struts Users Mailing List >> Subject: Re: Struts 2 Portlet Validation Problems >> >> Yeah, you're right... It's not using annotations. Have you tried with >> xml validation? It's not a solution, but at least it will narrow down >> the problem. >> >> Nils-H >> >> On Mon, Feb 9, 2009 at 7:00 PM, Dean Pullen <dean.pul...@msp-uk.com> >> wrote: >>> Nils-H, >>> >>> Thanks for the reply. >>> >>> I've looked at them - none of them actually use the annotations as >> such. >>> >>> It's definitely not working with or without MessageStoreInterceptor >> when >>> you utilise a redirect - it's absolutely fine if you simply replace >> the >>> redirect with a simple JSP result. >>> >>> Dean. >>> >>> -----Original Message----- >>> From: Nils-Helge Garli Hegvik [mailto:nil...@gmail.com] >>> Sent: 09 February 2009 17:57 >>> To: Struts Users Mailing List >>> Subject: Re: Struts 2 Portlet Validation Problems >>> >>> Have you tried installing the portlet sample app? I believe there are >>> a couple of validation scenarios there. As far as I know, it should >>> work. You shouldn't even need the MessageStoreInterceptor, since the >>> portlet default stack should handle preserving messages across >>> redirects. >>> >>> Nils-H >>> >>> On Mon, Feb 9, 2009 at 6:33 PM, Dean Pullen <dean.pul...@msp-uk.com> >>> wrote: >>>> Hi all, >>>> >>>> >>>> >>>> We've been trying to get validation (using annotations) working >> within >>> a >>>> Struts Portlet for a couple of days - without success, when the input >>> is >>>> a redirectAction. >>>> >>>> When the input result is a JSP, it works fine. We're using the >>>> messageStoreInterceptor. >>>> >>>> >>>> >>>> We're using JBoss Portal 2.7.1 and Struts 2.1.6. >>>> >>>> >>>> >>>> It seems we're correctly directed back to the input when Validation >>>> isn't passed, but we cannot pick up the error messages using the >> usual >>>> tags: >>>> >>>> <s:actionerror /> >>>> >>>> <s:fielderror /> >>>> >>>> >>>> >>>> We're utilising the portletDefaultStack and our Portlet package is >>>> extending struts-portlet-default. Our package has no name-space set. >>>> >>>> >>>> >>>> >>>> >>>> For example this is the view, which is the input of the edit action: >>>> >>>> <action name="ItemView" class="com.msp.portlets.ItemAction"> >>>> >>>> <interceptor-ref >>>> name="portletDefaultStack"/> >>>> >>>> >>>> <interceptor-ref >>>> name="messageStoreInterceptor"> >>>> >>>> <param >>>> name="operationMode">RETRIEVE</param> >>>> >>>> </interceptor-ref> >>>> >>>> >>>> <result>/WEB-INF/jsp/welcome/admin/item.jsp</result> >>>> >>>> </action> >>>> >>>> >>>> >>>> This is the edit action: >>>> >>>> <action name="ItemEdit" class="com.msp.portlets. ItemAction" >>>> method="itemEdit"> >>>> >>>> <interceptor-ref >>>> name="portletDefaultStack"/> >>>> >>>> <interceptor-ref >>>> name="messageStoreInterceptor"> >>>> >>>> <param >>>> name="operationMode">STORE</param> >>>> >>>> </interceptor-ref> >>>> >>>> >>>> <result >>>> type="redirectAction" name="success"> >>>> >>>> <param >>>> name="actionName">ItemView</param> >>>> >>>> <param >>>> name="itemId">${itemId}</param> >>>> >>>> </result> >>>> >>>> <result >>>> type="redirectAction" name="input"> >>>> >>>> <param >>>> name="actionName"> ItemView </param> >>>> >>>> </result> >>>> >>>> </action> >>>> >>>> >>>> >>>> Does anyone know what the problem could be? >>>> >>>> >>>> >>>> Thanks in advance. >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>> For additional commands, e-mail: user-h...@struts.apache.org >>> >>> >>> Scanned by MailDefender - managed email security from intY - >>> www.maildefender.net >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>> For additional commands, e-mail: user-h...@struts.apache.org >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >> Scanned by MailDefender - managed email security from intY - >> www.maildefender.net >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > > > > -- > "Hey you! Would you help me to carry the stone?" Pink Floyd > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org