Hi Michael:

I think changing the return type from Enum to String is not a very good
solution.
It maybe make your JSP get work,but your Java code will become a little
ugly.

I think the better way is:
(1)do not chang the return type of config.getProject().
(2)in tag <s:if>, compare it to an enum constant, rather than a string
constant.

in your case, it should be:

...
<s:if test="project == @yourfullpackagename.proj...@dba2">
...

check this page:
http://www.opensymphony.com/ognl/html/LanguageGuide/staticFields.html
to see the syntax to reference [Static Fields] in OGNL.


2010/9/24 Michaël JERUSALMI <michaelj...@hotmail.com>

>
> Dave, you were so right !
>
> It was indeed not a String object that is returned by config.getProject(),
> but the value of an enum of type Project.
> So I made that method returning a String instead, and it's working !
>
> Thank you for your help.
>
> But by curiosity, what does the OGNL espace do? Because, searching on
> forums, i saw many times that syntax, and tried it, but I never knew what it
> was for.
>
>

Reply via email to