Package org.apache.myfaces.trinidadinternal.share.url

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


    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

   * 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

    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

    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

    if (partialTargets == null)
      return null;
    */

    URLEncoder encoder = context.getURLEncoder();
    //String partialTargetsKey = encoder.encodeParameter(PARTIAL_TARGETS_PARAM);
    String eventParamKey = encoder.encodeParameter(EVENT_PARAM);
    String sourceParamKey = encoder.encodeParameter(SOURCE_PARAM);
    String sourceParam = BaseLafUtils.getStringAttributeValue(
      context, node, ID_ATTR);

    //PH: using getFormName returns null for panelTabbed because formSubmitted
    //attribute  is 'null'. Use getParentFormName instead to submit to the
View Full Code Here

    String partialTargets = getAncestorPartialTargets(context);
   
    if (partialTargets == null)
      return null;

    URLEncoder encoder = context.getURLEncoder();
    String partialTargetsKey = encoder.encodeParameter(PARTIAL_TARGETS_PARAM);
    String eventParamKey = encoder.encodeParameter(EVENT_PARAM);
    String sourceParamKey = encoder.encodeParameter(SOURCE_PARAM);
    String sourceParam = BaseLafUtils.getStringAttributeValue(
      context, node, ID_ATTR);
   
    String formName = getParentFormName(context);
View Full Code Here

    //
    String destination = getDestinationAttr(context, node);
    if (destination == null)
      return null;

    URLEncoder encoder = context.getURLEncoder();
    String partialTargetsKey = encoder.encodeParameter(PARTIAL_TARGETS_PARAM);

    // =-=ags Note: We should perform the following append and the
    //        conversion to the _firePartialChange() call all in one
    //        StringBuffer to avoid multiple buffer allocations.
View Full Code Here

    // get the form name
    String formName = getParentFormName(context);


    URLEncoder encoder = context.getURLEncoder();

    /*Object destination = node.getAttributeValue(context, DESTINATION_ATTR);*/


    // get the body of a function called when there is switchApp event
    // not publicly documented because don't want clients doing
    // this in general, so for now this attribute not in xsd
    Object onClickBody = node.getAttributeValue(context,
                                                ON_SWITCH_APP_ATTR);

    StringBuffer function =  new StringBuffer();

    // if no body of function buffer should be empty
    // otherwise create new function with parameter called 'type',
    // body should refer to 'type' to distinguish between which
    // button pushed
    if (onClickBody != null)
    {
      function.append( "var func = new Function( \"type\",\"");
      function.append( onClickBody ).append("\");return func('");
      function.append( SWITCH_APP_TYPE_GOTO ).append("');");
    }

    // encode parameters
    /*String eventKey  = encoder.encodeParameter( EVENT_PARAM );*/
    String sourceKey = encoder.encodeParameter( SOURCE_PARAM );
    /*String typeKey = encoder.encodeParameter( TYPE_PARAM );*/

    StringBuffer handler = new StringBuffer();

    FormValueRenderer.addNeededValue(context, formName, sourceKey);
View Full Code Here

  @Override
  protected void prerender(
    UIXRenderingContext context,
    UINode           node) throws IOException
  {
    URLEncoder encoder = context.getURLEncoder();

    String eventKey  = encoder.encodeParameter(EVENT_PARAM);
    String sourceKey = encoder.encodeParameter(SOURCE_PARAM);
    String valueKey  = encoder.encodeParameter(VALUE_PARAM);
    String sizeKey   = encoder.encodeParameter(SIZE_PARAM);
    String partialTargetsKey = encoder.encodeParameter(PARTIAL_TARGETS_PARAM);

    // Get any partial targets - encoded in String form
    String partialTargets = _getPartialTargets(context, node);

    // determine real values through attributes
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidadinternal.share.url.URLEncoder

Copyright © 2018 www.massapicom. 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.