Examples of URLEncoder


Examples of org.apache.myfaces.trinidadinternal.share.url.URLEncoder

  public Parameter[] getParameters(
    UIXRenderingContext context,
    UINode           node)
  {
    // Get the encoded names for our event parameters
    URLEncoder encoder = context.getURLEncoder();
    String eventKey  = encoder.encodeParameter(UIConstants.EVENT_PARAM);
    String sourceKey = encoder.encodeParameter(UIConstants.SOURCE_PARAM);

    Parameter eventParam = ActionUtils.buildParameter(context, node,
                                                      _eventBinding, _event,
                                                      eventKey);
    int numParams = 1;
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.share.url.URLEncoder

                                                UIConstants.DESTINATION_ATTR);

    if (destination != null)
      return destination.toString();

    URLEncoder encoder = context.getURLEncoder();
    return encoder.getDefaultURL();
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.share.url.URLEncoder

    // This renders the select controls alongwith javascript onchange handler.
    UIXRenderingContext rCtx = getRenderingContext(context, component);

    String compId = component.getClientId(context);

    URLEncoder encoder = rCtx.getURLEncoder();
    ResponseWriter out = context.getResponseWriter();

    // draw table to contain the select UI control
    out.startElement("table", component);
    out.writeAttribute("id", compId + _RADIO_TABLE_SUFFIEX_ID_CONST, null);
    out.writeAttribute("border", "0", null);
    out.writeAttribute("cellspacing", "0", null);
    out.writeAttribute("cellpadding", "0", null);

    if (!XhtmlLafRenderer.isInaccessibleMode(rCtx))
    {
      out.writeAttribute("summary", "", null);
    }

    out.startElement("tr", component);

    String label = (String)component.getAttributes().get("label");

    out.startElement("td", component);
    out.writeAttribute("align", "left", null);
    out.writeAttribute("nowrap", Boolean.TRUE, null);
    out.startElement("span", component);

    XhtmlLafRenderer.
      renderStyleClassAttribute(rCtx,
                                SkinSelectors.AF_LABEL_TEXT_STYLE_CLASS);

    out.writeText(encoder.encodeParameter(label), null);

    out.endElement("span");
    out.endElement("td");

    // Render filler / separator between label and select control
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.share.url.URLEncoder

    out.writeAttribute("summary", "", null);
    out.writeAttribute("border", "0", null);
    out.writeAttribute("cellspacing", "0", null);
    out.writeAttribute("cellpadding", "0", null);

    URLEncoder encoder = rCtx.getURLEncoder();

    ListIterator<UIComponent> children = component.getChildren().listIterator();
    while (children.hasNext())
    {
      UIComponent child = children.next();
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.share.url.URLEncoder

    buffer.append(startScript);
    buffer.append(formName);
    buffer.append("\',");
    buffer.append(unvalidated ? "0" : "1");

    URLEncoder encoder = context.getURLEncoder();
    String eventKey = encoder.encodeParameter(UIConstants.EVENT_PARAM);
    String sourceKey = encoder.encodeParameter(UIConstants.SOURCE_PARAM);
    String partialTargetsKey = encoder.encodeParameter(
                                         UIConstants.PARTIAL_TARGETS_PARAM);
    FormEncoder formEncoder = context.getFormEncoder();
    String encodedEvent = XhtmlLafUtils.
                                    getFormEncodedParameter(formEncoder,
                                                            formName,
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.share.url.URLEncoder

      {
        // Render hidden fields needed for PPR
        String formName = ActionUtils.getFormName(context);
        if (formName != null)
        {
          URLEncoder encoder = context.getURLEncoder();
          String partialTargetsKey
            = encoder.encodeParameter(UIConstants.PARTIAL_TARGETS_PARAM);
          String partialKey
            = encoder.encodeParameter(UIConstants.PARTIAL_PARAM);

          FormValueRenderer.addNeededValue(context,
                                           formName,
                                           partialTargetsKey,
                                           partialKey,
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.share.url.URLEncoder

    UIXRenderingContext context,
    UINode           node)
  {

    // Get the encoded names for our event parameters
    URLEncoder encoder = context.getURLEncoder();
    String targets = _getPartialTargets(context);

    Parameter[] allParams = super.getParameters(context, node);
    if (targets != null)
    {
      String targetsKey = _getPartialTargetsKey(encoder, targets);
      String partialKey = encoder.encodeParameter(UIConstants.PARTIAL_PARAM);

      Parameter[] localParams = new Parameter[2];

      localParams[0] = ActionUtils.buildParameter(context, node,
                                                  null, "true",
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.share.url.URLEncoder

   * and returns an empty string as the default URL.
   * @see UIXRenderingContext#getURLEncoder()
   */
  public URLEncoder getURLEncoder()
  {
    URLEncoder urlEncoder = _urlEncoder;

    if (urlEncoder == null)
      return _URL_ENCODER;
    return urlEncoder;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.share.url.URLEncoder

    UIXRenderingContext rCtx =
      getRenderingContext(context, component);

    String compId = component.getClientId(context);

    URLEncoder encoder = rCtx.getURLEncoder();
    ResponseWriter out = context.getResponseWriter();

    // draw table to contain the select UI control
    out.startElement("table", component);
    out.writeAttribute("id", compId + _CHOICE_TABLE_SUFFIX_ID_CONST, null);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.share.url.URLEncoder

    if (onChangeJS != null)
    {
      out.writeAttribute("onchange", onChangeJS, null);
    }

    URLEncoder encoder = rCtx.getURLEncoder();
    // Render options now.
    ListIterator<UIComponent> children = component.getChildren().listIterator();
    while (children.hasNext())
    {
      UIComponent child = children.next();
      if (child instanceof UIXShowDetail)
      {
        UIXShowDetail detailItem = (UIXShowDetail) child;

        Boolean disabledObj =
          (Boolean) detailItem.getAttributes().get("disabled");

        boolean disabled = false; // by default is enabled.
        if (disabledObj != null)
        {
          disabled = disabledObj.booleanValue();
        }

        if (disabled)
        {
          // MSDN DHTML Reference says disabled not supported for option element
          // hence don't render disabled options at all to be consistent
          // across browsers. See Bug 4561967.
          continue;
        }

        String childTitle = (String) detailItem.getAttributes().get("text");
        if (childTitle != null)
        {
          childTitle = encoder.encodeParameter(childTitle);
        }
        String childClientId = child.getClientId(context);

        out.startElement("option", component);
        out.writeAttribute("id", childClientId, 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.