Examples of BaseMutableUINode


Examples of org.apache.myfaces.trinidadinternal.ui.BaseMutableUINode

  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);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.BaseMutableUINode

    ResponseWriter writer,
    boolean isGlobal,
    boolean useList
    ) throws IOException
  {
    BaseMutableUINode currentChild = null;
    String summary;
    String detail;

    Iterator<MessageWrapper> itr = (isGlobal
                    ? MessageBoxUtils.sGetGlobalsIterator(context)
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.BaseMutableUINode

  private BaseMutableUINode _generateChild(
    MessageWrapper   msg,
    BaseMutableUINode cachedChild)
  {
    if (cachedChild == null)
      cachedChild = new BaseMutableUINode(MARLIN_NAMESPACE, LINK_NAME);

    // link text
    String label = msg.getLabel();
    cachedChild.setAttributeValue(TEXT_ATTR, label);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.BaseMutableUINode

    ResponseWriter writer,
    boolean isGlobal,
    boolean useList
    ) throws IOException
  {
    BaseMutableUINode currentChild = null;
    String summary;
    String detail;

    Iterator<MessageWrapper> itr = (isGlobal
                    ? MessageBoxUtils.sGetGlobalsIterator(context)
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.BaseMutableUINode

  private BaseMutableUINode _generateChild(
    MessageWrapper   msg,
    BaseMutableUINode cachedChild)
  {
    if (cachedChild == null)
      cachedChild = new BaseMutableUINode(MARLIN_NAMESPACE, LINK_NAME);

    // link text
    String label = msg.getLabel();
    cachedChild.setAttributeValue(TEXT_ATTR, label);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.BaseMutableUINode

    ResponseWriter writer,
    boolean isGlobal,
    boolean useList
    ) throws IOException
  {
    BaseMutableUINode currentChild = null;
    String summary;
    String detail;

    Iterator<MessageWrapper> itr = (isGlobal
                    ? MessageBoxUtils.sGetGlobalsIterator(context)
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.BaseMutableUINode

  private BaseMutableUINode _generateChild(
    MessageWrapper   msg,
    BaseMutableUINode cachedChild)
  {
    if (cachedChild == null)
      cachedChild = new BaseMutableUINode(MARLIN_NAMESPACE, LINK_NAME);

    // link text
    String label = msg.getLabel();
    cachedChild.setAttributeValue(TEXT_ATTR, label);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.BaseMutableUINode

  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);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.BaseMutableUINode

    ResponseWriter writer,
    boolean isGlobal,
    boolean useList
    ) throws IOException
  {
    BaseMutableUINode currentChild = null;
    String summary;
    String detail;

    Iterator<MessageWrapper> itr = (isGlobal
                    ? MessageBoxUtils.sGetGlobalsIterator(context)
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.BaseMutableUINode

  private BaseMutableUINode _generateChild(
    MessageWrapper   msg,
    BaseMutableUINode cachedChild)
  {
    if (cachedChild == null)
      cachedChild = new BaseMutableUINode(MARLIN_NAMESPACE, LINK_NAME);

    // link text
    String label = msg.getLabel();
    cachedChild.setAttributeValue(TEXT_ATTR, label);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.