This is usual way to associate or aggregate a bean to the action class. The action class properties can be used directly by name that have property accessors. Nested beans properties are accessible via OGNL by specifying proper OGNL expression which is a path to the property. Assumed all properties accessors have not null
references to beans. That could be achieved via providing corresponding getters and setters to properties and initializing bean references if necessary. So, bean.iSortColumn
, bean.iDisplayTotalLength
are valid OGNL expressions to set/get the bean
properties. But you need to initialize it in the action. Like this
private Bean bean = new Bean();
public Bean getBean() { return bean; }
References:
- To be familiar how OGNL works you can read in the OGNL Basics.
- The base OGNL reference including a link to the OGNL language guide.