Object Graph Navigation Language is a expression language. It is used for getting and setting the properties of java object. It is very useful binding language for manipulating and retrieving different properties of java object. It has own syntax, which is very simple. It make code more readable. It acts as a binding language between GUI elements and model objects.
The Struts framework used a standard naming context for evaluating an OGNL expression. It sets OGNL context to be the ActionContext, and ValueStack to be the OGNL root object., The topmost object dealing with OGNL is a Map.
Expression based on OGNL is very simple and easier to learn and use. The most commonly used unit in OGNL expression language is the navigation chain. The chain contain following parts :ADS_TO_REPLACE_1
For example.
name.toCharArray()[0].numericValue.toString() |
Description :
Example of OGNL :ADS_TO_REPLACE_2
Advertisements
Ads
Ads