Package org.apache.myfaces.trinidadinternal.ui

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


    if (newPath != null)
    {
      UIXHierarchy component = getHierarchyBase(context, node);
      Object oldPath = component.getRowKey();
      component.setRowKey(newPath);
      UINode stamp = getStamp(context, node);
      int size = component.getRowCount();

      for (int i = 0; i < size; i++)
      {
        component.setRowIndex(i);
View Full Code Here


    UIXRenderingContext context,
    UINode           node
    ) throws IOException
  {
    UIXHierarchy component = getHierarchyBase(context, node);
    UINode stamp = getStamp(context, node);

    if(stamp != null)
    {
      Object oldPath = component.getRowKey();
      boolean isNewPath = setNewPath(context, node, component);
View Full Code Here

                          sizeKey,
                          partialTargetsKey,
                          partialTargets);
    }

    UINode backButton = null;

    // set up the back button
    if (showBackButton)
    {
      BoundValue buttonTextandAccessKeyBV =
                           new SkinTranslatedBoundValue( _SINGLE_BACK_TEXT_KEY);


      Object buttonTextBV = new AccessKeyBoundValue(buttonTextandAccessKeyBV,
                                                    false);

      Object buttonAccessKeyBV = new AccessKeyBoundValue(
                                                    buttonTextandAccessKeyBV,
                                                    true);

      if (supportsScripting)
      {
        component.setRowIndex(backButtonIndex);
        boolean immediate = Boolean.TRUE.equals(
                          stamp.getAttributes().get(UIXCommand.IMMEDIATE_KEY));
        Object destination = stamp.getAttributes().get("destination");
        component.setRowIndex(currentIndex);

        backButton = createSingleItemSubmitButton(
                                true,
                                buttonTextBV,
                                buttonAccessKeyBV,
                                destination,
                                ProcessUtils.getSubmitScriptCall(
                                    context,
                                    formName,
                                    eventKey,
                                    sourceKey,
                                    nameString,
                                    valueKey,
                                    selectedIndex - 1,
                                    sizeKey,
                                    0,
                                    !immediate,
                                    null,
                                    null));
      }
      else
      {
        backButton = ProcessUtils.createSubmitButton(context,
                                                     buttonTextBV,
                                                     buttonAccessKeyBV,
                                                     null,
                                                     formName,
                                                     false,
                                                     eventKey,
                                                     sourceKey,
                                                     nameString,
                                                     valueKey,
                                                     selectedIndex - 1,
                                                     sizeKey,
                                                     0);
      }
    }

    UINode nextButton = null;

     // set up the next button
    if (showNextButton)
    {
View Full Code Here

  protected void renderPostChoice(
    UIXRenderingContext context,
    UINode           node
    ) throws IOException
  {
      UINode nextButton =
                    (UINode)context.getLocalProperty(0,_NEXT_BUTTON_KEY, null);

      // start rendering
      ResponseWriter writer = context.getResponseWriter();
      boolean renderAsTable = _renderAsTable(context, node);
      // don't render the next button on last step
      if (nextButton != null)
      {
        writer.endElement("td");

        _renderSpacerCell(context);

        _renderStartTableCell(context, node, writer, renderAsTable, false);

        nextButton.render(context);
        context.setLocalProperty(_NEXT_BUTTON_KEY, null);

      }

      writer.endElement("td");
View Full Code Here

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

    }
    public Object getValue(
      UIXRenderingContext context
    )
    {
      UINode node = (UINode)_componentBV.getValue(context);
      UIXPage component = (UIXPage)node.getUIComponent();
      Object oldPath = component.getRowKey();

      boolean isNewPath = PageRendererUtils.setNewPath(context,
                                                       component,
                                                       _startDepth);
View Full Code Here

    BaseLafUtils.setRenderingProperty(context, _DATA_OBJECT_LIST_KEY, list);

    __setDataObjectUsedMode(context, true);
    for (int childIndex = 0; childIndex < childCount; childIndex++)
    {
      UINode child = parent.getIndexedChild(context, childIndex);
      // needed for TrainRenderer. It is important to know what child index
      // this is, not just the index of the visible children.
      BaseLafUtils.setRenderingProperty(context,
                                        _CURRENT_INDEX_KEY,
                                        childIndex);

      if ((child != null) &&
          !Boolean.FALSE.equals(
             child.getAttributeValue(context, UIConstants.RENDERED_ATTR)))
      {
        context.pushChild(child, null, childIndex);
        context.pushRenderedChild(context, child);

        try
        {
          child.render(context);
        }
        finally
        {
          context.popRenderedChild(context);
          context.popChild();
View Full Code Here

      ldo.setSelected(true);
    }

    for (int childIndex = 0; childIndex < indexedChildCount; childIndex++)
    {
      UINode child = parent.getIndexedChild(context, childIndex);
      // needed for TrainRenderer. It is important to know what child index
      // this is, not just the index of the visible children.
      BaseLafUtils.setRenderingProperty(context,
                                        _CURRENT_INDEX_KEY,
                                        childIndex);

      if ((child != null) &&
          !Boolean.FALSE.equals(
             child.getAttributeValue(context, UIConstants.RENDERED_ATTR)))
      {
        context.pushChild(child, null, childIndex);
        context.pushRenderedChild(context, child);

        try
        {
          child.render(context);
        }
        finally
        {
          context.popRenderedChild(context);
          context.popChild();
View Full Code Here

  protected UIXHierarchy getHierarchyBase(
    UIXRenderingContext context,
    UINode           node
  )
  {   
    UINode pageNode = context.getParentContext().getAncestorNode(0);
    return (UIXPage) pageNode.getUIComponent();  
  }
View Full Code Here

  protected UINode getStamp(
    UIXRenderingContext context,
    UINode           node
    )
  {
    UINode pageNode = context.getParentContext().getAncestorNode(0);    
    return getNamedChild(context, pageNode, NODE_STAMP_CHILD);
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidadinternal.ui.UINode

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.