Package org.apache.myfaces.trinidadinternal.ui.beans

Examples of org.apache.myfaces.trinidadinternal.ui.beans.MarlinBean


    Object           buttonAccessKey,
    Object           destination,
    String           onClickJS
    )
  {
    MarlinBean submitButton = new MarlinBean(BUTTON_NAME);
    submitButton.setAttributeValue(TEXT_ATTR, buttonText);
    submitButton.setAttributeValue(ACCESS_KEY_ATTR, buttonAccessKey);

    if (destination != null)
      submitButton.setAttributeValue(DESTINATION_ATTR, destination.toString());
    else
      submitButton.setOnClick(onClickJS);

    return submitButton;
  }
View Full Code Here


  }

  private static UINode  _createCompositeUINode()
  {
    // add the tabs
    MarlinBean pageLayout = new MarlinBean(UIConstants.PAGE_LAYOUT_NAME);
    MutableUINode navigationGlobal =
                  new BaseMutableUINode(UIConstants.MARLIN_NAMESPACE,
                                        UIConstants.PAGE_MENU_BUTTONS_NAME);
    pageLayout.setNamedChild(UIConstants.NAVIGATION_GLOBAL_CHILD, navigationGlobal);

    // add the bar
    MutableUINode menuTabs =
                  new BaseMutableUINode(UIConstants.MARLIN_NAMESPACE,
                                        UIConstants.PAGE_MENU_TABS_NAME);
    menuTabs.setAttributeValue(UIConstants.LEVEL_ATTR,
                               1);
    pageLayout.setNamedChild(UIConstants.NAVIGATION1_CHILD, menuTabs);
    MutableUINode menuBar =
                  new BaseMutableUINode(UIConstants.MARLIN_NAMESPACE,
                                        UIConstants.PAGE_MENU_BAR_NAME);
    menuBar.setAttributeValue(UIConstants.LEVEL_ATTR,
                              2);
    pageLayout.setNamedChild(UIConstants.NAVIGATION2_CHILD, menuBar);

    // add the tree

    MutableUINode navigationTree =
                  new BaseMutableUINode(UIConstants.MARLIN_NAMESPACE,
                                        UIConstants.PAGE_NAVIGATION_TREE_NAME);
    navigationTree.setAttributeValue(UIConstants.START_LEVEL_ATTR,
                              3);

    BoundValue treeRenderedBV = new HasDataBoundValue(
                                  RootBoundValue.getBoundValue(), 3, true);
    navigationTree.setAttributeValue(UIConstants.RENDERED_ATTR, treeRenderedBV);
    // for PPR, an ID is required:
    navigationTree.setAttributeValue(UIConstants.ID_ATTR, new BoundValue()
    {
      public Object getValue(UIXRenderingContext context)
      {
        UINode pageNode = context.getParentContext().getAncestorNode(0);
        UIComponent component = pageNode.getUIComponent();
        return component.getClientId(context.getFacesContext()) +
               org.apache.myfaces.trinidadinternal.renderkit.uix.PageRenderer.TREE_SUFFIX;
      }
    }
                              );


    // add the list
    MutableUINode menuList =
                  new BaseMutableUINode(UIConstants.MARLIN_NAMESPACE,
                                        UIConstants.PAGE_MENU_LIST_NAME);
    menuList.setAttributeValue(UIConstants.LEVEL_ATTR,
                              3);
    BoundValue listRenderedBV = new HasDataBoundValue(
                                  RootBoundValue.getBoundValue(), 3, false);
    menuList.setAttributeValue(UIConstants.RENDERED_ATTR, listRenderedBV);


    MarlinBean navigation3Flow = new MarlinBean(UIConstants.FLOW_LAYOUT_NAME);
    navigation3Flow.addIndexedChild(menuList);
    navigation3Flow.addIndexedChild(navigationTree);
    navigation3Flow.setAttributeValue(UIConstants.RENDERED_ATTR,
                           new OrBoundValue(treeRenderedBV,listRenderedBV));
    pageLayout.setNamedChild(UIConstants.NAVIGATION3_CHILD, navigation3Flow);



    // add the path
    MutableUINode navigationPath =
                  new BaseMutableUINode(UIConstants.MARLIN_NAMESPACE,
                                        UIConstants.PAGE_NAVIGATION_PATH_NAME);

    BoundValue hasLocation =
          XhtmlLafUtils.createIsRenderedBoundValue(UIConstants.LOCATION_CHILD);
    navigationPath.setAttributeValue(UIConstants.RENDERED_ATTR,
                               new NotBoundValue(hasLocation));


    UINode location = ContextPoppingUINode.getUINode(UIConstants.LOCATION_CHILD);
    MarlinBean locationFlow = new MarlinBean(UIConstants.FLOW_LAYOUT_NAME);
    locationFlow.addIndexedChild(navigationPath);
    locationFlow.addIndexedChild(location);
    pageLayout.setNamedChild(UIConstants.LOCATION_CHILD, locationFlow);

    //_setPoppedChild(pageLayout, UIConstants.LOCATION_CHILD);
    _setPoppedChild(pageLayout, UIConstants.MENU_SWITCH_CHILD);
    _setPoppedChild(pageLayout, UIConstants.ACTIONS_CHILD);
View Full Code Here

    String script = getScript(context, node, Boolean.FALSE);

    // =-=ags We could use a singleton here, but I'm not sure that
    //        performance is actually an issue.
    // =-=ags We should probably provide description text for the button.
    MarlinBean button = new MarlinBean(UIConstants.BUTTON_NAME);
    button.setAttributeValue(UIConstants.TEXT_ATTR, text);
    button.setAttributeValue(UIConstants.ACCESS_KEY_ATTR, accessKey);
    button.setOnClick(script);

    button.render(context);
  }
