Examples of UIComponent


Examples of javax.faces.component.UIComponent

    * Main apply method called by facelets to create this component.
    */
    public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, ELException {
        log.debug(">>> building wiki text components for child of: " + parent.getClientId(ctx.getFacesContext()));
        String id = ctx.generateUniqueId(this.tagId);
        UIComponent cmp = findChildByTagId(parent, id);
        if (cmp == null) {
            cmp = createComponent(ctx);
            cmp.getAttributes().put(MARK, id);
        }
        this.nextHandler.apply(ctx, cmp);
        parent.getChildren().add(cmp);
        createMacroComponents(ctx, cmp);
        log.debug("<<< completed building wiki text components for child of: " + parent.getClientId(ctx.getFacesContext()));
View Full Code Here

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

Examples of javax.faces.component.UIComponent

    // 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

Examples of javax.faces.component.UIComponent

  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

Examples of javax.faces.component.UIComponent

  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

Examples of javax.faces.component.UIComponent

  }

  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

Examples of javax.faces.component.UIComponent

    }
  }
 
  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

Examples of javax.faces.component.UIComponent

      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

Examples of net.sf.jeters.componentInterface.UIComponent

             
      /* show the ui-specific "home view" */
     
      if ( showHomeView ) {
       
        UIComponent uiComp = componentManager.getUIComponent();
       
        if (uiComp instanceof UIComponent_HomeView) {
     
          ((UIComponent_HomeView)uiComp)
            .presentHomeView(componentManager);
View Full Code Here

Examples of org.exoplatform.webui.core.UIComponent

   public void validate(UIFormInput uiInput) throws Exception
   {
      if (uiInput.getValue() == null || ((String)uiInput.getValue()).length() == 0)
         return;
      //  modified by Pham Dinh Tan
      UIComponent uiComponent = (UIComponent)uiInput;
      UIForm uiForm = uiComponent.getAncestorOfType(UIForm.class);
      String label;
      try
      {
        label = uiForm.getId() + ".label." + uiInput.getName();
      }
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.