Cmobilecom AF 5.19 Developer Guide

21.8 Embedded Objects - Partial Behavior Support

Partial behavior support of a MenuNode or Property defines a list of partial behaviors. For example,

	<partialBehaviorSupport>
		<partialBehavior event="action">
			<execute>ENTITY_LIST_ROW</execute>
			<render>ENTITY_LIST_ROW</render>
			<renderRegions>9</renderRegions>
			<openDialog>false</openDialog>
		</partialBehavior>
	</partialBehaviorSupport>
For each item above, it will override default if defined. Visit target constants are defined in class VisitTarget. For example, THIS, FORM, ENTITY_LIST_ROW, BACKING_BEAN. (see javadoc). For example, embed a query form in region 8, and show query results in region 9.

	<object xmlns="http://www.cmobilecom.com/af/objects"
			id="queryEmployees" type="entity" region="8">
		<entityType>HR.EMP</entityType>
		<viewConfig>
			<viewType>QUERY</viewType>

			<viewConfig name="footerMenu" >
				<viewType>MENU</viewType>
				<menuStyle>MENU_BAR</menuStyle>
				<menuNode key="cmd.Search">
					<partialBehaviorSupport>
						<partialBehavior event="action">
							<renderRegions>9</renderRegions>
							<openDialog>false</openDialog>
						</partialBehavior>
					</partialBehaviorSupport>
				</menuNode>
			</viewConfig>
		</viewConfig>
	</object>

	<object xmlns="http://www.cmobilecom.com/af/objects"
			id="employees" type="placeholder" region="9">
	</object>

Property Partial Behavior

Example: from the query results (EntityListBackingBean) in region 9, click Employee name to show the employee in region 10. Open dialog if clicking the row command View.

	<object xmlns="http://www.cmobilecom.com/af/objects"
			id="queryEmployees" type="entity" region="8">
		<entityType>HR.EMP</entityType>
		<viewConfig>
			<viewType>QUERY</viewType>

			<viewConfig name="footerMenu" >
				<viewType>MENU</viewType>
				<menuStyle>MENU_BAR</menuStyle>
				<menuNode key="cmd.Search">
					<partialBehaviorSupport>
						<partialBehavior event="action">
							<renderRegions>9</renderRegions>
							<openDialog>false</openDialog>
						</partialBehavior>
					</partialBehaviorSupport>
				</menuNode>
			</viewConfig>

			<viewConfig name="queryResults" >
				<viewType>ENTITY_LIST_WIDE</viewType>
				<property name="name">
					<partialBehaviorSupport>
						<partialBehavior event="action">
							<renderRegions>10</renderRegions>
							<openDialog>false</openDialog>
						</partialBehavior>
					</partialBehaviorSupport>
				</property >

				<viewConfig name="rowCommandMenu" >
					<viewType>MENU</viewType>
					<menuStyle>MENU_BAR</menuStyle>
					<menuNode key="cmd.View">
						<partialBehaviorSupport>
							<partialBehavior event="action">
								<openDialog>true</openDialog>
							</partialBehavior>
						</partialBehaviorSupport>
					</menuNode>
				</viewConfig>
			</viewConfig>

		</viewConfig>
	</object>

	<object xmlns="http://www.cmobilecom.com/af/objects"
			id="employees" type="placeholder" region="9">
	</object>

	<object xmlns="http://www.cmobilecom.com/af/objects"
			id="employee" type="placeholder" region="10">
	</object>
Partial behaviors of an entity property can have action or value change event. See Partial Behavior for more details.
Embedded Objects: MenuEmbedded Objects: ExecFrames / No Frames