Examples of UIComponent


Examples of javax.faces.component.UIComponent

  }

  protected boolean mustEncode(FacesContext facesContext){
    boolean encode = true;
    if(isAJAXRequest(facesContext)){
      UIComponent parent = getParent();
      Boolean parentUpdateSmoothly = (Boolean) parent.getAttributes().get("updateSmoothly");
      Boolean updateSmoothly = (Boolean) getAttributes().get("updateSmoothly");
      if(updateSmoothly != null){
        encode = updateSmoothly.booleanValue();
      }
      else {
View Full Code Here

Examples of javax.faces.component.UIComponent

  }

  protected boolean mustEncode(FacesContext facesContext){
    boolean encode = true;
    if(isAJAXRequest(facesContext)){
      UIComponent parent = getParent();
      Boolean parentUpdateSmoothly = (Boolean) parent.getAttributes().get("updateSmoothly");
      Boolean updateSmoothly = (Boolean) getAttributes().get("updateSmoothly");
      if(updateSmoothly != null){
        encode = updateSmoothly.booleanValue();
      }
      else {
View Full Code Here

Examples of javax.faces.component.UIComponent

  }

  protected boolean mustEncode(FacesContext facesContext){
    boolean encode = true;
    if(isAJAXRequest(facesContext)){
      UIComponent parent = getParent();
      Boolean parentUpdateSmoothly = (Boolean) parent.getAttributes().get("updateSmoothly");
      Boolean updateSmoothly = (Boolean) getAttributes().get("updateSmoothly");
      if(updateSmoothly != null){
        encode = updateSmoothly.booleanValue();
      }
      else {
View Full Code Here

Examples of javax.faces.component.UIComponent

        boolean refreshIds = false;
        if (getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) {
            setId(elements.getPropertyName(context));
            refreshIds = true;
        }
        UIComponent label = elements.getLabel();
        if (label != null) {
            if (label.getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) {
                label.setId(getDefaultLabelId());
            } else if (refreshIds) {
                label.setId(label.getId());
            }
        }
        for (int i = 0, len = elements.getInputs().size(); i < len; i++) {
            UIComponent input = (UIComponent) elements.getInputs().get(i);
            if (input.getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) {
                input.setId(getDefaultInputId() + (i == 0 ? "" : (i + 1)));
            } else if (refreshIds) {
                input.setId(input.getId());
            }
        }
        for (int i = 0, len = elements.getMessages().size(); i < len; i++) {
            UIComponent msg = elements.getMessages().get(i);
            if (msg.getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) {
                msg.setId(getDefaultMessageId() + (i == 0 ? "" : (i + 1)));
            } else if (refreshIds) {
                msg.setId(msg.getId());
            }
        }
    }
View Full Code Here

Examples of javax.faces.component.UIComponent

            // deal with swallowed exception in Mojarra
            logger.fatal(e.getMessage());
            throw e;
        }

        UIComponent metadataFacet = viewRoot.getFacet(UIViewRoot.METADATA_FACET_NAME);

        if (metadataFacet == null) {
            return viewRoot;
        }

        boolean foundViewParam = false;
        boolean foundOther = false;

        for (UIComponent candidate : metadataFacet.getChildren()) {
            if (candidate instanceof UIViewParameter) {
                foundViewParam = true;
            } else {
                foundOther = true;
            }
        }

        if (foundOther && !foundViewParam) {
            UIViewParameter placeholder = (UIViewParameter) context.getApplication().createComponent(
                    UIViewParameter.COMPONENT_TYPE);
            placeholder.setId(viewRoot.createUniqueId());
            placeholder.setName("");
            metadataFacet.getChildren().add(0, placeholder);
        }

        return viewRoot;
    }
View Full Code Here

Examples of javax.faces.component.UIComponent

                    + "] because: nested exception is:" + e.getMessage(), e);
        }

        Map<String, UIInput> components = getComponents();
        try {
            UIComponent parent = this.getParent();
            validator.validate(context, parent, components);
        } catch (ValidatorException e) {
            setValid(false);
            for (UIInput comp : components.values()) {
                comp.setValid(false);
View Full Code Here

Examples of javax.faces.component.UIComponent

    /**
     * Attempt to locate the form in which this component resides. If the component is not within a UIForm tag, throw an
     * exception.
     */
    public UIForm locateForm() {
        UIComponent parent = this.getParent();
        while (!(parent instanceof UIForm)) {
            if ((parent == null) || (parent instanceof UIViewRoot)) {
                throw new IllegalStateException(
                        "The UIValidateForm (<s:validateForm />) component must be placed within a UIForm (<h:form>)");
            }
            parent = parent.getParent();
        }
        return (UIForm) parent;
    }
View Full Code Here

Examples of javax.faces.component.UIComponent

            }
        }
    }

    private UIInput findComponent(final String alias, final String clientId) {
        UIComponent comp = null;
        if (!components.containsKey(clientId)) {
            comp = form.findComponent(clientId);
            if (comp == null) {
                throw new IllegalArgumentException("org.jboss.seam.component.UIValidateForm-- Could not locate component ["
                        + form.getClientId() + ":" + alias + "]");
            } else if (!(comp instanceof UIInput)) {
                throw new IllegalArgumentException("org.jboss.seam.component.UIValidateForm-- Selected component ["
                        + form.getClientId() + ":" + alias + "] must be a UIInput component, was [" + comp.getClass().getName()
                        + "]");
            }
        } else {
            comp = components.get(clientId);
        }
View Full Code Here

Examples of javax.faces.component.UIComponent

                    pluginMacroWithTemplate.getCallbackEventName(WikiPluginMacro.CallbackEvent.BEFORE_VIEW_RENDER),
                        pluginMacroWithTemplate
                );

                log.debug("preparing include rendering for macro: " + pluginMacroWithTemplate);
                UIComponent child = findComponent( pluginMacroWithTemplate.getClientId() );
                log.debug("JSF child client identifier: " + child.getClientId(getFacesContext()));
                ResponseWriter originalResponseWriter = getFacesContext().getResponseWriter();
                StringWriter stringWriter = new StringWriter();
                ResponseWriter tempResponseWriter = originalResponseWriter
                        .cloneWithWriter(stringWriter);
                getFacesContext().setResponseWriter(tempResponseWriter);
View Full Code Here

Examples of javax.faces.component.UIComponent

                    pluginMacroWithTemplate.getCallbackEventName(WikiPluginMacro.CallbackEvent.BEFORE_VIEW_RENDER),
                        pluginMacroWithTemplate
                );

                log.debug("preparing include rendering for macro: " + pluginMacroWithTemplate);
                UIComponent child = findComponent( pluginMacroWithTemplate.getClientId() );
                log.debug("JSF child client identifier: " + child.getClientId(getFacesContext()));
                ResponseWriter originalResponseWriter = getFacesContext().getResponseWriter();
                StringWriter stringWriter = new StringWriter();
                ResponseWriter tempResponseWriter = originalResponseWriter
                        .cloneWithWriter(stringWriter);
                getFacesContext().setResponseWriter(tempResponseWriter);
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.