|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplanetj.html.JavaScriptManager
Field Summary | |
static java.lang.String |
DEFAULT_JAVASCRIPT_SOURCE_PATH
|
static java.lang.String |
JAVASCRIPT_DATE_PICKER_SOURCE_FILE_DECLARED
|
static java.lang.String |
JAVASCRIPT_EDITABLE_SELECT_SOURCE_FILE_DECLARED
|
static java.lang.String |
JAVASCRIPT_OPERATION_INCLUDED
|
static java.lang.String |
JAVASCRIPT_REQUEST_VALIDATION_ENABLED
|
static java.lang.String |
JAVASCRIPT_VALIDATION_SOURCE_FILE_DECLARED
|
static java.lang.String |
JS_FLAG_INCLUDE_DATAENGINE_OBJECTS
|
static java.lang.String |
ON_BLUR
|
static java.lang.String |
ON_CHANGE
|
static java.lang.String |
ON_CLICK
|
static java.lang.String |
ON_FOCUS
|
static java.lang.String |
ON_SELECT
|
static java.lang.String |
RETURN_MAGIC_REQUEST
|
Method Summary | |
static java.lang.StringBuffer |
ensureEditableSelectSourceFileIsDeclared(java.lang.StringBuffer sb,
HttpServletRequest req)
We only need to declare the JavaScript editableSelect source file once. |
static java.lang.StringBuffer |
ensureJavaScriptDatePickerSourceFileIsDeclared(java.lang.StringBuffer sb,
HttpServletRequest req)
We only need to declare the JavaScript DatePicker source file once. |
static java.lang.StringBuffer |
ensureJavaScriptOperationIsIncluded(java.lang.StringBuffer html,
HttpServletRequest request)
We only need to include JavaScript for Operations once. |
static java.lang.StringBuffer |
ensureJavaScriptValidationSourceFileIsDeclared(java.lang.StringBuffer sb,
HttpServletRequest req)
We only need to declare the JavaScript Validation source file once. |
static java.lang.StringBuffer |
generateDatePicker(java.lang.StringBuffer sb,
java.lang.String id,
Field field,
HttpServletRequest req)
This will generate the DatePicker. |
static java.lang.StringBuffer |
generateDatePickerSourceReferences(java.lang.StringBuffer sb)
This will generate source references for DatePicker JavaScript files. |
static java.lang.StringBuffer |
generateEditableSelectSourceReferences(java.lang.StringBuffer sb)
This will generate source references for EditableSelect JavaScript files. |
static java.lang.StringBuffer |
generateOperationJavaScript(java.lang.StringBuffer html)
This will generate JavaScript used for Operations. |
static java.lang.StringBuffer |
generateValidationFieldJavaScript(java.lang.StringBuffer sb,
Field pField,
boolean fieldHasPossibleValues,
HttpServletRequest req,
HttpServletResponse res)
This will generate the java script for a field. |
static java.lang.StringBuffer |
generateValidationFieldJavaScript(java.lang.StringBuffer sb,
Field pField,
HttpServletRequest req,
HttpServletResponse res)
|
static java.lang.StringBuffer |
generateValidationSourceReferences(java.lang.StringBuffer sb)
This will generate source references for Validation JavaScript files. |
static java.lang.String |
getJavaScriptSourcePath()
This is the path to DataEngine JavaScript files Creation date: (5/17/2002 12:37:10 PM) |
static boolean |
isIncludeDataEngineJavaScriptObjects(HttpServletRequest request)
Check to see if DataEngine JavaScript objects are to be included in generation of the page. |
static boolean |
isJavaScriptGlobalValidationEnabled()
Returns whether the global value for JS Validation. |
static boolean |
isValidatableDateFormat(java.lang.String pDateFormat)
Returns true if our date validation supports pDateFormat Creation date: (5/17/2002 6:07:32 PM) |
static void |
setIncludeDataEngineJavaScriptObjects(boolean includeJSObjects,
HttpServletRequest request)
Set whether or not DataEngine JavaScript objects are to be included in generation of the page. |
static void |
setJavaScriptGlobalValidationEnabled(boolean newJavaScriptGlobalValidation)
Sets the global value for JS Validation. |
static void |
setJavaScriptSourcePath(java.lang.String newJavaScriptSourcePath)
This is the path to DataEngine JavaScript files Creation date: (5/17/2002 12:37:10 PM) |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String JS_FLAG_INCLUDE_DATAENGINE_OBJECTS
public static final java.lang.String JAVASCRIPT_OPERATION_INCLUDED
public static final java.lang.String JAVASCRIPT_VALIDATION_SOURCE_FILE_DECLARED
public static final java.lang.String JAVASCRIPT_DATE_PICKER_SOURCE_FILE_DECLARED
public static final java.lang.String JAVASCRIPT_EDITABLE_SELECT_SOURCE_FILE_DECLARED
public static final java.lang.String JAVASCRIPT_REQUEST_VALIDATION_ENABLED
public static final java.lang.String DEFAULT_JAVASCRIPT_SOURCE_PATH
public static final java.lang.String ON_CHANGE
public static final java.lang.String ON_BLUR
public static final java.lang.String ON_FOCUS
public static final java.lang.String ON_SELECT
public static final java.lang.String ON_CLICK
public static final java.lang.String RETURN_MAGIC_REQUEST
Method Detail |
public static java.lang.StringBuffer ensureEditableSelectSourceFileIsDeclared(java.lang.StringBuffer sb, HttpServletRequest req)
If for some reason you delclare the editableSelect.js file in your JSP, you could call req.setAttribute(JavaScriptManager.EDITABLE_SELECT_SOURCE_FILE_DECLARED, new Boolean(true)) and this would prevent the file from being declared twice. Creation date: (5/17/2002 8:42:14 PM)
public static java.lang.StringBuffer ensureJavaScriptDatePickerSourceFileIsDeclared(java.lang.StringBuffer sb, HttpServletRequest req)
If for some reason you delclare the datepicker.js file in your JSP, you could call req.setAttribute(JavaScriptManager.JAVASCRIPT_DATE_PICKER_SOURCE_FILE_DECLARED, new Boolean(true)) and this would prevent the file from being declared twice. Creation date: (5/17/2002 8:42:14 PM)
public static java.lang.StringBuffer ensureJavaScriptOperationIsIncluded(java.lang.StringBuffer html, HttpServletRequest request)
public static java.lang.StringBuffer ensureJavaScriptValidationSourceFileIsDeclared(java.lang.StringBuffer sb, HttpServletRequest req)
If for some reason you delclare the fieldValidation.js file in your JSP, you could call req.setAttribute(JavaScriptManager.JAVASCRIPT_VALIDATION_SOURCE_FILE_DECLARED, new Boolean(true)) and this would prevent the file from being declared twice. Creation date: (5/17/2002 11:01:55 AM)
public static java.lang.StringBuffer generateDatePicker(java.lang.StringBuffer sb, java.lang.String id, Field field, HttpServletRequest req) throws CMException
sb
- java.lang.StringBuffer
CMException
public static java.lang.StringBuffer generateDatePickerSourceReferences(java.lang.StringBuffer sb)
sb
- java.lang.StringBuffer
public static java.lang.StringBuffer generateEditableSelectSourceReferences(java.lang.StringBuffer sb)
sb
- java.lang.StringBuffer
public static java.lang.StringBuffer generateOperationJavaScript(java.lang.StringBuffer html)
public static java.lang.StringBuffer generateValidationFieldJavaScript(java.lang.StringBuffer sb, Field pField, HttpServletRequest req, HttpServletResponse res) throws CMException
CMException
public static java.lang.StringBuffer generateValidationFieldJavaScript(java.lang.StringBuffer sb, Field pField, boolean fieldHasPossibleValues, HttpServletRequest req, HttpServletResponse res) throws CMException
sb
- java.lang.StringBufferpField
- Field
CMException
public static java.lang.StringBuffer generateValidationSourceReferences(java.lang.StringBuffer sb)
sb
- java.lang.StringBuffer
public static java.lang.String getJavaScriptSourcePath()
public static boolean isIncludeDataEngineJavaScriptObjects(HttpServletRequest request)
public static void setIncludeDataEngineJavaScriptObjects(boolean includeJSObjects, HttpServletRequest request)
public static boolean isJavaScriptGlobalValidationEnabled()
JavaScript is validation on the client. We have a JavaScript file currently out in ../dataengine/js/fieldValidation.js In this file we are validating each generic field type. Refer to that file for details.
There are 3 levels of witch a user can set the JavaScript validation on or off.
1) A user can statically set a boolean on JavaScriptManager.setJavaScriptGlobalValidation(
2) A user can set a value on the HttpServletRequest which will override the GlobalValidation.
This would normally be done from a JSP or Servlet where you only want certain JSP's to use JavaScript
validation. An example would be if you need to turn off JS validation for most of you Applications/JSPs,
then you would set the global variable defined in 1) to false. Then if you had a few JSPs that could use
JS validation, you would make a call similiar to request.setAttribute(JavaScriptManager.JAVASCRIPT_REQUEST_VALIDATION_ENABLED, new Boolean(
3) A user can set a value on an HTMLField which will override the GlobalValidation and the RequestValidation.
You would use this in a case where you had some fields on a single JSP that needed JS validation and some that didn't. To set
JS validation on a field you would call the instanceMethod HTMLField.setJavaScriptFieldValidation(
Creation date: (5/16/2002 1:56:31 PM)
public static boolean isValidatableDateFormat(java.lang.String pDateFormat)
pDateFormat
- java.lang.String
public static void setJavaScriptGlobalValidationEnabled(boolean newJavaScriptGlobalValidation)
JavaScript is validation on the client. We have a JavaScript file currently out in ../dataengine/js/fieldValidation.js In this file we are validating each generic field type. Refer to that file for details.
There are 3 levels of witch a user can set the JavaScript validation on or off.
1) A user can statically set a boolean on JavaScriptManager.setJavaScriptGlobalValidation(
2) A user can set a value on the HttpServletRequest which will override the GlobalValidation.
This would normally be done from a JSP or Servlet where you only want certain JSP's to use JavaScript
validation. An example would be if you need to turn off JS validation for most of you Applications/JSPs,
then you would set the global variable defined in 1) to false. Then if you had a few JSPs that could use
JS validation, you would make a call similiar to request.setAttribute(JavaScriptManager.JAVASCRIPT_REQUEST_VALIDATION_ENABLED, new Boolean(
3) A user can set a value on an HTMLField which will override the GlobalValidation and the RequestValidation.
You would use this in a case where you had some fields on a single JSP that needed JS validation and some that didn't. To set
JS validation on a field you would call the instanceMethod HTMLField.setJavaScriptFieldValidation(
Creation date: (5/16/2002 1:56:31 PM)
newJavaScriptGlobalValidation
- boolean
public static void setJavaScriptSourcePath(java.lang.String newJavaScriptSourcePath)
newJavaScriptSourcePath
- java.lang.String
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |