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

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


   */
  private static MarlinBean _sCreateSkipNavigationLink(
    String skipNavigationAnchor
    )
  {
    MarlinBean skipNavigationLink = new MarlinBean(LINK_NAME);
    BoundValue skipNavigationText =
      new SkinTranslatedBoundValue(_SKIP_PAST_NAVIGATION);
    skipNavigationLink.setAttributeValue(DESTINATION_ATTR, "#"+skipNavigationAnchor);
    skipNavigationLink.setAttributeValue(UIConstants.TEXT_ATTR,
                                         skipNavigationText);
    skipNavigationLink.setAttributeValue(UIConstants.RENDERED_ATTR,
      new AndBoundValue(
        new PageLayoutRenderer.NetscapeBoundValue(Boolean.FALSE,
                               Boolean.TRUE),
        UseAccessibilityBoundValue.sharedInstance()));
    skipNavigationLink.setAttributeValue(STYLE_CLASS_ATTR,_ORA_HIDE_SKIP_NAVI_TEXT);
    return skipNavigationLink;
  }
View Full Code Here


   */
  private static MarlinBean _sCreateGlobalHeader()
  {

    // create an empty global header
    MarlinBean emptyGlobalHeader = new MarlinBean(GLOBAL_HEADER_NAME);
    // bind rendered to false if there is page header child
    BoundValue rendered = new NotBoundValue(
           BaseDesktopUtils.createIsRenderedBoundValue(NAVIGATION2_CHILD));
    emptyGlobalHeader.setAttributeValue(RENDERED_ATTR,rendered);

    MarlinBean globalHeaders = new MarlinBean(STACK_LAYOUT_NAME);
    globalHeaders.addIndexedChild(
              ContextPoppingUINode.getUINode(NAVIGATION2_CHILD));
    globalHeaders.addIndexedChild(emptyGlobalHeader);
    return globalHeaders;
  }
View Full Code Here

  private static MarlinBean _sCreatePageHeader(
    UINode globalHeader,
    UINode quickSearch
    )
  {
    MarlinBean pageHeader = new MarlinBean(PAGE_HEADER_LAYOUT_NAME);

    _setPoppedChild(pageHeader, NAVIGATION1_CHILD);
    _setPoppedChild(pageHeader, ADVERTISEMENT_LARGE_CHILD);
    _setPoppedChild(pageHeader, ADVERTISEMENT_MEDIUM_CHILD);
    _setPoppedChild(pageHeader, BRANDING_CHILD);
    _setPoppedChild(pageHeader, BRANDING_COOPERATIVE_CHILD);
    _setPoppedChild(pageHeader, BRANDING_APP_CHILD);
    _setPoppedChild(pageHeader, BRANDING_APP_CONTEXTUAL_CHILD);
    _setPoppedChild(pageHeader, NAVIGATION_GLOBAL_CHILD);
    _setPoppedChild(pageHeader, MENU_SWITCH_CHILD);
    pageHeader.setNamedChild(SEARCH_CHILD, quickSearch);
    pageHeader.setNamedChild(NAVIGATION2_CHILD, globalHeader);

    BoundValue chromeTypeBV =
      RootAttributeBoundValue.getBoundValue(CHROME_TYPE_ATTR);
    pageHeader.setAttributeValue(CHROME_TYPE_ATTR, chromeTypeBV);
    return pageHeader;
  }
View Full Code Here

  /**
   * Creates the footer
   */
  private static MarlinBean _sCreateFooterBean()
  {
    MarlinBean footer = new MarlinBean(FOOTER_NAME);
    _setPoppedChild(footer, APP_COPYRIGHT_CHILD);
    _setPoppedChild(footer, APP_PRIVACY_CHILD);
    _setPoppedChild(footer, APP_ABOUT_CHILD);
    return footer;
  }
View Full Code Here

  private static MutableUINode _createContentLayout(
    UINodeList nodeList
    )
  {
    MarlinBean contentLayout = new MarlinBean(STACK_LAYOUT_NAME);
    contentLayout.setIndexedNodeList(nodeList);

    return contentLayout;
  }
