Versions Compared

Key

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

...

Wiki Markup
With expression like \[WW:0\] ... \[WW:3\] etc. WebWork will cut the stack and still returned back a CompoundRoot object. To get the top of that particular stack cut, use [0].top

ognl expression

description

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="8b3a2cdfa69e0777-3ec27a2b-4bcf4bbb-b508a01f-eee63d7861b6336c6c56e59e"><ac:plain-text-body><![CDATA[

[WW:0].top

would get the top of the stack cut starting from element 0 in the stack (similar to top in this case)

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e97ecbfa30d356e0-925e2b81-445b4056-af949219-f2757bc8b62214bb745f3cf7"><ac:plain-text-body><![CDATA[

[WW:1].top

would get the top of the stack cut starting from element 1 in the stack]]></ac:plain-text-body></ac:structured-macro>

...

Wiki Markup
Besides the examples and descriptions given above, there are a few major changes in the EL since WebWork 1.x. The biggest one is that properties are no longer accessed with a forward slash \(/\) but with a dot (.). Also, rather than using ".." to traverse down the stack, we now use "\[WW:n\]" where n is some positive number. Lastly, in WebWork 1.x one could access special named objects (the request scope attributes to be exact) by using "@foo", but now special variables are accessed using "#foo". However, it is important to note that "#foo" does NOT access the request attributes. Because XWork is not built only for the web, there is no concept of "request attributes", and thus "#foo" is merely a request to another object in the OgnlContext other than the root.

Old Expression

New Expression

foo/blah

foo.blah

foo/someMethod()

foo.someMethod()

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7dc09c82e68659ad-34bb6dd8-48744a39-b8aa9aea-c5fb8cb55b49a192a97bd586"><ac:plain-text-body><![CDATA[

../bar/blah

[WW:1].bar.blah

]]></ac:plain-text-body></ac:structured-macro>

@baz

not directly supported, but #baz is similar

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="05869ed7237fb452-5ac4d18a-462647e7-83c8bb8b-15341e489d698c44bb102088"><ac:plain-text-body><![CDATA[

.

top or [WW:0]

]]></ac:plain-text-body></ac:structured-macro>

...

name

value

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="1fb1085234a9ae52-d3571de4-4c6c4281-80fe93f6-4dae893f10f614ce3eb6586e"><ac:plain-text-body><![CDATA[

#parameters[WW:'foo'] or #parameters.foo

request parameter [WW:'foo'] (request.getParameter())

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7ee96c95fee0ab1d-c6d2b41c-46614598-9e669810-dc7ac44c0a6aa0f395febd89"><ac:plain-text-body><![CDATA[

#request[WW:'foo'] or #request.foo

request attribute [WW:'foo'] (request.getAttribute())

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="092a005f07976277-a740bd59-40b34f67-a415a75c-18a2df3032dd2793ed6e8dca"><ac:plain-text-body><![CDATA[

#session[WW:'foo'] or #session.foo

session attribute 'foo'

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="dcb220a434d85802-10f866ab-4e0a4338-b203b611-0cf8cc9136bc016d0e37df2b"><ac:plain-text-body><![CDATA[

#application[WW:'foo'] or #application.foo

ServletContext attributes 'foo'

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="a3128249adacb23b-2f1e15b9-413844f0-987b8ce1-2ca100d2902d685ff0b09cf4"><ac:plain-text-body><![CDATA[

#attr[WW:'foo'] or #attr.foo

Access to PageContext if available, otherwise searches request/session/application respectively

]]></ac:plain-text-body></ac:structured-macro>