22 EL Expressions
EL expressions are java standard and can be used in layout code. By default, EL expressions
#{beanName.propertyPath} supports the following beans:
- #{containerBean}: view-scoped current ContainerBean.
- #{systemConfig}: the SystemConfig singleton.
- #{request}: current HTTP request.
- #{param}: request and view parameters.
- #{bundle}: the component resource bundle for current locale.
- #{bean}: the current associated bean (entity bean or entity list bean)
for formDesign layout code.
Refer to ContainerBean, SystemConfig, EntityBackingBean and EntityListBackingBean
javadoc for valid property path.
For example,
- #{containerBean.backingBeanContext.authenticatedUser}: current authenticated user.
- #{containerBean.backingBeanContext.currentDate}: current date.
- #{containerBean.backingBeanContext.currentDate.calendarFieldName}: calendarFieldName is
the java.util.Calendar field name in lowerCamelCase: year, month,
dayOfMonth, dayOfYear, dayOfWeek, hour, hourOfDay, minute or millisecond.
- #{empty containerBean.embeddedObjects.showEmployee.entity}: true if there is no
embedded bean whose id is "showEmployee".
- #{!containerBean.backingBeanContext.boundDataAccessUnit.nonSystemInstance}": true
if current bound DataAccessUnit is the system instance or an instanceType.
- #{systemConfig.instanceTypes.system.url}: system instance URL.
- #{request.contextPath}: context path.
- #{param.OrderNumber}: request/view parameter value of "OrderNumber".
- #{bundle.SalesOrder}: resource bundle value for key "SalesOrder".
- #{bundle['FormDesign.Foo']}: resource bundle value for key "FormDesign.Foo".
- #{bean.editEnabled}: whether the current bean is in editing mode.