View Full Code Here

  {

    //
    // Create the page header layout
    //
    MarlinBean headerLayout = new MarlinBean(PAGE_HEADER_LAYOUT_NAME);

    headerLayout.setNamedChild(NAVIGATION_GLOBAL_CHILD,
                    ContextPoppingUINode.getUINode(NAVIGATION_GLOBAL_CHILD));
    headerLayout.setNamedChild(NAVIGATION1_CHILD,
                    ContextPoppingUINode.getUINode(NAVIGATION1_CHILD));

    headerLayout.setNamedChild(NAVIGATION2_CHILD, _createGlobalHeaders());

    headerLayout.setNamedChild(BRANDING_CHILD,
                    ContextPoppingUINode.getUINode(BRANDING_CHILD));
    headerLayout.setNamedChild(BRANDING_APP_CHILD,
                    ContextPoppingUINode.getUINode(BRANDING_APP_CHILD));

    // =-= bts a little bogus since this isn't really an attribute of PageHeader
    headerLayout.setAttributeValue(WIDTH_ATTR, "100%");

    //
    // Create the content container containing all of the indexed children
    //
    //  MarlinBean contentRoot = new MarlinBean(FLOW_LAYOUT_NAME);

    // use stackLayout as the default layout as it is the layout used in
    // the desktop version.
    MarlinBean contentRoot = new MarlinBean(STACK_LAYOUT_NAME);
    contentRoot.setIndexedNodeList(RootUINodeList.getNodeList());

    //
    // add the page buttons line
    //
    MarlinBean pageButtonsLine = new MarlinBean(SEPARATOR_NAME);
    pageButtonsLine.setAttributeValue(
            RENDERED_ATTR,
             new OrBoundValue(
         PdaHtmlLafUtils.createIsRenderedBoundValue(ACTIONS_CHILD),
         PdaHtmlLafUtils.createIsRenderedBoundValue(INFO_RETURN_CHILD)));




    // Create the area containing the footer

    MarlinBean footerTable = new MarlinBean(TABLE_LAYOUT_NAME);
    footerTable.setAttributeValue( WIDTH_ATTR, ONE_HUNDRED_PERCENT_ATTRIBUTE_VALUE);

    MarlinBean globalButtonsRow = new MarlinBean(ROW_LAYOUT_NAME);
    MarlinBean globalButtonsCell = new MarlinBean(CELL_FORMAT_NAME);
    globalButtonsCell.setAttributeValue( H_ALIGN_ATTR, CENTER_ATTRIBUTE_VALUE);
    globalButtonsCell.addIndexedChild(
                        ContextPoppingUINode.getUINode(NAVIGATION_GLOBAL_CHILD));
    globalButtonsRow.addIndexedChild( globalButtonsCell);
    footerTable.addIndexedChild( globalButtonsRow);

    MarlinBean copyrightRow = new MarlinBean(ROW_LAYOUT_NAME);
    MarlinBean copyrightCell = new MarlinBean(CELL_FORMAT_NAME);
    copyrightCell.setAttributeValue( H_ALIGN_ATTR, CENTER_ATTRIBUTE_VALUE);
    copyrightCell.setStyleClass( AF_PANEL_PAGE_COPYRIGHT_STYLE_CLASS ) ;
    copyrightCell.addIndexedChild(ContextPoppingUINode.getUINode(APP_COPYRIGHT_CHILD));
    copyrightRow.addIndexedChild( copyrightCell);
    footerTable.addIndexedChild( copyrightRow);


    MarlinBean privacyRow = new MarlinBean(ROW_LAYOUT_NAME);
    MarlinBean privacyCell = new MarlinBean(CELL_FORMAT_NAME);
    privacyCell.setAttributeValue( H_ALIGN_ATTR, CENTER_ATTRIBUTE_VALUE);
    privacyCell.setStyleClass( AF_PANEL_PAGE_PRIVACY_STYLE_CLASS ) ;
    privacyCell.addIndexedChild(ContextPoppingUINode.getUINode(APP_PRIVACY_CHILD));
    privacyRow.addIndexedChild( privacyCell);
    footerTable.addIndexedChild( privacyRow);


    MarlinBean aboutRow = new MarlinBean(ROW_LAYOUT_NAME);
    MarlinBean aboutCell = new MarlinBean(CELL_FORMAT_NAME);
    aboutCell.setAttributeValue( H_ALIGN_ATTR, CENTER_ATTRIBUTE_VALUE);
    aboutCell.setStyleClass( AF_PANEL_PAGE_ABOUT_STYLE_CLASS ) ;
    aboutCell.addIndexedChild(ContextPoppingUINode.getUINode(APP_ABOUT_CHILD));
    aboutRow.addIndexedChild( aboutCell);
    footerTable.addIndexedChild( aboutRow);




    MarlinBean footer = new MarlinBean(FLOW_LAYOUT_NAME);
    MarlinBean footerLine = new MarlinBean(CONTENT_FOOTER_NAME);
    footer.addIndexedChild(footerLine);
    footer.addIndexedChild(footerTable);

    BoundValue renderFooter = new OrBoundValue(new BoundValue[]{
               PdaHtmlLafUtils.createIsRenderedBoundValue(APP_PRIVACY_CHILD),
               PdaHtmlLafUtils.createIsRenderedBoundValue(APP_ABOUT_CHILD),
               PdaHtmlLafUtils.createIsRenderedBoundValue(APP_COPYRIGHT_CHILD),
               PdaHtmlLafUtils.createIsRenderedBoundValue(NAVIGATION_GLOBAL_CHILD)
                   });
    footer.setAttributeValue( RENDERED_ATTR, renderFooter);




    MarlinBean content = new MarlinBean(STACK_LAYOUT_NAME);
     content.addIndexedChild( ContextPoppingUINode.getUINode(LOCATION_CHILD));
    content.addIndexedChild( contentRoot );
    content.addIndexedChild(pageButtonsLine);

    //
    // Add the footer children
    //
    content.addIndexedChild(
                       ContextPoppingUINode.getUINode(ACTIONS_CHILD));
    content.addIndexedChild(
                       ContextPoppingUINode.getUINode(INFO_RETURN_CHILD));

    MarlinBean compositeRoot = new MarlinBean(FLOW_LAYOUT_NAME);

    // delegate all of the attributes to the RootAttribtueMap
    compositeRoot.setAttributeMap(RootAttributeMap.getAttributeMap());

    compositeRoot.addIndexedChild(headerLayout);

    compositeRoot.addIndexedChild(
                             ContextPoppingUINode.getUINode( MESSAGES_CHILD ));

    compositeRoot.addIndexedChild(content);

    compositeRoot.addIndexedChild(footer);

    return compositeRoot;
  }
