struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felipe Lorenz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4131) RestActionProxyFactory is handling all requests with PrefixBasedActionMapper
Date Mon, 01 Jul 2013 01:43:20 GMT

    [ https://issues.apache.org/jira/browse/WW-4131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13696440#comment-13696440
] 

Felipe Lorenz commented on WW-4131:
-----------------------------------

I use to work with 2.3.8, but the pattern of using s:action tag to populate select or list(i.e)
is the first time. So I can't say which version this behavior starts.
                
> RestActionProxyFactory is handling all requests with PrefixBasedActionMapper
> ----------------------------------------------------------------------------
>
>                 Key: WW-4131
>                 URL: https://issues.apache.org/jira/browse/WW-4131
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - REST
>    Affects Versions: 2.3.12, 2.3.14, 2.3.15
>            Reporter: Felipe Lorenz
>            Priority: Minor
>             Fix For: 2.3.16
>
>
> Using the following configuration:
> {noformat}
> <constant name="struts.mapper.class" value="org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper"/>
> <constant name="struts.mapper.prefixMapping" value=":rest,/ajax:struts,/login:struts"/>
> {noformat}
> Is expected that when I request the following url http://xxxxxxxx.com/ajax/anyThingHere,
struts action proxy should handle this call. But instead, RestActionProxyFactory is handling
this call.
> But the RestActionProxyFactory class has a if, and every time the namespace attribute
is injected with "/ajax" value. So the condition always is redirected to the rest plugin handler
and not to the struts default.
> Here is my ActionProxyFactory implementation:
> {noformat}
> public class CustomActionProxyFactory extends RestActionProxyFactory {
> 	@Override
> 	public ActionProxy createActionProxy(String namespace, String actionName, String methodName,
Map<String, Object> extraContext, boolean executeResult, boolean cleanupContext) {
> 		RestActionProxyFactory p = new RestActionProxyFactory();
> 		p.setContainer(container);
> 		if ("/ajax".equals(namespace)) {
> 			p.setNamespace("/idealogic");
> 		}
> 		return p.createActionProxy(namespace, actionName, methodName, extraContext, executeResult,
cleanupContext);
> 	}
> }
> {noformat}
> By some reason, it fixed the origin behaviour.
> The begin of this issue was that <s:action> tag was rendering the action result,
even with executeResult = false, which is the default value.
> Another observation was that, changing the flush attribute value, the result is rendered
in different parts of the html.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message