Package org.apache.myfaces.trinidad.component

Examples of org.apache.myfaces.trinidad.component.UIXShowDetail


        if (comp == event.getComponent())
          continue;

        if (comp instanceof UIXShowDetail)
        {
          UIXShowDetail showDetail = (UIXShowDetail) comp;
          // Queue an event to hide the currently expanded showDetail
          if (showDetail.isDisclosed())
            (new DisclosureEvent(showDetail, false)).queue();
        }
      }
    }
    super.queueEvent(event);
View Full Code Here


      UIComponent   component,
      VisitCallback visitCallback)
    {
      if (component instanceof UIXShowDetail)
      {
        UIXShowDetail showDetail = (UIXShowDetail)component;
        if (_isShowDetailForCurrentComponent(showDetail))
        {
          if (_foundItemToRender || !isChildSelected(showDetail))
          {
            // We already visited the one to be shown
View Full Code Here

    boolean oneIsDisclosed = false;
    for (int i=0; i<childCount; i++)
    {
      if (children.get(i) instanceof UIXShowDetail)
      {
        UIXShowDetail child =  (UIXShowDetail) children.get(i);
        if (child.isDisclosed())
        {
          oneIsDisclosed = true;
          break;
        }
      } else
      {
        _LOG.warning("ONLY_SHOWDETAILITEM_ALLOWED_AS_PANELTABBED_CHILD");
      }
    }

    // OK, nothing's selected: pick the first non-disabled item
    if (!oneIsDisclosed)
    {
      for (int i=0; i<childCount; i++)
      {
        if (children.get(i) instanceof UIXShowDetail)
        {
          UIXShowDetail child =  (UIXShowDetail) children.get(i);
          if (!child.isRendered())
            continue;

          Object disabled = child.getAttributes().get("disabled");
          if (Boolean.TRUE.equals(disabled))
            continue;
         
          if (!child.isDisclosedTransient())
          {
            child.setDisclosed(true);
          }
          break;
        }
      }
    }
View Full Code Here

  {
    _LOG.entering("ShowOneListRendererBase", "encodeBegin");
    List<UIComponent> children = component.getChildren();
    int numChildren = children.size();
    UIComponent disclosedChild = null;
    UIXShowDetail renderableChild = null;

    for (int indxChild = 0; indxChild < numChildren ; indxChild++ )
    {
      UIComponent child = children.get(indxChild);
      if (! (child instanceof UIXShowDetail) )
      {
        continue;
      }

      UIXShowDetail detailChild = (UIXShowDetail) children.get(indxChild);

      if (detailChild.isRendered())
      {
        // Mark the first renderable child
        Object disabled =
          detailChild.getAttributes().get(
            UIConstants.DISABLED_ATTR.getAttributeName());
        if (Boolean.TRUE.equals(disabled))
        {
          continue;
        }
        if (renderableChild == null)
        {
          renderableChild = detailChild;
        }
        if (detailChild.isDisclosed())
        {
          disclosedChild = detailChild;
        }
      }
    }
View Full Code Here

      }

      // only CoreShowDetailItem children are rendered. Rest are ignored.
      if ( (child instanceof UIXShowDetail))
      {
        UIXShowDetail detailChild = (UIXShowDetail) child;
        if (detailChild.isDisclosed())
        {
          returnId = detailChild.getClientId(context);
          break;
        }
      }
    }
    return returnId;
View Full Code Here

        if (comp == event.getComponent())
          continue;

        if (comp instanceof UIXShowDetail)
        {
          UIXShowDetail showDetail = (UIXShowDetail) comp;
          // Queue an event to hide the currently expanded showDetail
          if (showDetail.isDisclosed())
            (new DisclosureEvent(showDetail, false)).queue();
        }
      }
    }
    super.queueEvent(event);
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.component.UIXShowDetail

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.