Thanks for posting it again...

Static access also works fine for me. In fact I simply forgot to
rebuilt my project, and was wondering for an hour why my ognl strings
didn't work...

Thanks anyway...

Gregor


> Geoff suggested a workaround with valueOf(...).
> Alexandr said enums work fine for him.
> It doesn't work for me, perhaps the problem is with accessing *inner*
> enums?

> Anyway, here it is:

> ------- Forwarded message -------
> From: "Alexandr Kundirenko" <[EMAIL PROTECTED]>
> To: "Tapestry users" <[email protected]>
> Subject: Re[2]: OGNL enum?
> Date: Wed, 05 Oct 2005 16:55:38 +0200

> Hi,

> Hmmm...
> I access enum like a constant and it works!

> public enum ReportType {
>          TOTALS,
>          COMPARISON
> }

> In Template:

> <span jwcid="@If"
>      condition="ognl:descriptor.mode eq  
> @[EMAIL PROTECTED]">

> Alex

GL>> This sucks but it works.

GL>> @[EMAIL PROTECTED]("ONE")

GL>> Geoff

GL>> On 10/4/05, Martin Strand <[EMAIL PROTECTED]> wrote:
>>>
>>> Is there a way to reference an enum with OGNL?
>>>
>>>
>>>
>>> package package;
>>>
>>> class Class
>>> {
>>> public enum Enum
>>> {
>>> ONE, TWO, THREE
>>> }
>>> }
>>>
>>>
>>>
>>> I tried a couple of variations but couldn't figure it out. Perhaps it's
>>> not possible?
>>> ognl:@[EMAIL PROTECTED] ?
>>>
>>> -Martin
>>>

> On Thu, 13 Oct 2005 18:16:11 +0200, Gregor Melhorn <[EMAIL PROTECTED]>
> wrote:

>> Hello tapestry users,
>>
>> how do I reference an enum from an ognl value String inside a
>> component? I know it was on the list before, but the archives I read
>> removed the solution because the software thought it was an email
>> address...
>>
>> Best regards
>> Gregor Melhorn

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Mit freundlichen Grüßen
Gregor Melhorn
mailto:[EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to