Dashboard > OGNL > Home > Setting Values Vs Getting Values
  OGNL Log In View a printable version of the current page.  
  Setting Values Vs Getting Values
Added by tm_jee, last edited by tm_jee on Dec 21, 2007  (view change)
Labels: 
(None)

As stated before, some values that are gettable are not also settable because of the nature of the expression. For example,

names[0].location

is a settable expression - the final component of the expression resolves to a settable property.

However, some expressions, such as

names[0].length + 1

are not settable because they do not resolve to a settable property in an object. It is simply a computed value. If you try to evaluate this expression using any of the

Ognl.setValue()

methods it will fail with an InappropriateExpressionException.

It is also possible to set variables using get expressions that include the '=' operator. This is useful when a get expression needs to set a variable as a side effect of execution.

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators