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

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


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


    URLEncoder encoder = context.getURLEncoder();
    String sourceKey = encoder.encodeParameter( SOURCE_PARAM );
    FormValueRenderer.addNeededValue(context, formName, sourceKey);

    // BUG 3557710 - FORM ENCODER AND POSTBACK HANDLING
    FormEncoder formEncoder = context.getFormEncoder();
    String encodedSource =
View Full Code Here


                                        valueKey,
                                        sizeKey);

      if (partialTargets != null)
      {
        URLEncoder encoder = context.getURLEncoder();

        FormValueRenderer.addNeededValue(context,
                                         formName,
                                         partialTargetsKey,
                                         encoder.encodeParameter(PARTIAL_PARAM),
                                         null,
                                         null);
      }

      // Render script submission code.
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

              BaseLafUtils.getStringAttributeValue(context, node, NAME_ATTR);
    String idString =
              BaseLafUtils.getStringAttributeValue(context, node, ID_ATTR);

    component.setRowKey(newPath);
    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);

    int totalItems = component.getRowCount();
View Full Code Here

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


    URLEncoder encoder = context.getURLEncoder();
    String sourceKey = encoder.encodeParameter( SOURCE_PARAM );
    FormValueRenderer.addNeededValue(context, formName, sourceKey);

    // BUG 3557710 - FORM ENCODER AND POSTBACK HANDLING
    FormEncoder formEncoder = context.getFormEncoder();
    String encodedSource =
View Full Code Here

                                        valueKey,
                                        sizeKey);

      if (partialTargets != null)
      {
        URLEncoder encoder = context.getURLEncoder();

        FormValueRenderer.addNeededValue(context,
                                         formName,
                                         partialTargetsKey,
                                         encoder.encodeParameter(PARTIAL_PARAM),
                                         null,
                                         null);
      }

      // Render script submission code.
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

                                     valueKey,
                                     (isMulti) ? sizeKey : null);

    if (partialTargets != null)
    {
      URLEncoder encoder = context.getURLEncoder();

      FormValueRenderer.addNeededValue(context,
                                       formName,
                                       partialTargetsKey,
                                       encoder.encodeParameter(PARTIAL_PARAM),
                                       null,
                                       null);
    }
  }
View Full Code Here

    String  name,
    long    value,
    boolean doValidate
    )
  {
    URLEncoder urlEncoder = context.getURLEncoder();

    // this code might be refactored to avoid recomputing the parameter
    // keys here, but the overhead is small anyway because the URLEncoder is
    // typically a passthrough without renaming the parameters
    String eventKey = urlEncoder.encodeParameter(UIConstants.EVENT_PARAM);
    String sourceKey = urlEncoder.encodeParameter(UIConstants.SOURCE_PARAM);
    String valueKey = urlEncoder.encodeParameter(UIConstants.VALUE_PARAM);

    return getSingleDestinationSubmit(context, node, form, eventKey, sourceKey,
                                      name, valueKey, value, doValidate);
  }
View Full Code Here

      // Gotta build formValue fields for any client parameters
      String formName = getFormName(context, node);
      if (formName == null)
        return;

      URLEncoder encoder = context.getURLEncoder();
      String eventKey = encoder.encodeParameter(UIConstants.EVENT_PARAM);
      String sourceKey = encoder.encodeParameter(UIConstants.SOURCE_PARAM);

      FormValueRenderer.addNeededValue(context, formName,
                                       eventKey, sourceKey, null, null);

      Parameter[] parameters = getParameters();
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.