Re: shorcuts for gettting/using static field/method
guillaume <[email protected]>
| Newsgroups | gmane.comp.java.open-symphony.webwork |
|---|---|
| Message-ID | <9826133.1150117942261.JavaMail.os-j2ee@opensymphony01.managed.contegix.com> |
Hello all,
After few time away from dev, I came back to my webapp dev...
I still want to shorcut my static call.
I'm sorry, but I did not manage to understand this:
> If the object is in the stack (ie: it is on your action), you can do @vs@FOO
One workaround I found is to build a static map containing all my static final values, but I don't like to do so when I have a lot of them.
Here is a sample of test I wish I could reduce with a lighter syntax:
[code]
<ww:if test="#task.name in {
@com.foo.bar.app.business.workflows.task@TASK_FOO,
@com.foo.bar.app.business.workflows.task@TASK_SOMETHING
@com.foo.bar.app.business.workflows.task@TASK_IMPORTANT,
@com.foo.bar.app.business.workflows.task@TASK_GOT_MILK,
@com.foo.bar.app.business.workflows.task@TASK_I_LIKE_IT,
@com.foo.bar.app.business.workflows.task@TASK_THIS_IS_THE_END
}">
[/code]
in this case the @vs@FOO syntax will be interesting, but I don't know how to use it.
Pault technique is great, but still add a layer between the java class and the view, and I want to avoid this.
Please advice.
Thanks,
Guillaume.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=29528&messageID=66195#66195
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]