The relationship between root element and non-root element in OGNL

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.