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

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


  @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

    // 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

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.