Package javax.faces.application

Examples of javax.faces.application.Application.createComponent()


            ValueExpression ve = (ValueExpression)
                  componentBeanDescriptor.getValue(UIComponent.COMPOSITE_COMPONENT_TYPE_KEY);
            if (null != ve) {
                String componentType = (String) ve.getValue(context.getELContext());
                if (null != componentType && 0 < componentType.length()) {
                    result = app.createComponent(componentType);
                }
            }
        }

View Full Code Here


            }
        }

        // Step 4. Use javax.faces.NamingContainer as the component type
        if (null == result) {
            result = app.createComponent("javax.faces.NamingContainer");
        }

        assert (null != result);

        result.setRendererType("javax.faces.Composite");
View Full Code Here

   */
  protected UITreeNode getOrCreateDefaultFacet() {
    if (defaultFacet == null) {
      FacesContext facesContext = FacesContext.getCurrentInstance();
      Application application = facesContext.getApplication();
      defaultFacet = (UITreeNode) application
      .createComponent(UITreeNode.COMPONENT_TYPE);
      defaultFacet.setId("_defaultNodeFace");
      defaultFacet.setParent(this);
      defaultFacet.getAttributes().put(
          UITreeNode.DEFAULT_NODE_FACE_ATTRIBUTE_NAME, Boolean.TRUE);
View Full Code Here

     */
    protected UIComponent createComponent(FacesContext context, String newId) throws JspException {
        UIComponent component;
        Application application = context.getApplication();
        if (binding != null) {
            component = application.createComponent(binding, context,
                                                    getComponentType());
      component.setValueExpression("binding", binding);
        } else {
            component = application.createComponent(getComponentType());
        }
View Full Code Here

        if (binding != null) {
            component = application.createComponent(binding, context,
                                                    getComponentType());
      component.setValueExpression("binding", binding);
        } else {
            component = application.createComponent(getComponentType());
        }

        component.setId(newId);
        setProperties(component);
View Full Code Here

    protected UIComponent createComponent(FacesContext context, String newId) {
        UIComponent component;
        Application application = context.getApplication();
        if (binding != null) {
            ValueBinding vb = application.createValueBinding(binding);
            component = application.createComponent(vb, context,
                                                    getComponentType());
      component.setValueBinding("binding", vb);
        } else {
            component = application.createComponent(getComponentType());
        }
View Full Code Here

            ValueBinding vb = application.createValueBinding(binding);
            component = application.createComponent(vb, context,
                                                    getComponentType());
      component.setValueBinding("binding", vb);
        } else {
            component = application.createComponent(getComponentType());
        }

        component.setId(newId);
        setProperties(component);
View Full Code Here

    protected UIOutput createVerbatimComponent() {
  assert(null != getFacesContext());
  UIOutput verbatim;
  Application application = getFacesContext().getApplication();
  verbatim = (UIOutput)
      application.createComponent("javax.faces.HtmlOutputText");
  verbatim.setTransient(true);
  verbatim.getAttributes().put("escape", Boolean.FALSE);
  verbatim.setId(getFacesContext().getViewRoot().createUniqueId());
  return verbatim;
    }
View Full Code Here

        Application app = faces.getApplication();
        if (this.binding != null) {
            ValueExpression ve = this.binding.getValueExpression(ctx,
                    Object.class);
            if (FacesAPI.getVersion() >= 12) {
                c = app.createComponent(ve, faces, this.componentType);
                if (c != null) {
                    // Make sure the component supports 1.2
                    if (FacesAPI.getComponentVersion(c) >= 12) {
                        c.setValueExpression("binding", ve);
                    } else {
View Full Code Here

                    }

                }
            } else {
                ValueBinding vb = new LegacyValueBinding(ve);
                c = app.createComponent(vb, faces, this.componentType);
                if (c != null) {
                    c.setValueBinding("binding", vb);
                }
            }
        } else {
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.