Examples of UIParameter


Examples of javax.faces.component.UIParameter

        //we cannot use invokeContextCallback
       
        for (Iterator<UIComponent> it = uiComponent.getFacetsAndChildren(); it.hasNext();) {
            UIComponent target = it.next();
            if (!(target instanceof UIParameter)) continue;
            UIParameter param = (UIParameter) target;
            if (param.isRendered() && param.getValue() != null
                    && !param.isDisable())
            {
                String name = param.getName();
                Object value = param.getValue();
                if (value instanceof String) {
                    value = "'" + ((String) value) + "'";
                }
                retVal.put(name, value.toString());
            }
View Full Code Here

Examples of javax.faces.component.UIParameter

            // set up the expand control and remove whatever children (if any) this control had previously
            UICommand expandControl = tree.getExpandControl();
            expandControl.getChildren().clear();
            expandControl.setId(TOGGLE_ID);

            UIParameter param = new UIParameter();
            param.setName(tree.getId() + NamingContainer.SEPARATOR_CHAR + NAV_COMMAND);
            param.setValue(tree.getNodeId());
            expandControl.getChildren().add(param);
            expandControl.getChildren().add(image);

            RendererUtils.renderChild(context, expandControl);
        }
View Full Code Here

Examples of javax.faces.component.UIParameter

    HtmlCommandLink link = (HtmlCommandLink) application
            .createComponent(HtmlCommandLink.COMPONENT_TYPE);
    link.setId(scroller.getId() + id);
    link.setTransient(true);
    UIParameter parameter = (UIParameter) application
            .createComponent(UIParameter.COMPONENT_TYPE);
    parameter.setId(scroller.getId() + id + "_param");
    parameter.setTransient(true);
    parameter.setName(scroller.getClientId(facesContext));
    parameter.setValue(id);
    List children = link.getChildren();
    children.add(parameter);
    if (text != null)
    {
      HtmlOutputText uiText = (HtmlOutputText) application
View Full Code Here

Examples of javax.faces.component.UIParameter

    HtmlCommandLink link = (HtmlCommandLink) application
            .createComponent(HtmlCommandLink.COMPONENT_TYPE);
    link.setId(scroller.getId() + facetName);
    link.setTransient(true);
    UIParameter parameter = (UIParameter) application
            .createComponent(UIParameter.COMPONENT_TYPE);
    parameter.setId(scroller.getId() + facetName + "_param");
    parameter.setTransient(true);
    parameter.setName(scroller.getClientId(facesContext));
    parameter.setValue(facetName);
    List children = link.getChildren();
    children.add(parameter);
    scroller.getChildren().add(link);
    return link;
  }
View Full Code Here

Examples of javax.faces.component.UIParameter

  public static Object findParameter(UIComponent component, String name) {
    for (Object o : component.getChildren()) {
      UIComponent child = (UIComponent) o;
      if (child instanceof UIParameter) {
        UIParameter parameter = (UIParameter) child;
        if (LOG.isDebugEnabled()) {
          LOG.debug("Select name='" + parameter.getName() + "'");
          LOG.debug("Select value='" + parameter.getValue() + "'");
        }
        if (name.equals(parameter.getName())) {
          return parameter.getValue();
        }
      }
    }
    return null;
  }
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

    StringBuffer buffer = null;
    for(UIComponent child : (List<UIComponent>)comp.getChildren())
    {
      if (child instanceof UIParameter)
      {
        UIParameter param = (UIParameter) child;
        String name = param.getName();
        Object value = param.getValue();
        if ((value == null) || (name == null))
          continue;

        if (buffer == null)
          buffer = new StringBuffer();
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

Examples of javax.faces.component.UIParameter

         if (isIsolated())
         {
            UIComponent namingContainer = getParentNamingContainer(this);
            if (namingContainer != null)
            {
               UIParameter idPrefix = new UIParameter();
               idPrefix.setName("idPrefix");
               urlBuilder.addParameter("idPrefix", namingContainer.getClientId(getFacesContext()));
            }
         }
         return urlBuilder.getEncodedUrl();
      }
View Full Code Here

Examples of javax.faces.component.UIParameter

      if (viewId != null)
      {
         Map<String, Object> pageParameters = Pages.instance().getStringValuesFromModel(context, viewId, usedParameters);
         for (Map.Entry<String, Object> me : pageParameters.entrySet())
         {
            UIParameter uip = new UIParameter();
            uip.setName(me.getKey());
            uip.setValue(me.getValue());
            url.addParameter(uip);
         }
      }
     
      if (getActionExpression() != null)
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.