...
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="957c8dfb24420a45-925e7b17-485a4809-a9818d0f-99b3ddc27d719a554b0f73f0"><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="4dce75746c2f2a4e-e874338e-43274f6f-8537ba01-c1cd9bb412a32253e0b6d01f"><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="73d3aa1bedb42c47-50bca3b2-4bdd4358-85439353-e8e529e5dedafc0cda21a405"><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="743146a45a9a3259-70a5c6b8-40bd48a2-97469eb1-a0991ee939211ee866987817"><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="749babe3c6db2350-4387d5a0-4d424bfe-a8c39989-2e166a20d7c2b252a8f0019e"><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="604f5f1736d5e0a7-2103f63c-4dc34542-a773a848-aec104918182e76177a09868"><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="125c08b36fabb95d-5002eca7-45844ea1-8ddc8449-dc7082e12208783d2e4a3489"><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="cfa31293f8b208b6-64d5caa9-4e244f7c-89848a96-6f658e0940f180734e9ed4eb"><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="2fecedbc30a7fbee-4dc7499b-4c224826-88fd9bdd-f4aa4279567bbc74675e1a49"><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> |