Package javax.faces.component

Examples of javax.faces.component.UIComponent


    * Have to manually wire the component as the Facelets magic wirer
    * is a package scoped class.
    */
    @Override
    protected void setAttributes(FaceletContext ctx, Object instance) {
        UIComponent cmp = (UIComponent) instance;
        setAttribute(ctx, cmp, UIWikiFormattedText.ATTR_LINK_STYLE_CLASS);
        setAttribute(ctx, cmp, UIWikiFormattedText.ATTR_BROKEN_LINK_STYLE_CLASS);
        setAttribute(ctx, cmp, UIWikiFormattedText.ATTR_ATTACHMENT_LINK_STYLE_CLASS);
        setAttribute(ctx, cmp, UIWikiFormattedText.ATTR_THUMBNAIL_LINK_STYLE_CLASS);
        setAttribute(ctx, cmp, UIWikiFormattedText.ATTR_INTERNAL_TARGET_FRAME);
View Full Code Here


    // Some utilities...

    private static UIComponent findChildByTagId(UIComponent parent, String id) {
        Iterator itr = parent.getFacetsAndChildren();
        while (itr.hasNext()) {
            UIComponent c = (UIComponent) itr.next();
            String cid = (String) c.getAttributes().get(MARK);
            if (id.equals(cid)) {
                return c;
            }
        }
        return null;
View Full Code Here

  public void encodeChildren(FacesContext facesContext, UIComponent component)
      throws IOException {   
    UISelectOne selectOne = (UISelectOne) component;
    Iterator children = selectOne.getChildren().iterator();
    while(children.hasNext()){
      UIComponent child = (UIComponent) children.next();
      if( (child instanceof UISelectItem) || (child instanceof UISelectItems)){
        renderUISelectItem(facesContext, selectOne, child);       
      }
      else {
        renderChild(facesContext, child);
View Full Code Here

  protected Iterator getSelectItems(FacesContext context, UIComponent component) {
    List<SelectItem> list = new ArrayList<SelectItem>();
    Iterator kids = component.getChildren().iterator();
    while (kids.hasNext()) {
      UIComponent kid = (UIComponent) kids.next();
      if (kid instanceof UISelectItem) {
        list.addAll(extractSelectItems(context, (UISelectItem)kid));
      } else if (kid instanceof UISelectItems && null != context) {
        list.addAll(extractSelectItems(context, (UISelectItems)kid));
      }
View Full Code Here

  }

  public static void renderChildren(FacesContext facesContext, UIComponent component) throws IOException {
    if (component.getChildCount() > 0) {
      for (Iterator it = component.getChildren().iterator(); it.hasNext();) {
        UIComponent child = (UIComponent) it.next();
        renderChild(facesContext, child);
      }
    }
  }
View Full Code Here

    }
  }
 
  protected boolean isParentSmoothlyUpdateable(UIComponent component){
    boolean smoothlyUpdateable = false;   
    UIComponent parent = component.getParent();
    Boolean parentUpdateSmoothly = (Boolean) parent.getAttributes().get("updateSmoothly");   
    if(parentUpdateSmoothly!=null){
      return parentUpdateSmoothly.booleanValue();         
    }   
    return smoothlyUpdateable;
  }
View Full Code Here

      List<UIComponent> children = uiComponent.getChildren();

      result._children = new ArrayList<Component>(children.size());

      for (int i = 0; i < childCount; i++) {
        UIComponent child = children.get(i);

        if (!(child instanceof JsfDeveloperAidLink))
          result._children.add(reflect(facesContext, children.get(i)));
      }
    }

    final int facetCount = uiComponent.getFacetCount();

    if (facetCount > 0) {
      Map<String, UIComponent> facets = uiComponent.getFacets();

      result._facets = new HashMap<String, Component>(facets.size());

      Set<String> names = facets.keySet();

      for (String name : names) {
        UIComponent child = facets.get(name);

        result._facets.put(name, reflect(facesContext, child));
      }
    }
View Full Code Here

                this.logger.warn(object.getClass() + " is no valid component");
            }
            return propertyInformation;
        }

        UIComponent uiComponent = (UIComponent) object;

        if(logger.isTraceEnabled())
        {
            logger.trace("start extracting meta-data of " + uiComponent.getClass().getName());
        }

        PropertyDetails propertyDetails = ExtValUtils.getELHelper().getPropertyDetailsOfValueBinding(uiComponent);

        if (propertyDetails == null)
View Full Code Here

                }
            }
        }
       
        // try to find it using UIComponent.getCurrentCompositeComponent()
        UIComponent component = UIComponent.getCurrentCompositeComponent(facesContext);
        while (component != null)
        {
            Location componentLocation = (Location) component.getAttributes().get(LOCATION_KEY);
            if (componentLocation != null
                    && componentLocation.getPath().equals(location.getPath()))
            {
                return component;
            }
View Full Code Here

     * @param facesContext
     * @param location
     */
    public static void saveCompositeComponentForResolver(FacesContext facesContext, Location location)
    {
        UIComponent cc = getCompositeComponentBasedOnLocation(facesContext, location);
        facesContext.getAttributes().put(CURRENT_COMPOSITE_COMPONENT_KEY, cc);
    }
View Full Code Here

TOP

Related Classes of javax.faces.component.UIComponent

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.