Jack, I've asked for this myself before. I'd still like to see it put in
place - maybe XWork will do it? - but for now, you'll have to add some
custom code in order to get this done. (Maybe I'll write a patch.)

However... I'm not sure your problem as explained needs the solution
you're asking for. Instead of Foo.confPar1, why couldn't you name it
MyJavaAction.confPar1 instead? That way, the action doesn't need to know
how it's invoked.

(The reason *I* want the alias is because it makes programmatic security
trivial. MyAction.class can descend from SecurityCheckAction, which
examines the alias and checks to see that: 1) the alias is restricted, 2)
the user is logged in if it is, and 3) the user can access the alias if
restrictions are in place to that degree... and the action, which really
doesn't care if the user can use it or not, becomes very simple.)

On Sat, 28 Dec 2002, Jack Dawson wrote:

> I'm just learning Webwork, and so far I think it's great. I have one problem though, 
>for which I couldn't find any answer from the documentation nor this list. So I hope 
>someone could be able to help me out here:
>
> I have a java action class MyJavaAction.java (of course I have others too but they 
>are not relevant here) and my views.properties file looks something like this:
>
> Foo.action=MyJavaAction
> Foo.success=page.jsp
> Foo.error=error.jsp
>
> Bar.action=OtherJavaAction
> Bar.success=page2.jsp
> Bar.error=error.jsp
>
> I have another properties file where I'd like to set configurable information for 
>the actions:
> Foo.confPar1=foovalue1
> Foo.confPar2=foovalue2
> Bar.confPar1=barvalue1
> Bar.confPar2=barvalue2
> etc...
>
> Now, what I would need in my MyJavaAction.java is to get the parameter values from 
>the properties file, so I'd need to know the action name "Foo". Is there a way
> of getting the action name?
>
> So what I mean here is that if my action alias is Foo.action, I'd need the name Foo, 
>and if
> my action alias is Bar.action I'd need the name Bar and so on...
>
> Many thanks.
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
>

---------------------------------------------------------
Joseph B. Ottinger                 [EMAIL PROTECTED]
http://enigmastation.com                    IT Consultant



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to