|
|||||
|
|||||
Useful Things |
MVEL 2.0 Block WITH Operator
The block Example: The code above is functionally equivalent to: Nesting WITHMVEL has support for deep graph hierarchies using 'with' and inline arrays, lists and maps: To be able to use the 'with' keyword in nested structures and in such a way that it returns a value you must encase the keyword and it's following curly braces in parenthesis, i.e. ( with(...) {...} ). Inline With OperatorMVEL 2.0 introduces a new, abbreviated version of the with operator, using a dot following by an opening curly bracket, you can open up a context around that object instance. For example: The above example demonstrates constructing an object graph with inline with notation. It is functionally equivalent to the following code: |
||||
|
Copyright 2003-2006 - The Codehaus. All rights reserved unless otherwise noted.
Powered by Atlassian Confluence
|
|||||