// only render the top spacer if the Locator is rendered
topSpacer.setAttributeValue(RENDERED_ATTR, isLocatorRendered);
MutableUINode locatorUserInfoLayout = _sCreateLocatorUserInfoLayout(
isEndRendered,
isLocatorRendered,
isUserInfoRendered);
// the train separator is only rendered if the train is rendered
MarlinBean trainSeparator = new MarlinBean(SEPARATOR_NAME);
trainSeparator.setAttributeValue(RENDERED_ATTR, isTrainRendered);
locatorLayout.addIndexedChild(topSpacer);
locatorLayout.addIndexedChild(qsStartStack);
locatorLayout.addIndexedChild(locatorUserInfoLayout);
locatorLayout.addIndexedChild(trainSeparator);
locatorLayout.addIndexedChild(
ContextPoppingUINode.getUINode( MESSAGES_CHILD ));
//
// Create the content footer
//
// if content footer child has returnNavigation child and/or
// pageButtons child use these, otherwise
// if the content footer child is a MarlinBean or
// has a contentMarlinBean as a descendent
// add it directly, otherwise create a MarlinBean and add the
// content footer child as its indexed child
MarlinBean contentFooterSwitcher = new MarlinBean(SWITCHER_NAME);
BoundValue contentFooterBoundValue =
RootChildBoundValue.getBoundValue(CONTENT_FOOTER_CHILD);
// Is there a MarlinBean inside of the CONTENT_FOOTER_CHILD
BoundValue hasContentMarlinBean =
new PageLayoutRenderer.TreeWalkerBoundValue( contentFooterBoundValue,
CONTENT_FOOTER_NAME );
// Create MarlinBean using what's in ACTIONS_CHILD
// and INFO_RETURN_CHILD
MarlinBean pageNavContentFooter = new MarlinBean(CONTENT_FOOTER_NAME);
pageNavContentFooter.addIndexedChild(
ContextPoppingUINode.getUINode(ACTIONS_CHILD));
pageNavContentFooter.setNamedChild(START_CHILD,
ContextPoppingUINode.getUINode(INFO_RETURN_CHILD));
// Create MarlinBean using what's in CONTENT_FOOTER_CHILD
MarlinBean contentMarlinBean = new MarlinBean(CONTENT_FOOTER_NAME);
contentMarlinBean.addIndexedChild(
ContextPoppingUINode.getUINode(CONTENT_FOOTER_CHILD));
// Use content footer created with
// ACTIONS_CHILD and INFO_RETURN_CHILD
contentFooterSwitcher.setNamedChild( _HAS_PAGE_NAV, pageNavContentFooter);
// Use content footer already in CONTENT_FOOTER_CHILD
contentFooterSwitcher.setNamedChild(
_HAS_CONTENT_FOOTER,
ContextPoppingUINode.getUINode(CONTENT_FOOTER_CHILD));
// Use content footer created with what's in CONTENT_FOOTER_CHILD
contentFooterSwitcher.setNamedChild( _NO_CONTENT_FOOTER, contentMarlinBean);
// figure out which one to use:
// First Choice: Use the one created with ACTIONS_CHILD
// and INFO_RETURN_CHILD if these children exist.
// Second Choice: Use one already in CONTENT_FOOTER_CHILD.
// Third Choice: Use one created with what's in CONTENT_FOOTER_CHILD
BoundValue pageButtonsExistBV =
BaseDesktopUtils.createIsRenderedBoundValue(ACTIONS_CHILD);
BoundValue returnNavExistsBV =
BaseDesktopUtils.createIsRenderedBoundValue(INFO_RETURN_CHILD);
OrBoundValue newChildrenExist = new OrBoundValue( pageButtonsExistBV,
returnNavExistsBV);
IfBoundValue hasContentFooterBV = new IfBoundValue( hasContentMarlinBean,
_HAS_CONTENT_FOOTER,
_NO_CONTENT_FOOTER );
IfBoundValue childNameBV = new IfBoundValue( newChildrenExist,
_HAS_PAGE_NAV,
hasContentFooterBV);
contentFooterSwitcher.setAttributeValue(CHILD_NAME_ATTR, childNameBV);
// create footnote region above contentFooterSwitcher in StackLayout
MarlinBean contentFooterStackLayout = new MarlinBean(STACK_LAYOUT_NAME);
contentFooterStackLayout.addIndexedChild(
ContextPoppingUINode.getUINode(INFO_FOOTNOTE_CHILD));
contentFooterStackLayout.addIndexedChild(contentFooterSwitcher);
//
// Create the footer area
//
MarlinBean footer = _sCreateFooterBean();
//
// Build up the root node
//
MarlinBean endChildSeparator = new MarlinBean(SPACER_NAME);
endChildSeparator.setAttributeValue(WIDTH_ATTR, "5");
endChildSeparator.setAttributeValue(HEIGHT_ATTR, "1");
// the end child separator is only rendered if the end child is rendered
endChildSeparator.setAttributeValue(RENDERED_ATTR,
isEndRendered);
// the userInfo is rendered in the end area if the end child is rendered
// otherwise it is rendered in the locator area
MutableUINode endRegionLayout = _sCreateEndLayout(isEndRendered,
isUserInfoRendered);
UINodeList rootNodeList = RootUINodeList.getNodeList();
//
// Create content of PageLayout to use when we have no page title
//
MutableUINode noTitleContentLayout = new MarlinBean(STACK_LAYOUT_NAME);
noTitleContentLayout.addIndexedChild(_sCreateContentTop(true));
noTitleContentLayout.addIndexedChild(_createContentLayout(rootNodeList));
// this is the name of the anchor used to skip the navigational area of a
// pageLayout and jump to the content area.
final String skipNavigationAnchor = "TheContent";