You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by AntonyJB <an...@bigfoot.com> on 2007/07/09 11:16:53 UTC

Action names unique across packages? Why?

OK. Maybe I'm expecting too much or haven't come across the right Struts
property but...
In the following snippet, I'm not expecting the 1st 'list' action to be
overridden by the 2nd. But that's what is happening.

    <package name="A/BBBB" extends="tiles-default">
        <action name="list" class="myAction">
            <result type="tiles" name="success">detail.layout</result>
        </action>
    </package>

    <package name="A/CCCC" extends="tiles-default">
        <action name="list" class="myAction">
            <result type="tiles" name="success">detail.layout</result>
        </action>
    </package>


I'm off to venture in Struts core code to see if these actions are stored in
a shared hash, and not package-bound.

If you can confirm this is expected behaviour though, that's be great :)
Thanks,
Ant

-- 
View this message in context: http://www.nabble.com/Action-names-unique-across-packages--Why--tf4048103.html#a11498441
Sent from the Struts - User mailing list archive at Nabble.com.


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


RE: Action names unique across packages? Why?

Posted by AntonyJB <an...@bigfoot.com>.
Yep, that's exactly right!
I suspect moving from Struts 1 I hadn't explored the namespace config!

I did want the same action name to be used across directories and
"namespace" was the missing piece :)

Thanks for your prompt response.
Ant



Wesley Wannemacher wrote:
> 
> Maybe I am reading your question wrong, but I can't see why you would
> want to do that... Struts2 will have to pick one or the other. Perhaps
> maybe you are looking for the "namespace" attribute? 
> 
> http://struts.apache.org/2.x/docs/namespace-configuration.html
> 
> -Wes
> 
> --
> Discussion of Struts2, Spring, & Hibernate - http://www.wantii.com 
> 
> -----Original Message-----
> From: AntonyJB [mailto:antonyb@bigfoot.com] 
> Sent: Monday, July 09, 2007 5:17 AM
> To: user@struts.apache.org
> Subject: Action names unique across packages? Why?
> 
> 
> OK. Maybe I'm expecting too much or haven't come across the right Struts
> property but...
> In the following snippet, I'm not expecting the 1st 'list' action to be
> overridden by the 2nd. But that's what is happening.
> 
>     <package name="A/BBBB" extends="tiles-default">
>         <action name="list" class="myAction">
>             <result type="tiles" name="success">detail.layout</result>
>         </action>
>     </package>
> 
>     <package name="A/CCCC" extends="tiles-default">
>         <action name="list" class="myAction">
>             <result type="tiles" name="success">detail.layout</result>
>         </action>
>     </package>
> 
> 
> I'm off to venture in Struts core code to see if these actions are
> stored in a shared hash, and not package-bound.
> 
> If you can confirm this is expected behaviour though, that's be great :)
> Thanks, Ant
> 
> --
> View this message in context:
> http://www.nabble.com/Action-names-unique-across-packages--Why--tf404810
> 3.html#a11498441
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Action-names-unique-across-packages--Why--tf4048103.html#a11502359
Sent from the Struts - User mailing list archive at Nabble.com.


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