Embedded Objects - Entities

An object of type entities is an EntityListBackingBean with a pageable list of persisted entities. For example, embed full-time employees hired after May 18, 2010, ordering by employee id, 30 employees per page:

<object xmlns="http://www.cmobilecom.com/af/objects"
        id="employees" type="entities">
	<entityType>ExampleHR.EMP</entityType>
  
	<criteriaElements>
		<function name="EQ" property="type">FULL_TIME</function>
		<function name="GE" property="hiredDate">2010-5-18</function>
		<asc property="nid"/>
	</criteriaElements>
  
	<viewConfig>
		<viewType>ENTITY_LIST_WIDE</viewType>
		<pageSize>30</pageSize>
		<propertiesToShow>nid,name,hiredDate</propertiesToShow>
	</viewConfig>
  
</object>
The properties element, same as that of the entity object type, is used to create query criteria to retrieve entity list from persistence.

The viewConfig parameter entity.not.found describes what to do if the entity list is empty.


	<viewConfig>
		<viewType>ENTITY_LIST_WIDE</viewType>
		<param name="entity.not.found" value="ignore" /> 
	</viewConfig>
Parameter: entity.not.found. (default: keep)