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

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


      {
        shortDesKey = _DISABLED_NEXT_DESC_KEY;
      }
    }

    MarlinBean arrow = new MarlinBean(IMAGE_NAME);
    arrow.setAttributeValue(SOURCE_ATTR, iconURI);
    arrow.setAttributeValue(SHORT_DESC_ATTR,
                            getTranslatedValue(context, shortDesKey));

    // if not a link, we're done;
    if (destination != null)
    {
      arrow.setAttributeValue(DESTINATION_ATTR, destination);
      arrow.setOnClick(onClick);
    }

    return arrow;
  }
View Full Code Here


                  implements UIConstants, XhtmlLafConstants
{
  private static UINode _createCompositeUINode()
  {

    MarlinBean globalNavigation = new MarlinBean(TABLE_LAYOUT_NAME);
    globalNavigation.setAttributeValue(WIDTH_ATTR, ONE_HUNDRED_PERCENT_ATTRIBUTE_VALUE);
    globalNavigation.addIndexedChild(_fullWidthTableRow(NAVIGATION_GLOBAL_CHILD));
    //
    // Create the page header layout
    //
    MarlinBean headerLayout = new MarlinBean(PAGE_HEADER_LAYOUT_NAME);

    headerLayout.setNamedChild(MENU_SWITCH_CHILD,
                    ContextPoppingUINode.getUINode(MENU_SWITCH_CHILD));

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

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

    headerLayout.setNamedChild(NAVIGATION2_CHILD, _createGlobalHeaders());

    headerLayout.setNamedChild(SEARCH_CHILD,
                    ContextPoppingUINode.getUINode(SEARCH_CHILD));

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

    //
    // Create layout used for locators at the top of the page
    //
    MarlinBean locatorLayout = new MarlinBean(STACK_LAYOUT_NAME);
    locatorLayout.addIndexedChild(
                   ContextPoppingUINode.getUINode(LOCATION_CHILD));
    locatorLayout.addIndexedChild(
                   ContextPoppingUINode.getUINode(INFO_USER_CHILD));
    locatorLayout.addIndexedChild(
                   ContextPoppingUINode.getUINode(MESSAGES_CHILD));
    locatorLayout.addIndexedChild(
                   ContextPoppingUINode.getUINode(INFO_SUPPLEMENTAL_CHILD));
    locatorLayout.addIndexedChild(
                   ContextPoppingUINode.getUINode(INFO_STATUS_CHILD));

    //
    // 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(new BoundValue[]{
         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);
    footerTable.addIndexedChild(_fullWidthTableRow(APP_COPYRIGHT_CHILD));
    footerTable.addIndexedChild(_fullWidthTableRow(APP_PRIVACY_CHILD));
    footerTable.addIndexedChild(_fullWidthTableRow(APP_ABOUT_CHILD));

    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)});
              
    footer.setAttributeValue( RENDERED_ATTR, renderFooter);

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


    content.addIndexedChild(pageButtonsLine);

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


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

    MarlinBean actionButtonRow = new MarlinBean(ROW_LAYOUT_NAME);
    MarlinBean actionButtonCell = new MarlinBean(CELL_FORMAT_NAME);
    actionButtonCell.setAttributeValue( H_ALIGN_ATTR, CENTER_ATTRIBUTE_VALUE);
    actionButtonCell.addIndexedChild(
                        ContextPoppingUINode.getUINode(ACTIONS_CHILD));
    actionButtonRow.addIndexedChild( actionButtonCell);
    action.addIndexedChild( actionButtonRow);


    MarlinBean compositeRoot = new MarlinBean(FLOW_LAYOUT_NAME);

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

    compositeRoot.addIndexedChild(globalNavigation);
    compositeRoot.addIndexedChild(headerLayout);
    compositeRoot.addIndexedChild(locatorLayout);
    compositeRoot.addIndexedChild(content);
    compositeRoot.addIndexedChild(action);
    compositeRoot.addIndexedChild(footer);

    return compositeRoot;
  }
View Full Code Here

   * facet name in the parameter.
   */
  private static MarlinBean _fullWidthTableRow (
    String childName)
  {
    MarlinBean row = new MarlinBean(ROW_LAYOUT_NAME);
    MarlinBean cell = new MarlinBean(CELL_FORMAT_NAME);
    cell.setAttributeValue(H_ALIGN_ATTR, CENTER_ATTRIBUTE_VALUE);
    cell.addIndexedChild(
                        ContextPoppingUINode.getUINode(childName));
    row.addIndexedChild(cell);
    return row;
  }
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

    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

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));
    brandingFlow.addIndexedChild(
      ContextPoppingUINode.getUINode(BRANDING_APP_CONTEXTUAL_CHILD));

    MarlinBean compositeRoot = new MarlinBean(STACK_LAYOUT_NAME);

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

    compositeRoot.addIndexedChild(
      ContextPoppingUINode.getUINode(NAVIGATION_GLOBAL_CHILD));
    brandingFlow.addIndexedChild(
      ContextPoppingUINode.getUINode(MENU_SWITCH_CHILD));

    compositeRoot.addIndexedChild(brandingFlow);
    compositeRoot.addIndexedChild(
      ContextPoppingUINode.getUINode(NAVIGATION1_CHILD));
    compositeRoot.addIndexedChild(
      ContextPoppingUINode.getUINode(NAVIGATION2_CHILD));
    compositeRoot.addIndexedChild(
      ContextPoppingUINode.getUINode(SEARCH_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);
    return submitButton;
  }
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();
    if (icon != null)
    {
      icon.renderIcon(fContext, arc, null);
      writer.writeText(NBSP_STRING, null);
    }

    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

    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

  private MutableUINode _createSingleItemURLButton(
    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.