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

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


    MutableUINode link;

    if (records > 0)
    {
      link = new MarlinBean(LINK_NAME);
      link.setAttributeValue(DESTINATION_ATTR, destination);
      link.setAttributeValue(ON_CLICK_ATTR, onClick);
      link.setAttributeValue(STYLE_CLASS_ATTR, NAV_BAR_ALINK_STYLE_CLASS);
    }
    else
    {
      link = new MarlinBean(STYLED_TEXT_NAME);
      link.setAttributeValue(STYLE_CLASS_ATTR, NAV_BAR_ILINK_STYLE_CLASS);
    }

    link.setAttributeValue(TEXT_ATTR, text);
View Full Code Here


      {
        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

  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

                                     new DataBoundValue(ICON_SHORT_DESC_KEY);
    DefaultingBoundValue iconShortDesc =
                         new DefaultingBoundValue(specifiedIconShortDesc,
                                                  defaultIconShortDesc);

    MarlinBean icon = new MarlinBean(IMAGE_NAME);
    icon.setAttributeValue(SOURCE_ATTR, iconSource);
    icon.setAttributeValue(STYLE_CLASS_ATTR, TREE_ICON_STYLE_CLASS);
    icon.setAttributeValue(WIDTH_ATTR, _ICON_WIDTH);
    icon.setAttributeValue(HEIGHT_ATTR, _NODE_ICON_HEIGHT);
    icon.setAttributeValue(SHORT_DESC_ATTR, iconShortDesc);
    return icon;
  }
View Full Code Here

  }

  // create the UINode that will be used as the default stamp:  link
  private static UINode _createDefaultStamp()
  {
    MarlinBean link = new MarlinBean(LINK_NAME);
    link.setAttributeValue(TEXT_ATTR, new DataBoundValue(TEXT_KEY));
    link.setAttributeValue(DESTINATION_ATTR, DESTINATION_KEY);
    link.setAttributeValue(TARGET_FRAME_ATTR,
                           new DataBoundValue(TARGET_FRAME_KEY));

    return link;
  }
View Full Code Here

    return _INSTANCE;
  }
 
  private static UINode _createCompositeUINode()
  {
    MarlinBean headerContent = new MarlinBean(STACK_LAYOUT_NAME);
    headerContent.setIndexedNodeList(RootUINodeList.getNodeList());   

    MarlinBean noTitleFlowLayout = new MarlinBean(FLOW_LAYOUT_NAME);
    noTitleFlowLayout.addIndexedChild(
      ContextPoppingUINode.getUINode(INFO_STATUS_CHILD));
    noTitleFlowLayout.addIndexedChild(headerContent);

    MarlinBean node = new MarlinBean(STACK_LAYOUT_NAME);
    node.addIndexedChild(ContextPoppingUINode.getUINode(MESSAGES_CHILD));
    node.addIndexedChild(noTitleFlowLayout);

    return node;
  }
View Full Code Here

    {
      ResponseWriter writer = context.getResponseWriter();
      writer.endElement("map");
      String navBlockEndAnchorName = (String)context.getLocalProperty(0,
                                      _NAV_BLOCK_END_ANCHOR_NAME_KEY, null);
      MarlinBean navBlockEndAnchor = new MarlinBean(UIConstants.LINK_NAME);
      navBlockEndAnchor.setAttributeValue(UIConstants.NAME_ATTR, navBlockEndAnchorName);
      navBlockEndAnchor.render(context);
    }
  }
View Full Code Here

    UIXRenderingContext context,
    String skipNavigationAnchor,
    String altText
    ) throws IOException
  {
    MarlinBean skipLink = new MarlinBean(UIConstants.IMAGE_NAME);
    skipLink.setAttributeValue(UIConstants.DESTINATION_ATTR, "#"+skipNavigationAnchor);
    skipLink.setAttributeValue(UIConstants.SHORT_DESC_ATTR,
                               altText);
    skipLink.setAttributeValue(UIConstants.SOURCE_ATTR, new IconURIBoundValue(TRANSPARENT_GIF));
    //--pu-- Hack: Use the existing label hiding class for hiding images as well
    skipLink.setStyleClass(XhtmlLafConstants.HIDDEN_LABEL_STYLE_CLASS);
    skipLink.render(context);
  }
View Full Code Here

    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

    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);
                                  
    String nameAttri = XhtmlUtils.getEncodedNameAttribute (
                      //Array should be in the order of parameter name and value pair
                              new String[]{sourceKey,
                                           source,
                                           eventKey,
                                           UIConstants.GOTO_EVENT,
                                           valueKey,
                                           Long.toString(value),
                                           sizeKey,
                                           Integer.toString(size)});
                                              
    submitButton.setAttributeValue(UIConstants.NAME_ATTR, nameAttri);
   
    return submitButton;
  }
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.