Page content, regions and layout are configured in ${cmobilecom.home}/conf/containers.xml. For example,
<?xml version="1.0" encoding="UTF-8"?>
<containers>
<container name="indexCntrBean">
<regions>
<region number="0">pageHeaderMenu</region>
<region number="1">containerMenu</region>
<region number="5">queryForm</region>
<region number="7,6">queryResults</region>
</regions>
<pageLayout>
<unit position="north">
<content><![CDATA[
#{facet_logo}#{region_0}#{region_1}
]]>
</content>
</unit>
<unit position="center">
<content>#{OBJECT:page}</content>
</unit>
</pageLayout>
</container>
<container name="manageCntrBean">
<regions>
<region number="0">pageHeaderMenu</region>
<region number="1">containerMenu</region>
<region number="2">toolbarMenu</region>
<region number="5">queryForm</region>
<region number="7,6">queryResults</region>
</regions>
<!-- menu style: ACCORDION_TREE, TREE, MENU_BAR, TIERED_MENU -->
<!-- pageHeaderMenu default menuStyle: MENU_BAR -->
<viewConfig name="pageHeaderMenu">
<viewType>MENU</viewType>
<menuStyle>TIERED_MENU</menuStyle>
<overlay/>
</viewConfig>
<!-- containerMenu default menuStyle: ACCORDION_TREE -->
<viewConfig name="containerMenu">
<viewType>MENU</viewType>
<menuStyle>ACCORDION_TREE</menuStyle>
<accordionView>
<multiple>false</multiple>
</accordionView>
</viewConfig>
<pageLayout>
<unit position="north">
<!-- content: support expressions for regions and facets -->
<content><![CDATA[
<div>#{facet_logo}#{facet_title}#{region_0}</div>#{region_2}
]]>
</content>
</unit>
<unit position="west">
<content>#{region_1}</content>
</unit>
<unit position="west">
<content>#{OBJECT:Page}</content>
</unit>
<unit position="east">
<content>#{region_5}#{region_6}</content>
</unit>
</pageLayout>
</container>
</containers>
In the example above, container beans named "indexCntrBean" and "manageCntrBean" are
configured for pages index.xhtml and manage.xhtml respectively.
Backing beans can be added into any regions of a container bean, but their region numbers must
be contained in the page layout in order to be visible.
North layout unit:
West layout unit:
Center layout unit
East layout unit:
PageContent pageContent = containerBean.getPageContent();
pageContent.add(bean, regionNumber);
The layout code of a layout unit is a piece of HTML code that can contain expressions. Supported expressions:
<a href="#{request.contextPath}/privacyPolicy.page">Privacy Policy</a>
Only facet_logo and facet_title facets are supported by default, which shows the icon
and name of current bound InstanceType by default. A website can specify a different logo.