Hi,

There is no easy way right now, you can try to implement
UnknownHandler or at least extend ConventionUnknownHandler and
override handleUnknownResult() method


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/


2012/11/24 Ken McWilliams <ken.mcwilli...@gmail.com>:
> Using struts2-convention-plugin-2.3.1.2 currently.
>
> I want conventions to still automatically find my actions, that is
> determine  struts2 packages from java package structure and Identify action
> names from Java Action classes, but I want it to stop there I want it to
> universally use my custom result type for all actions.
>
> So far I have tried the following:
>
> 1) Explicitly setting the conventions parent package
> <constant name="struts.convention.default.parent.package"
> value="tiles-package"/>
>
> 2) Configuring that package with my result as the default
>
>     <package  name="tiles-package" extends="convention-default">
>         <result-types>
>             <result-type default="true" name="tiles"
> class="com.kenmcwilliams.tiles.result.TilesResult"/>
>         </result-types>
>     </package>
>
> So far I can only get my result to take effect if I override conventions
> with annotations.
>
> So far the following works:
>
> package com.kenmcwilliams.employmentsystem.action.test;
>
> import com.opensymphony.xwork2.ActionSupport;
> import org.apache.struts2.convention.annotation.Result;
>
> @Result(type="tiles")
> public class TilesAction extends ActionSupport{
>
> }
>
> The tiles result checks the location parameter which if not specified in
> the result annotation it will look up the namespace and action name, then
> using tiles regexp convention can be carried on through tiles.
>
> My current issue is dropping the need for '
> @Result(type="tiles")' on every class. Any advice?
>
> Further I've created my own ConventionsServiceImpl if that helps, all it
> currently does is print incoming parameters and return values to logs. I
> haven't really been able to figure out what I can use it for.

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

Reply via email to