struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dean Pullen" <dean.pul...@msp-uk.com>
Subject RE: Struts 2 Portlet Validation Problems
Date Mon, 09 Feb 2009 18:06:00 GMT
Rechecking and it seems none of them use a redirect as the input either,
which is the main test case I'm after really.

-----Original Message-----
From: Nils-Helge Garli Hegvik [mailto:nilsga@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.pullen@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:nilsga@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.pullen@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-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


Mime
View raw message