Examples of UIParameter


Examples of javax.faces.component.UIParameter

      for (Iterator iterator = children.iterator(); iterator.hasNext();) {
        UIComponent child = (UIComponent) iterator.next();
       
        if(child instanceof UIParameter){
         
          UIParameter param = (UIParameter)child;
        String name = param.getName();
       
        if (name != null) {
          buff = new StringBuffer();
          Object value = param.getValue();
          buff.append("params[");
          buff.append(ScriptUtils.toScript(name));
          buff.append("] = ");
          buff.append(ScriptUtils.toScript(value));
          buff.append(";");
View Full Code Here

Examples of javax.faces.component.UIParameter

      for (Iterator iterator = children.iterator(); iterator.hasNext();) {
        UIComponent child = (UIComponent) iterator.next();
       
        if(child instanceof UIParameter){
         
          UIParameter param = (UIParameter)child;
        String name = param.getName();
       
        if (name != null) {
          Object value = param.getValue();
          buff.append(ScriptUtils.toScript(name));
          buff.append(":");
          buff.append(ScriptUtils.toScript(value));
          buff.append(",");
        }
View Full Code Here

Examples of javax.faces.component.UIParameter

      StringBuilder builder = new StringBuilder(url);
      boolean firstParameter = !url.contains("?");
      for (UIComponent child : (List<UIComponent>) component.getChildren()) {
        if (child instanceof UIParameter) {
          UIParameter parameter = (UIParameter) child;
          if (firstParameter) {
            builder.append("?");
            firstParameter = false;
          } else {
            builder.append("&");
          }
          builder.append(parameter.getName());
          builder.append("=");
          Object value = parameter.getValue();
          // TODO encoding
          builder.append(value != null ? URLDecoder.decode(value.toString()) : null);
        }
      }
      url = builder.toString();
View Full Code Here

Examples of javax.faces.component.UIParameter

      StringBuilder builder = new StringBuilder(url);
      boolean firstParameter = !url.contains("?");
      for (UIComponent child : (List<UIComponent>) component.getChildren()) {
        if (child instanceof UIParameter) {
          UIParameter parameter = (UIParameter) child;
          if (firstParameter) {
            builder.append("?");
            firstParameter = false;
          } else {
            builder.append("&");
          }
          builder.append(parameter.getName());
          builder.append("=");
          Object value = parameter.getValue();
          // TODO encoding
          builder.append(value != null ? URLDecoder.decode(value.toString()) : null);
        }
      }
      url = builder.toString();
View Full Code Here

Examples of javax.faces.component.UIParameter

                = (HtmlOutputText)application.createComponent(HtmlOutputText.COMPONENT_TYPE);
        text.setValue(content);
        text.setId(component.getId() + "_" + valueForLink.getTime() + "_text");
        text.setTransient(true);

        UIParameter parameter
                = (UIParameter)application.createComponent(UIParameter.COMPONENT_TYPE);
        parameter.setId(component.getId() + "_" + valueForLink.getTime() + "_param");
        parameter.setTransient(true);
        parameter.setName(component.getClientId(facesContext));
        parameter.setValue(converter.getAsString(facesContext, component, valueForLink));

        HtmlInputCalendar calendar = (HtmlInputCalendar)component;
        if (calendar.isDisabled() || calendar.isReadonly())
        {
          component.getChildren().add(text);
View Full Code Here

Examples of javax.faces.component.UIParameter

            {
                parameters = new HashMap<String, List<String>>();
            }
            for (int i = 0, size = validParams.size(); i < size; i++)
            {
                UIParameter param = validParams.get(i);
                String name = param.getName();
                Object value = param.getValue();
                if (parameters.containsKey(name))
                {
                    parameters.get(name).add(value.toString());
                }
                else
View Full Code Here

Examples of javax.faces.component.UIParameter

        {
            List<UIParameter> validParams = getValidUIParameterChildren(
                    facesContext, uiComponent.getChildren(), true, true);
            for (int i = 0, size = validParams.size(); i < size; i++)
            {
                UIParameter param = validParams.get(i);
                String name = param.getName();
                Object value = param.getValue();
                if (retVal == null)
                {
                    retVal = new HashMap<String, String>();
                }
                if (value instanceof String)
View Full Code Here

Examples of javax.faces.component.UIParameter

        for (int i = 0, size = children.size(); i < size; i++)
        {
            UIComponent child = children.get(i);
            if (child instanceof UIParameter)
            {
                UIParameter param = (UIParameter) child;
                // check for the disable attribute (since 2.0)
                // and the render attribute (only if skipUnrendered is true)
                if (param.isDisable() || (skipUnrendered && !param.isRendered()))
                {
                    // ignore this UIParameter and continue
                    continue;
                }
                // check the name
                String name = param.getName();
                if (skipNullName && (name == null || STR_EMPTY.equals(name)))
                {
                    // warn for a null-name
                    log.log(Level.WARNING, "The UIParameter " + RendererUtils.getPathToComponent(param)
                                    + " has a name of null or empty string and thus will not be added to the URL.");
                    // and skip it
                    continue;
                }
                // check the value
                if (skipNullValue && param.getValue() == null)
                {
                    if (facesContext.isProjectStage(ProjectStage.Development))
                    {
                        // inform the user about the null value when in Development stage
                        log.log(Level.INFO, "The UIParameter " + RendererUtils.getPathToComponent(param)
View Full Code Here

Examples of javax.faces.component.UIParameter

      StringBuilder builder = new StringBuilder(url);
      boolean firstParameter = !url.contains("?");
      for (UIComponent child : component.getChildren()) {
        if (child instanceof UIParameter) {
          UIParameter parameter = (UIParameter) child;
          if (firstParameter) {
            builder.append("?");
            firstParameter = false;
          } else {
            builder.append("&");
          }
          builder.append(parameter.getName());
          builder.append("=");
          Object value = parameter.getValue();
          // TODO encoding
          builder.append(value != null ? URLDecoder.decode(value.toString()) : null);
        }
      }
      url = builder.toString();
View Full Code Here

Examples of javax.faces.component.UIParameter

        for (int i = 0, size = children.size(); i < size; i++)
        {
            UIComponent child = children.get(i);
            if (child instanceof UIParameter)
            {
                UIParameter param = (UIParameter) child;
                // check for the disable attribute (since 2.0)
                // and the render attribute (only if skipUnrendered is true)
                if (param.isDisable()
                        || (skipUnrendered && !param.isRendered()))
                {
                    // ignore this UIParameter and continue
                    continue;
                }
                // check the name
                String name = param.getName();
                if (skipNullName && (name == null || STR_EMPTY.equals(name)))
                {
                    // warn for a null-name
                    log.log(Level.WARNING,
                            "The UIParameter "
                                    + RendererUtils.getPathToComponent(param)
                                    + " has a name of null or empty string and thus will not be added to the URL.");
                    // and skip it
                    continue;
                }
                // check the value
                if (skipNullValue && param.getValue() == null)
                {
                    if (facesContext.isProjectStage(ProjectStage.Development))
                    {
                        // inform the user about the null value when in Development stage
                        log.log(Level.INFO,
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.