View Full Code Here

  private static UINode _sCreateContentTop(
    boolean useContextSwitcher
  )
  {
    MarlinBean table = new MarlinBean(TABLE_LAYOUT_NAME);
    table.setAttributeValue(WIDTH_ATTR, "100%");
    table.setAttributeValue(CELL_PADDING_ATTR, "0");
    table.setAttributeValue(CELL_SPACING_ATTR, "0");

    MarlinBean row = new MarlinBean(ROW_LAYOUT_NAME);
    row.setAttributeValue(V_ALIGN_ATTR, "top");
    table.addIndexedChild(row);

    // cell to add page status to
    MarlinBean statusCell = new MarlinBean(CELL_FORMAT_NAME);
    statusCell.setAttributeValue(WIDTH_ATTR, "100%");
    MarlinBean stack = new MarlinBean(STACK_LAYOUT_NAME);

    if ( useContextSwitcher)
    {
      stack.addIndexedChild(
                     ContextPoppingUINode.getUINode( CONTEXT_SWITCHER_CHILD));
    }

    stack.addIndexedChild(
                      ContextPoppingUINode.getUINode(INFO_STATUS_CHILD));
    statusCell.addIndexedChild(stack);
    row.addIndexedChild(statusCell);

    return table;
View Full Code Here

  * Creates the cell with the user info in it
  */
  private static MarlinBean _sCreateUserInfoCell()
  {
    // cell to add user info to
    MarlinBean userInfoCell = new MarlinBean(CELL_FORMAT_NAME);
    userInfoCell.setAttributeValue(H_ALIGN_ATTR, "end");
    userInfoCell.addIndexedChild(
                      ContextPoppingUINode.getUINode(INFO_USER_CHILD));
    return userInfoCell;
  }
View Full Code Here

  * Creates the table with one row
  * which has the locator and the user info in it
  */
  private static MarlinBean _sCreateLocatorUserInfoTable()
  {
    MarlinBean table = new MarlinBean(TABLE_LAYOUT_NAME);
    table.setAttributeValue(WIDTH_ATTR, "100%");

    MarlinBean row = new MarlinBean(ROW_LAYOUT_NAME);
    table.addIndexedChild(row);
    // add cells to the row:

    // add a  cell with the locator child
    MarlinBean locatorCell = new MarlinBean(CELL_FORMAT_NAME);
    locatorCell.addIndexedChild(
                      ContextPoppingUINode.getUINode(LOCATION_CHILD));
    row.addIndexedChild(locatorCell);
    // figure out if the locator region should be rendered

    // add a cell with some horizontal space
    MarlinBean spacerCell = new MarlinBean(CELL_FORMAT_NAME);
    MarlinBean spacer = new MarlinBean(SPACER_NAME);
    spacer.setAttributeValue(WIDTH_ATTR, "5");
    spacer.setAttributeValue(HEIGHT_ATTR, "1");
    spacerCell.addIndexedChild(spacer);
    row.addIndexedChild(spacerCell);

    // add a cell with the user info child
    MarlinBean userInfoCell = _sCreateUserInfoCell();
    row.addIndexedChild(userInfoCell);

    return table;
  }
View Full Code Here

  /**
  * Creates the table with a user info row, a spacer row, and an end row
  */
  private static MarlinBean _sCreateUserInfoEndTable()
  {
    MarlinBean table = new MarlinBean(TABLE_LAYOUT_NAME);
    table.setAttributeValue(WIDTH_ATTR, "100%");
    // add rows:

    // user info row
    MarlinBean userInfoRow = new MarlinBean(ROW_LAYOUT_NAME);
    table.addIndexedChild(userInfoRow);
    MarlinBean userInfoCell = _sCreateUserInfoCell();
    userInfoRow.addIndexedChild(userInfoCell);
    // spacer row
    MarlinBean spacerRow = new MarlinBean(ROW_LAYOUT_NAME);
    table.addIndexedChild(spacerRow);
    MarlinBean spacer = new MarlinBean(SPACER_NAME);
    spacer.setAttributeValue(HEIGHT_ATTR,"5");
    spacerRow.addIndexedChild(spacer);
    // end child row
    MarlinBean endRow = new MarlinBean(ROW_LAYOUT_NAME);
    table.addIndexedChild(endRow);
    MarlinBean endCell = new MarlinBean(CELL_FORMAT_NAME);
    endCell.addIndexedChild(
                      ContextPoppingUINode.getUINode(INFO_SUPPLEMENTAL_CHILD));
    endRow.addIndexedChild(endCell);

    return table;
  }
View Full Code Here

    BoundValue isEndRendered,
    BoundValue isUserInfoRendered
    )
  {
    // render table only if both user info and end region
    MarlinBean userEndTable = _sCreateUserInfoEndTable();
    userEndTable.setAttributeValue(
                      RENDERED_ATTR,
                      new AndBoundValue(isEndRendered, isUserInfoRendered));

    // render end region only if no user info
    MarlinBean endOnlyLayout = new MarlinBean(STACK_LAYOUT_NAME);
    MarlinBean spacer = new MarlinBean(SPACER_NAME);
    spacer.setAttributeValue(HEIGHT_ATTR,"5");
    endOnlyLayout.addIndexedChild(spacer);
    endOnlyLayout.addIndexedChild(ContextPoppingUINode.getUINode(INFO_SUPPLEMENTAL_CHILD));
    endOnlyLayout.setAttributeValue(RENDERED_ATTR,
                            new AndBoundValue(isEndRendered,
                              new NotBoundValue(isUserInfoRendered)));

    // place these two possibilities in a flowLayoutBean
    // one or the other child will be rendered if an end is rendered
    MarlinBean endLayout = new MarlinBean(FLOW_LAYOUT_NAME);
    endLayout.addIndexedChild(userEndTable);
    endLayout.addIndexedChild(endOnlyLayout);

    endLayout.setAttributeValue(RENDERED_ATTR, isEndRendered);
    return endLayout;
  }
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.