View Full Code Here

   * header to use if the first client global header doesn't exist or
   * isn't rendered.
   */
  private static UINode _createGlobalHeaders()
  {
    MarlinBean globalHeaders = new MarlinBean(FLOW_LAYOUT_NAME);

    //
    // add the client header
    //
    globalHeaders.addIndexedChild(
                       ContextPoppingUINode.getUINode(NAVIGATION2_CHILD));

    //
    // create and add the default header
    //
    MarlinBean defaultHeader = new MarlinBean(GLOBAL_HEADER_NAME);

    defaultHeader.setAttributeValue(
            RENDERED_ATTR,
            new NotBoundValue(
               PdaHtmlLafUtils.createIsRenderedBoundValue(NAVIGATION2_CHILD)));

    globalHeaders.addIndexedChild(defaultHeader);
View Full Code Here

public class PageHeaderLayoutRenderer extends UINodeRenderer
                                      implements UIConstants
{
  private static UINode _createCompositeUINode()
  {
    MarlinBean brandingFlow = new MarlinBean(FLOW_LAYOUT_NAME);

    MarlinBean spacer = new MarlinBean(SPACER_NAME);
    spacer.setAttributeValue(WIDTH_ATTR, "5");
    spacer.setAttributeValue(HEIGHT_ATTR, "1");

    brandingFlow.setNamedChild(SEPARATOR_CHILD, spacer);
    brandingFlow.addIndexedChild(
      ContextPoppingUINode.getUINode(BRANDING_CHILD));
    brandingFlow.addIndexedChild(
      ContextPoppingUINode.getUINode(BRANDING_APP_CHILD));

    MarlinBean compositeRoot = new MarlinBean(STACK_LAYOUT_NAME);

    // delegate all of the attributes to the RootAttribtueMap
    compositeRoot.setAttributeMap(RootAttributeMap.getAttributeMap());

    compositeRoot.addIndexedChild(brandingFlow);
    compositeRoot.addIndexedChild(
      ContextPoppingUINode.getUINode(NAVIGATION1_CHILD));
    compositeRoot.addIndexedChild(
      ContextPoppingUINode.getUINode(NAVIGATION2_CHILD));

    return compositeRoot;
  }
View Full Code Here

    long             value,
    String           sizeKey,
    int              size
    )
  {
    MarlinBean submitButton = new MarlinBean(UIConstants.SUBMIT_BUTTON_NAME);
    submitButton.setID(buttonID);
    submitButton.setAttributeValue(UIConstants.FORM_NAME_ATTR, formName);
    submitButton.setAttributeValue(UIConstants.UNVALIDATED_ATTR, Boolean.valueOf(!validate));
    submitButton.setAttributeValue(UIConstants.TEXT_ATTR, buttonText);
    submitButton.setAttributeValue(UIConstants.ACCESS_KEY_ATTR,
                                   buttonAccessKey);

    submitButton.setAttributeValue(UIConstants.NAME_VALUES_ATTR,
                                   _createKeyValueArray(eventKey,
                                                        sourceKey,
                                                        source,
                                                        valueKey,
                                                        value,
View Full Code Here

    )throws IOException
  {

    ResponseWriter writer = context.getResponseWriter();

    MarlinBean text = new MarlinBean(STYLED_TEXT_NAME);
    RenderingContext arc = RenderingContext.getCurrentInstance();
    FacesContext fContext = context.getFacesContext();
    icon.renderIcon(fContext, arc, null);

    if (icon != null)
      writer.write(" ");

    String messageKey = _MESSAGE_TYPE_KEYS[messageType];

    text.setStyleClass(messageStyle);
    text.setAttributeValue(TEXT_ATTR, getTranslatedString(context, messageKey) );

    //PH: Create BODY Styling for the entire MessageBox.
  writer.startElement("table", null);
  renderStyleClassAttribute(context, "af|messages::body");
  writer.startElement("tr", null);
  writer.startElement("td", null);


    writer.startElement("b", node.getUIComponent());
    text.render(context);

    if (message != null)
    {
      writer.startElement("br", null);
      writer.endElement("br");
View Full Code Here

  {

    //
    // Create the page header area
    //
    MarlinBean globalHeaders = _sCreateGlobalHeader();

    // 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);

    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";

    MarlinBean content =
      new MarlinBean(BORDER_LAYOUT_NAME);

    content.setNamedChild(INNER_TOP_CHILD, locatorLayout);
    content.setNamedChild(INNER_BOTTOM_CHILD, contentFooterStackLayout);
    content.setNamedChild(INNER_END_CHILD, endChildSeparator);
    content.setNamedChild(START_CHILD, startRegionLayout);
    content.setNamedChild(END_CHILD, endRegionLayout);


    // Add an anchor at the start of the content, so that screen reader
    // users may jump to this location from a link at the top of the page.
    MarlinBean anchor = new MarlinBean(LINK_NAME);
    anchor.setAttributeValue(NAME_ATTR, skipNavigationAnchor);
    anchor.setAttributeValue(RENDERED_ATTR,
                             UseAccessibilityBoundValue.sharedInstance());
    content.addIndexedChild(anchor);

    content.addIndexedChild(noTitleContentLayout);

    MarlinBean compositeRoot = new MarlinBean(FLOW_LAYOUT_NAME);
    // delegate all of the attributes to the RootAttributeMap
    compositeRoot.setAttributeMap(RootAttributeMap.getAttributeMap());
    compositeRoot.addIndexedChild(
        _sCreateSkipNavigationLink(skipNavigationAnchor));
    compositeRoot.addIndexedChild(pageHeader);
    compositeRoot.addIndexedChild(content);
    compositeRoot.addIndexedChild(footer);
    return compositeRoot;
  }
View Full Code Here

    boolean          isBack,
    Object           buttonText,
    String           destinationURL
    )
  {
    MarlinBean urlLink = new MarlinBean(LINK_NAME);

    urlLink.setAttributeValue(TEXT_ATTR, buttonText);
    urlLink.setAttributeValue(DESTINATION_ATTR, destinationURL);
    urlLink.setAttributeValue(STYLE_CLASS_ATTR, NAV_BAR_ALINK_STYLE_CLASS);   

    return urlLink;
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidadinternal.ui.beans.MarlinBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.