Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Webwork uses a standard naming context to evaluate OGNL expressions. The top level object dealing with OGNL is a map (usually referred as a context map). OGNL has a concept of a root object (in webwork terms, this is the OGNLValueStack). Along with the root, other objects are placed in the context map (referred as in the context) including your session/application/request/attr maps. These objects have nothing to do with the root, they just exist along side it in the context map. So, to access these objects, the # is used telling ognl not to look in the root object, but within the rest of the context

No Format

Code Block

        |             

                     |--request
                     |
                     |--application
                     |
       context map---|--OgnlValueStack(root)
                     |
                     |--session
                     |
                     |--attr
                     |
                     |--parameters

...

Code Block
xml
xml
<webwork:select label="'lebal'" name="'nmae'name" list="{'name1','name2'}" />

...

Code Block
xml
xml
<webwork:select label="'lebal'" name="'nmae'name" list="#{'foo':'foovalue', 'bar':'barvalue'}" />

...