// If no start child add quickSearch
BoundValue hasNavigation3 = BaseDesktopUtils.createIsRenderedBoundValue(NAVIGATION3_CHILD);
BoundValue hasSearch =
BaseDesktopUtils.createIsRenderedBoundValue(SEARCH_CHILD);
BoundValue hasSearchAndNoNavigation3 =
new AndBoundValue( new NotBoundValue(hasNavigation3),
hasSearch);
BoundValue hasNavigation3AndSearch = new AndBoundValue( hasNavigation3, hasSearch);
MarlinBean qsNoStartFlow = new MarlinBean(FLOW_LAYOUT_NAME);
UINode quickSearch = ContextPoppingUINode.getUINode(SEARCH_CHILD);
qsNoStartFlow.addIndexedChild( quickSearch );
qsNoStartFlow.setAttributeValue(RENDERED_ATTR,
hasSearchAndNoNavigation3);
MarlinBean pageHeader = _sCreatePageHeader(globalHeaders,
qsNoStartFlow);
// @todo if there is a navigation3 child, the search should go in the sideBar,
// however we need a search component that will lay itself out properly
// for the reduced space of a sideBar before we do that.
MarlinBean startRegionLayout = new MarlinBean(SIDE_BAR_NAME);
startRegionLayout.addIndexedChild(
ContextPoppingUINode.getUINode(NAVIGATION3_CHILD));
startRegionLayout.setAttributeValue(RENDERED_ATTR, hasNavigation3);
//
// Create the page content area
//
// If a start child quickSearch rendered on the top of content area
MarlinBean qsStartStack = new MarlinBean(STACK_LAYOUT_NAME);
MarlinBean qsSeparator = new MarlinBean(SEPARATOR_NAME);
qsStartStack.addIndexedChild(quickSearch);
qsStartStack.addIndexedChild(qsSeparator);
qsStartStack.setAttributeValue(RENDERED_ATTR, hasNavigation3AndSearch);
//
// Create layout used for locators at the top of the page
//
MarlinBean locatorLayout = new MarlinBean(STACK_LAYOUT_NAME);
MarlinBean topSpacer = new MarlinBean(SPACER_NAME);
topSpacer.setAttributeValue(HEIGHT_ATTR,"5");
BoundValue locatorBoundValue =
RootChildBoundValue.getBoundValue(LOCATION_CHILD);
BoundValue isLocatorRendered =
BaseDesktopUtils.createIsRenderedBoundValue(locatorBoundValue);
BoundValue isUserInfoRendered =
BaseDesktopUtils.createIsRenderedBoundValue(INFO_USER_CHILD);
BoundValue isEndRendered =
BaseDesktopUtils.createIsRenderedBoundValue(INFO_SUPPLEMENTAL_CHILD);
BoundValue hasTrainBean =
new PageLayoutRenderer.TreeWalkerBoundValue( locatorBoundValue,
PROCESS_TRAIN_NAME );
BoundValue isTrainRendered =
new AndBoundValue(isLocatorRendered,
hasTrainBean);
// only render the top spacer if the Locator is rendered
topSpacer.setAttributeValue(RENDERED_ATTR, isLocatorRendered);