planetj.html
Class HTMLField

java.lang.Object
  |
  +--planetj.html.HTMLElement
        |
        +--planetj.html.HTMLField

public class HTMLField
extends HTMLElement

!!DA (8/6/2003 9:23:32 AM) - documentation needed

Author:
PlanetJ Corporation

Field Summary
static String BLACK_CHECKMARK
           
static String BLACK_REQUIRED_ASTERICK
           
static String className
          Class name.
static String DEFAULT_CHECKMARK
           
static String DEFAULT_REQUIRED_ASTERICK_COLOR
           
static String RED_CHECKMARK
           
static String RED_REQUIRED_ASTERICK
           
static String WHITE_CHECKMARK
           
static String WHITE_REQUIRED_ASTERICK
           
 
Fields inherited from class planetj.html.HTMLElement
DISABLED
 
Constructor Summary
HTMLField()
          Creates a new HTMLTableProperties object and sets its table id.
HTMLField(Field fld)
          Creates a new HTMLTableProperties object and sets its table id.
 
Method Summary
static StringBuffer appendAnchor(String name, StringBuffer html)
          Appends an anchor to allow for going directly to the given Field on the page.
static StringBuffer appendAssociation(Field field, Operation operation, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static StringBuffer appendAssociation(Field field, Operation operation, String linkText, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static StringBuffer appendAutoPopulateButton(String id, Field field, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Generates a HTML text input for the given Field and arguements.
static StringBuffer appendCheckbox(Field field, String attributes, int row, int column, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. replaced with HTMLInput.appendCheckbox(.....)
static StringBuffer appendCheckbox(Field field, String attributes, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. replaced with HTMLInput.appendCheckbox(.....)
static StringBuffer appendCheckbox(String id, Field field, String attributes, int x, int y, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. replaced with HTMLInput.appendCheckbox(.....)
static StringBuffer appendCheckbox(String id, Field field, String attributes, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. replaced with HTMLInput.appendCheckbox(.....)
 StringBuffer appendCheckbox(String attributes, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, StringBuffer sb)
          Deprecated. replaced by HTMLInput.appendCheckbox(.....)
 StringBuffer appendCheckbox(String attributes, int rcNavIndex, int rowNavIndex, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, StringBuffer html)
          Deprecated. replaced by HTMLInput.appendCheckbox(...)
static StringBuffer appendDisplayValue(Field field, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Returns a StringBuffer representing the Field's value in HTML text.
 StringBuffer appendDisplayValue(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, StringBuffer sb)
          Returns a StringBuffer representing the Field's value in HTML text.
static StringBuffer appendDisplayValue(String id, Field field, StringBuffer originalHTML, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Returns a StringBuffer representing the Field's value in HTML text.
static StringBuffer appendFileUploadButton(String id, Field field, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Generates a HTML text input for the given Field and arguements.
static StringBuffer appendHelp(Field field, StringBuffer html)
          Appends help text onto the StringBuffer.
static StringBuffer appendHiddenSelectionInputs(StringBuffer html, javax.servlet.http.HttpServletRequest request)
          Appends HTML code for the JavaScript and hidden fields needed for Row and Field selection without radio buttons or checkboxes to track which object has been selected.
static StringBuffer appendInput(Field field, int size, int size2, String attributes, String rcNavKey, String rowNavKey, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static StringBuffer appendInput(Field field, int size, String attributes, String rcNavKey, String rowNavKey, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static StringBuffer appendInput(Field field, String attributes, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static StringBuffer appendInput(String id, Field field, int size, int size2, String attributes, String rcNavKey, String rowNavKey, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static StringBuffer appendInput(String id, Field field, int size, String attributes, String rcNavKey, String rowNavKey, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static StringBuffer appendLabel(Field field, boolean labelFromValue, boolean includeColon, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static StringBuffer appendLabel(Field field, boolean includeColon, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static StringBuffer appendLabel(Field field, int maxLength, boolean labelFromValue, boolean includeColon, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 StringBuffer appendLabel(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, StringBuffer sb)
          Deprecated. replaced by appendLabel(Field, boolean, StringBuffer, HttpServletRequest, HttpServletResponse)
static StringBuffer appendLabelExceptionCheckmark(Field field, StringBuffer html)
           
static StringBuffer appendPossibleValuesSearch(String id, Field field, int size, String attributes, String rcNavKey, String rowNavKey, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Generates a HTML text input for the given Field and arguements.
static StringBuffer appendStatusChangeCall(Field fld, String javaScriptEvent, String rcNavKey, String rowNavKey, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, StringBuffer sb)
           
static String generateDisplayValue(Field field, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 String generateDisplayValue(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. repaced with appendDisplayValue(HttpServletRequest, HttpServletResponse, StringBuffer)
 StringBuffer generateHidden(StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. replaced with HTMLInput.appendHiddenInput(....)
 String generateInput(int size, String attributes, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. replaced with appendInput(.....)
 String generateInput(String attributes, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Deprecated.  
 String generateLabel(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Returns a String representing the Field's external name as a bold label.
 String generateLabelAndField(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Returns a String representing the Field's and its label.
 String generateLabelAndInput(int size, String inputAttributes, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Returns a String representing the Field's as input of specified size and also a label.
 String generateLabelAndInput(String inputAttributes, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Returns a String representing the Field's as input and its label.
 String generateLabelDisplayDetails(Field pField)
          This will generate display details if it is turned on.
 String generateRadio(String attributes, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. replaced by HTMLInput.appendRadioInput(....)
 StringBuffer generateTextArea(int rows, int cols, String attributes, int row, int col, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. replaced with generateTextArea(int, int, String, StringBuffer, HttpServletRequest, HttpServletResponse)
 StringBuffer generateTextArea(int cols, int rows, String attributes, StringBuffer html, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. replaced with HTMLTextArea.appendTextArea(String, Field, int, int, String, int, int, StringBuffer, HttpServletRequest, HttpServletResponse)
 String getExceptionCheckmark()
          Possible values currently are RED_CHECKMARK BLACK_CHECKMARK WHITE_CHECKMARK Creation date: (5/15/2002 8:46:47 PM)
 Field getField()
          Returns the HTMLField's Field.
 Boolean getJavaScriptFieldValidationEnabled()
          Returns whether this field should be use JS Validation.
 int getMaxWidth()
          Gets the maximum width that a field's input will take up on the screen (the default is 100).
 String getRCNavKey()
           
 String getRequiredAsterickColor()
          Possible values currently are below, but you can pass in any valid html color RED_REQUIRED_ASTERICK WHITE_REQUIRED_ASTERICK BLACK_REQUIRED_ASTERICK
 String getRowNavKey()
           
 boolean isDisplayDetails()
          This will toggle the details of a field to be displayed or not.
 boolean isDisplayEditFDs()
          Tests if an FD link should be displayed next to the field
static boolean isEnableJavaScriptValidation(javax.servlet.http.HttpServletRequest request)
          Check to see if JavaScript Validation is enabled.
 boolean isIncludeColonAfterLabel()
          This can be set to true if you want a colon {:} placed after each label Creation date: (5/15/2002 8:53:17 PM)
 boolean isJavaScriptValidationEnabled(javax.servlet.http.HttpServletRequest req)
          Returns whether this field should be use JS Validation considering the 3 levels listed below.
 void setDisplayDetails(boolean newDisplayDetails)
          This will toggle the details of a field to be displayed or not.
 void setDisplayEditFDs(boolean newDisplayFDLink)
          Sets if an FD link should be displayed next to the field
 void setExceptionCheckmark(String newExceptionCheckmark)
          You can pass in the check mark color you want to sue.
 HTMLField setField(Field fld)
          Sets the HTMLField's Field.
 void setIncludeColonAfterLabel(boolean newIncludeColonAfterLabel)
          This can be set to true if you want a colon {:} placed after each label Creation date: (5/15/2002 8:53:17 PM)
 void setJavaScriptFieldValidationEnabled(boolean newJavaScriptFieldValidation)
          This will set JavaScript validation on the field level.
 void setMaxWidth(int newMaxWidth)
          Sets the maximum width that a field's input will take up on the screen (the default is 100).
 void setRCNavKey(String key)
           
 void setRequiredAsterickColor(String newRequiredAsterickColor)
          Possible values currently are below, but you can pass in any valid html color RED_REQUIRED_ASTERICK WHITE_REQUIRED_ASTERICK BLACK_REQUIRED_ASTERICK
 void setRowNavKey(String key)
           
 
Methods inherited from class planetj.html.HTMLElement
appendAttribute, appendAttribute, appendExtractableHiddenField, getId, isDisplayField, setId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

className

public static final String className
Class name.


RED_CHECKMARK

public static final String RED_CHECKMARK
See Also:
Constant Field Values

WHITE_CHECKMARK

public static final String WHITE_CHECKMARK
See Also:
Constant Field Values

BLACK_CHECKMARK

public static final String BLACK_CHECKMARK
See Also:
Constant Field Values

DEFAULT_CHECKMARK

public static final String DEFAULT_CHECKMARK
See Also:
Constant Field Values

RED_REQUIRED_ASTERICK

public static final String RED_REQUIRED_ASTERICK
See Also:
Constant Field Values

WHITE_REQUIRED_ASTERICK

public static final String WHITE_REQUIRED_ASTERICK
See Also:
Constant Field Values

BLACK_REQUIRED_ASTERICK

public static final String BLACK_REQUIRED_ASTERICK
See Also:
Constant Field Values

DEFAULT_REQUIRED_ASTERICK_COLOR

public static final String DEFAULT_REQUIRED_ASTERICK_COLOR
See Also:
Constant Field Values
Constructor Detail

HTMLField

public HTMLField()
Creates a new HTMLTableProperties object and sets its table id.


HTMLField

public HTMLField(Field fld)
Creates a new HTMLTableProperties object and sets its table id.

Method Detail

appendAnchor

public static StringBuffer appendAnchor(String name,
                                        StringBuffer html)
                                 throws CMException
Appends an anchor to allow for going directly to the given Field on the page.

Parameters:
name - name of HTML element genarating anchor above
html - buffer to append HTML code to
Returns:
buffer HTML anchor was appended to
CMException

appendAssociation

public static StringBuffer appendAssociation(Field field,
                                             Operation operation,
                                             String linkText,
                                             StringBuffer html,
                                             javax.servlet.http.HttpServletRequest request,
                                             javax.servlet.http.HttpServletResponse response)
                                      throws CMException
CMException

appendAssociation

public static StringBuffer appendAssociation(Field field,
                                             Operation operation,
                                             StringBuffer html,
                                             javax.servlet.http.HttpServletRequest request,
                                             javax.servlet.http.HttpServletResponse response)
                                      throws CMException
CMException

appendAutoPopulateButton

public static StringBuffer appendAutoPopulateButton(String id,
                                                    Field field,
                                                    StringBuffer html,
                                                    javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
                                             throws CMException
Generates a HTML text input for the given Field and arguements.

CMException

appendCheckbox

public StringBuffer appendCheckbox(String attributes,
                                   int rcNavIndex,
                                   int rowNavIndex,
                                   javax.servlet.http.HttpServletRequest request,
                                   javax.servlet.http.HttpServletResponse response,
                                   StringBuffer html)
                            throws CMException
Deprecated. replaced by HTMLInput.appendCheckbox(...)

Returns a StringBuffer representing HTML for input for a Field. Input fields size is specified.

CMException

appendCheckbox

public StringBuffer appendCheckbox(String attributes,
                                   javax.servlet.http.HttpServletRequest req,
                                   javax.servlet.http.HttpServletResponse res,
                                   StringBuffer sb)
                            throws CMException
Deprecated. replaced by HTMLInput.appendCheckbox(.....)

Returns a StringBuffer representing HTML for input for a Field. Input fields size is specified.

CMException

appendCheckbox

public static StringBuffer appendCheckbox(String id,
                                          Field field,
                                          String attributes,
                                          int x,
                                          int y,
                                          StringBuffer html,
                                          javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response)
                                   throws CMException
Deprecated. replaced with HTMLInput.appendCheckbox(.....)

Returns a StringBuffer representing HTML for input for a Field. Input fields size is specified.

CMException

appendCheckbox

public static StringBuffer appendCheckbox(String id,
                                          Field field,
                                          String attributes,
                                          StringBuffer html,
                                          javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response)
                                   throws CMException
Deprecated. replaced with HTMLInput.appendCheckbox(.....)

Returns a StringBuffer representing HTML for input for a Field. Input fields size is specified.

CMException

appendCheckbox

public static StringBuffer appendCheckbox(Field field,
                                          String attributes,
                                          int row,
                                          int column,
                                          StringBuffer html,
                                          javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response)
                                   throws CMException
Deprecated. replaced with HTMLInput.appendCheckbox(.....)

Returns a StringBuffer representing HTML for input for a Field. Input fields size is specified.

CMException

appendCheckbox

public static StringBuffer appendCheckbox(Field field,
                                          String attributes,
                                          StringBuffer html,
                                          javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response)
                                   throws CMException
Deprecated. replaced with HTMLInput.appendCheckbox(.....)

Returns a StringBuffer representing HTML for input for a Field. Input fields size is specified.

CMException

appendDisplayValue

public static StringBuffer appendDisplayValue(String id,
                                              Field field,
                                              StringBuffer originalHTML,
                                              javax.servlet.http.HttpServletRequest request,
                                              javax.servlet.http.HttpServletResponse response)
                                       throws CMException
Returns a StringBuffer representing the Field's value in HTML text.

CMException

appendDisplayValue

public StringBuffer appendDisplayValue(javax.servlet.http.HttpServletRequest req,
                                       javax.servlet.http.HttpServletResponse res,
                                       StringBuffer sb)
                                throws CMException
Returns a StringBuffer representing the Field's value in HTML text.

CMException

appendDisplayValue

public static StringBuffer appendDisplayValue(Field field,
                                              StringBuffer html,
                                              javax.servlet.http.HttpServletRequest request,
                                              javax.servlet.http.HttpServletResponse response)
                                       throws CMException
Returns a StringBuffer representing the Field's value in HTML text.

CMException

appendFileUploadButton

public static StringBuffer appendFileUploadButton(String id,
                                                  Field field,
                                                  StringBuffer html,
                                                  javax.servlet.http.HttpServletRequest request,
                                                  javax.servlet.http.HttpServletResponse response)
                                           throws CMException
Generates a HTML text input for the given Field and arguements.

CMException

appendHelp

public static StringBuffer appendHelp(Field field,
                                      StringBuffer html)
                               throws CMException
Appends help text onto the StringBuffer. This method assumes that the help text exists

CMException

appendHiddenSelectionInputs

public static StringBuffer appendHiddenSelectionInputs(StringBuffer html,
                                                       javax.servlet.http.HttpServletRequest request)
Appends HTML code for the JavaScript and hidden fields needed for Row and Field selection without radio buttons or checkboxes to track which object has been selected.

Parameters:
html - buffer to append html code to.
request - HttpServletRequest

appendInput

public static StringBuffer appendInput(String id,
                                       Field field,
                                       int size,
                                       int size2,
                                       String attributes,
                                       String rcNavKey,
                                       String rowNavKey,
                                       StringBuffer html,
                                       javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
                                throws CMException
CMException

appendInput

public static StringBuffer appendInput(String id,
                                       Field field,
                                       int size,
                                       String attributes,
                                       String rcNavKey,
                                       String rowNavKey,
                                       StringBuffer html,
                                       javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
                                throws CMException
CMException

appendInput

public static StringBuffer appendInput(Field field,
                                       int size,
                                       int size2,
                                       String attributes,
                                       String rcNavKey,
                                       String rowNavKey,
                                       StringBuffer html,
                                       javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
                                throws CMException
CMException

appendInput

public static StringBuffer appendInput(Field field,
                                       int size,
                                       String attributes,
                                       String rcNavKey,
                                       String rowNavKey,
                                       StringBuffer html,
                                       javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
                                throws CMException
CMException

appendInput

public static StringBuffer appendInput(Field field,
                                       String attributes,
                                       javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
                                throws CMException
CMException

appendLabel

public StringBuffer appendLabel(javax.servlet.http.HttpServletRequest req,
                                javax.servlet.http.HttpServletResponse res,
                                StringBuffer sb)
                         throws CMException
Deprecated. replaced by appendLabel(Field, boolean, StringBuffer, HttpServletRequest, HttpServletResponse)

Returns a StringBuffer representing the Field's external name as a bold label.

CMException

appendLabel

public static StringBuffer appendLabel(Field field,
                                       int maxLength,
                                       boolean labelFromValue,
                                       boolean includeColon,
                                       StringBuffer html,
                                       javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
                                throws CMException
CMException

appendLabel

public static StringBuffer appendLabel(Field field,
                                       boolean includeColon,
                                       StringBuffer html,
                                       javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
                                throws CMException
CMException

appendLabel

public static StringBuffer appendLabel(Field field,
                                       boolean labelFromValue,
                                       boolean includeColon,
                                       StringBuffer html,
                                       javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
                                throws CMException
CMException

appendLabelExceptionCheckmark

public static StringBuffer appendLabelExceptionCheckmark(Field field,
                                                         StringBuffer html)
                                                  throws CMException
CMException

appendPossibleValuesSearch

public static StringBuffer appendPossibleValuesSearch(String id,
                                                      Field field,
                                                      int size,
                                                      String attributes,
                                                      String rcNavKey,
                                                      String rowNavKey,
                                                      StringBuffer html,
                                                      javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
                                               throws CMException
Generates a HTML text input for the given Field and arguements.

CMException

appendStatusChangeCall

public static StringBuffer appendStatusChangeCall(Field fld,
                                                  String javaScriptEvent,
                                                  String rcNavKey,
                                                  String rowNavKey,
                                                  javax.servlet.http.HttpServletRequest req,
                                                  javax.servlet.http.HttpServletResponse res,
                                                  StringBuffer sb)
                                           throws CMException
CMException

generateDisplayValue

public String generateDisplayValue(javax.servlet.http.HttpServletRequest request,
                                   javax.servlet.http.HttpServletResponse response)
                            throws CMException
Deprecated. repaced with appendDisplayValue(HttpServletRequest, HttpServletResponse, StringBuffer)

CMException

generateDisplayValue

public static String generateDisplayValue(Field field,
                                          javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response)
                                   throws CMException
CMException

generateHidden

public StringBuffer generateHidden(StringBuffer html,
                                   javax.servlet.http.HttpServletRequest request,
                                   javax.servlet.http.HttpServletResponse response)
                            throws CMException
Deprecated. replaced with HTMLInput.appendHiddenInput(....)

Generates and appends HTML code for a hidden input.

Returns:
StringBuffer
CMException

generateInput

public String generateInput(int size,
                            String attributes,
                            javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
                     throws CMException
Deprecated. replaced with appendInput(.....)

Returns a String representing HTML for input for a Field. Input fields size is specified.

Parameters:
size - int
attributes - String
request - HttpServletRequest
response - HttpServletResponse
Returns:
String
CMException

generateInput

public String generateInput(String attributes,
                            javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse res)
                     throws CMException
Deprecated.  

Returns a String representing HTML for input for a Field with a input field that is the maximum length of the field.

Returns:
String
CMException

generateLabel

public String generateLabel(javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse res)
                     throws CMException
Returns a String representing the Field's external name as a bold label.

Returns:
String
CMException

generateLabelAndField

public String generateLabelAndField(javax.servlet.http.HttpServletRequest req,
                                    javax.servlet.http.HttpServletResponse res)
                             throws CMException
Returns a String representing the Field's and its label.

Returns:
String
CMException

generateLabelAndInput

public String generateLabelAndInput(int size,
                                    String inputAttributes,
                                    javax.servlet.http.HttpServletRequest req,
                                    javax.servlet.http.HttpServletResponse res)
                             throws CMException
Returns a String representing the Field's as input of specified size and also a label.

Parameters:
size - int
Returns:
String
CMException

generateLabelAndInput

public String generateLabelAndInput(String inputAttributes,
                                    javax.servlet.http.HttpServletRequest req,
                                    javax.servlet.http.HttpServletResponse res)
                             throws CMException
Returns a String representing the Field's as input and its label.

Returns:
String
CMException

generateLabelDisplayDetails

public String generateLabelDisplayDetails(Field pField)
                                   throws CMException
This will generate display details if it is turned on. Example would be as follows Birth Date: (MM/dd/yyyy) Time: (HH:mm:ss) Creation date: (5/17/2002 8:14:36 PM)

CMException

generateRadio

public String generateRadio(String attributes,
                            javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
                     throws CMException
Deprecated. replaced by HTMLInput.appendRadioInput(....)

Returns a String representing HTML for input for a Field. Input fields size is specified.

Parameters:
attributes - java.lang.String
Returns:
java.lang.String
CMException

generateTextArea

public StringBuffer generateTextArea(int rows,
                                     int cols,
                                     String attributes,
                                     int row,
                                     int col,
                                     StringBuffer html,
                                     javax.servlet.http.HttpServletRequest request,
                                     javax.servlet.http.HttpServletResponse response)
                              throws CMException
Deprecated. replaced with generateTextArea(int, int, String, StringBuffer, HttpServletRequest, HttpServletResponse)

Generates and appends HTML code for a textarea.

Returns:
StringBuffer
CMException

generateTextArea

public StringBuffer generateTextArea(int cols,
                                     int rows,
                                     String attributes,
                                     StringBuffer html,
                                     javax.servlet.http.HttpServletRequest request,
                                     javax.servlet.http.HttpServletResponse response)
                              throws CMException
Deprecated. replaced with HTMLTextArea.appendTextArea(String, Field, int, int, String, int, int, StringBuffer, HttpServletRequest, HttpServletResponse)

Generates and appends HTML code for a textarea.

Returns:
StringBuffer
CMException

getExceptionCheckmark

public String getExceptionCheckmark()
Possible values currently are RED_CHECKMARK BLACK_CHECKMARK WHITE_CHECKMARK Creation date: (5/15/2002 8:46:47 PM)

Returns:
java.lang.String

getField

public Field getField()
Returns the HTMLField's Field.

Returns:
Field

getJavaScriptFieldValidationEnabled

public Boolean getJavaScriptFieldValidationEnabled()
Returns whether this field should be use JS Validation. Returns null if JS Validation was never set.

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 HTMLGenerator.setJavaScriptGlobalValidation(or) which will set the default for the entire JVM. This defaults to true, meaning we are enabling JavaScript validation by default. However, this global default can be overriden by ->

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(HTMLGenerator.JAVASCRIPT_REQUEST_VALIDATION_ENABLED, new Boolean(or)); However, sometimes you need to be able to turn JS validation on and off on a field by field basis so ->

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(or) You can ask an HTLMField if its JavaScript validation is enabled and it will consider 1), 2), and 3), above and return the appropriate boolean. You do this by calling isJavaScriptValidationEnabled(HttpServletRequest)

Creation date: (5/17/2002 11:01:55 AM)

Returns:
Boolean if this field allows JS Validation, null if this was never set.

getMaxWidth

public int getMaxWidth()
Gets the maximum width that a field's input will take up on the screen (the default is 100). This does not limit the number of characters that a user will be able to enter.


getRCNavKey

public String getRCNavKey()

getRequiredAsterickColor

public String getRequiredAsterickColor()
Possible values currently are below, but you can pass in any valid html color RED_REQUIRED_ASTERICK WHITE_REQUIRED_ASTERICK BLACK_REQUIRED_ASTERICK

This piece will put in the suggested color Asterick in indicating this is requird. The reason we would have different colors is due to different background and font colors.

Creation date: (5/15/2002 9:03:32 PM)

Returns:
java.lang.String

getRowNavKey

public String getRowNavKey()

isDisplayDetails

public boolean isDisplayDetails()
This will toggle the details of a field to be displayed or not. The details in this context are the format the database is expecting the field to be. Example: DateField,MMddyyyy would include the text (MMddyyyy) after the lable. Same goes with Time fields and some other fields

Creation date: (5/15/2002 11:27:12 PM)

Returns:
boolean

isDisplayEditFDs

public boolean isDisplayEditFDs()
Tests if an FD link should be displayed next to the field


isEnableJavaScriptValidation

public static boolean isEnableJavaScriptValidation(javax.servlet.http.HttpServletRequest request)
Check to see if JavaScript Validation is enabled. First the HttpServletRequest is checked. If not specifed, then the global setting is used.


isIncludeColonAfterLabel

public boolean isIncludeColonAfterLabel()
This can be set to true if you want a colon {:} placed after each label Creation date: (5/15/2002 8:53:17 PM)

Returns:
boolean

isJavaScriptValidationEnabled

public boolean isJavaScriptValidationEnabled(javax.servlet.http.HttpServletRequest req)
Returns whether this field should be use JS Validation considering the 3 levels listed below.

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(or) which will set the default for the entire JVM. This defaults to true, meaning we are enabling JavaScript validation by default. However, this global default can be overriden by ->

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(or)); However, sometimes you need to be able to turn JS validation on and off on a field by field basis so ->

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(or) You can ask an HTLMField if its JavaScript validation is enabled and it will consider 1), 2), and 3), above and return the appropriate boolean. You do this by calling isJavaScriptValidationEnabled(HttpServletRequest)

Creation date: (5/17/2002 11:01:55 AM)

Returns:
boolean

setDisplayDetails

public void setDisplayDetails(boolean newDisplayDetails)
This will toggle the details of a field to be displayed or not. The details in this context are the format the database is expecting the field to be. Example: DateField,MMddyyyy would include the text (MMddyyyy) after the lable. Same goes with Time fields and some other fields

Creation date: (5/15/2002 11:27:12 PM)

Parameters:
newDisplayDetails - boolean

setDisplayEditFDs

public void setDisplayEditFDs(boolean newDisplayFDLink)
Sets if an FD link should be displayed next to the field


setExceptionCheckmark

public void setExceptionCheckmark(String newExceptionCheckmark)
You can pass in the check mark color you want to sue. This must be a constant from the class. Possible values currently are RED_CHECKMARK BLACK_CHECKMARK WHITE_CHECKMARK Creation date: (5/15/2002 8:46:47 PM)

Parameters:
newExceptionCheckmark - java.lang.String

setField

public HTMLField setField(Field fld)
Sets the HTMLField's Field.

Parameters:
fld - Field

setIncludeColonAfterLabel

public void setIncludeColonAfterLabel(boolean newIncludeColonAfterLabel)
This can be set to true if you want a colon {:} placed after each label Creation date: (5/15/2002 8:53:17 PM)

Parameters:
newIncludeColonAfterLabel - boolean

setJavaScriptFieldValidationEnabled

public void setJavaScriptFieldValidationEnabled(boolean newJavaScriptFieldValidation)
This will set JavaScript validation on the field level.

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(or) which will set the default for the entire JVM. This defaults to true, meaning we are enabling JavaScript validation by default. However, this global default can be overriden by ->

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(or)); However, sometimes you need to be able to turn JS validation on and off on a field by field basis so ->

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(or) You can ask an HTLMField if its JavaScript validation is enabled and it will consider 1), 2), and 3), above and return the appropriate boolean. You do this by calling isJavaScriptValidationEnabled(HttpServletRequest)

Creation date: (5/17/2002 11:01:55 AM)

Parameters:
newJavaScriptFieldValidation - boolean

setMaxWidth

public void setMaxWidth(int newMaxWidth)
Sets the maximum width that a field's input will take up on the screen (the default is 100). This does not limit the number of characters that a user will be able to enter.


setRCNavKey

public void setRCNavKey(String key)

setRequiredAsterickColor

public void setRequiredAsterickColor(String newRequiredAsterickColor)
Possible values currently are below, but you can pass in any valid html color RED_REQUIRED_ASTERICK WHITE_REQUIRED_ASTERICK BLACK_REQUIRED_ASTERICK

This piece will put in the suggested color Asterick in indicating this is requird. The reason we would have different colors is due to different background and font colors.

Creation date: (5/15/2002 9:03:32 PM)

Parameters:
newRequiredAsterickColor - java.lang.String

setRowNavKey

public void setRowNavKey(String key)