EchoPoint
1.0

echopoint.ui.util
Class ValidationHelper

java.lang.Object
  extended byechopoint.ui.util.ValidationHelper

public class ValidationHelper
extends java.lang.Object

ValidationHelper is used by UI peers to place validation JS support into the resultant web pages.


Constructor Summary
ValidationHelper()
           
 
Method Summary
static void addValidationSupport(nextapp.echoservlet.RenderingContext rc, java.lang.String htmlId, Validateable validateable)
          Adds validation UI support for a Validateable.
static java.lang.String getOnBlurRule(nextapp.echoservlet.RenderingContext rc, java.lang.String htmlId, Validateable validateable)
          Called to return the onblur function to support validation.
static java.lang.String getOnChangeRule(nextapp.echoservlet.RenderingContext rc, java.lang.String htmlId, Validateable validateable)
          Called to return the onchange function to support validation.
static java.lang.String getSubmitterActionCommand(nextapp.echoservlet.RenderingContext rc, ValidationSubmitter submitter, java.lang.String id, java.lang.String command)
          This adds support for a ValidationSubmitter for running validation when submitting the page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationHelper

public ValidationHelper()
Method Detail

addValidationSupport

public static void addValidationSupport(nextapp.echoservlet.RenderingContext rc,
                                        java.lang.String htmlId,
                                        Validateable validateable)
Adds validation UI support for a Validateable. This loads up the required scripts and creates the JavaScript entries for client side validation

Parameters:
rc - - the current RenderingContext
htmlId - - the htmlId of the element
validateable -

getOnBlurRule

public static java.lang.String getOnBlurRule(nextapp.echoservlet.RenderingContext rc,
                                             java.lang.String htmlId,
                                             Validateable validateable)
Called to return the onblur function to support validation. If it not requires, because there is no rules, then an empty string is returned. You can append it to any other onblur script that may save the state of the component such as E_setParameter.

Parameters:
rc - - the rendering context in play
htmlId - - the base HTML in play
validateable - - the validateable itself
Returns:
the onblur script or "" is not required

getOnChangeRule

public static java.lang.String getOnChangeRule(nextapp.echoservlet.RenderingContext rc,
                                               java.lang.String htmlId,
                                               Validateable validateable)
Called to return the onchange function to support validation. If it not requires, because there is no rules, then an empty string is returned. You can append it to any other onchange script that may save the state of the component such as E_setParameter.

Parameters:
rc - - the rendering context in play
htmlId - - the base HTML in play
validateable - - the validateable itself
Returns:
the onchange script or "" is not required

getSubmitterActionCommand

public static java.lang.String getSubmitterActionCommand(nextapp.echoservlet.RenderingContext rc,
                                                         ValidationSubmitter submitter,
                                                         java.lang.String id,
                                                         java.lang.String command)
This adds support for a ValidationSubmitter for running validation when submitting the page.

Parameters:
rc - - the rendering context in place
submitter - - the ValidationSubmitter in question
id - - the unqiue id string to sue
command - - the command string to use
Returns:
a valid JavaScript action command call

EchoPoint
1.0