The relationship between root element and non-root element in OGNL
Root element: Can be understood as a global variable
Non-root element: local variable
Look at the way the properties are obtained from both:
Object obj = ognl.parseexpression ("" 1 "");
"1" root element: Do not write the # number, fill in the attributes
Non-root elements: Write the # number, fill in the object name
Note: From the content can be seen in the global and local
The returned obj is in the full text from the top to the bottom of the search for "1", such as the global and local names consistent, you fill in the attributes that is definitely the overall, not to the local place on the search.
Ognlcontext this is the context. The context of what to do, you can understand the English words of choice in the blanks.
Object value = Ognl.getvalue (Obj,context,context.getroot ());
Obj: I got the empty space to fill.
Context: See this article
Context.getroot (): Got the root of the empty
In addition: The two put in a different way, a context.put a context.setroot;
If the root element is consistent, how to get the concrete root? Who goes in first, who gets out first!
Parse analytic expression expression, expressed in English
The relationship between root element and non-root element in OGNL