You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Christian Sell <ch...@netcologne.de> on 2003/04/24 14:41:00 UTC

[OGNL] accessing properties

Hello,

how does one access properties whose names contain characters that are 
normally interpreted by OGNL, such as:

main.text=some text

I tried

properties.'main.text'

but get a syntax error

thanks,
Christian


Re: [OGNL] accessing properties

Posted by Drew Davidson <dr...@ognl.org>.
Christian Sell wrote:

> Hello,
>
> how does one access properties whose names contain characters that are 
> normally interpreted by OGNL, such as:
>
> main.text=some text
>
> I tried
>
> properties.'main.text'
>
> but get a syntax error

I'm not sure how you could have a property with a name like "main text" 
but you can use the array-like syntax as an equivalent to direct 
property chain access:

    properties["main.text"]

- Drew

-- 
+---------------------------------+
< Drew Davidson | OGNL Technology >
+---------------------------------+
|  Email: drew@ognl.org          /
|    Web: http://www.ognl.org   /
|    Vox: (520) 531-1966       <
|    Fax: (520) 531-1965        \
| Mobile: (520) 405-2967         \
+---------------------------------+