Set of functions used for input fields management ( filter, format, check, .. )
Method Summary | |
boolean |
fwkAlphaFilter(object oEvent,
object oField,
string sOpt,
string sUpperLower)
INTERNAL ( Internal framework function, do not use ) Filters characters for a "ALPHABETICAL" field |
boolean |
fwkAlphaNumFilter(object oEvent,
object oField,
string sOpt,
string sUpperLower)
INTERNAL ( Internal framework function, do not use ) Filters characters for a "ALPHANUMERIC" field |
boolean |
fwkCheckAlpha(string sFieldValue,
string sOpt,
string sUpperLower)
Checks the validity of a "ALPHABETICAL" field |
boolean |
fwkCheckAlphaNum(string sFieldValue,
string sOpt,
string sUpperLower)
Checks the validity of a "ALPHANUMERIC" field |
string |
fwkCheckboxGetValue()
INTERNAL ( Internal framework function, do not use ) Returns the value of the checkbox |
void |
fwkCheckboxSetValue(string sVal)
INTERNAL ( Internal framework function, do not use ) Sets the value of the checkbox |
boolean |
fwkCheckCharAlpha(number c,
string sOpt,
string sUpperLower)
Checks the validity of a "ALPHABETICAL" character |
boolean |
fwkCheckDate(string sFieldValue)
Deprecated. |
void |
fwkCheckField(object oField,
boolean bCanBeNull,
string sType,
number iMinValue,
number iMaxValue,
string sFormat)
Checks the given field (main function for field checking) |
boolean |
fwkCheckInt(string sFieldValue,
number iMinValue,
number iMaxValue)
Checks the validity of a "INTEGER" field |
void |
fwkCheckNotNull(object oField)
Checks the field is not null |
boolean |
fwkCheckNum(string sFieldValue,
number fMinValue,
number fMaxValue)
Checks the validity of a "NUMERIC" field |
void |
fwkCheckRegExp(object oField,
boolean bCanBeNull,
string sRegExp)
Checks the field matches the regular expression |
boolean |
fwkCheckSelect(string sFieldValue,
string sOpt)
Checks the validity of a "SELECT" field |
boolean |
fwkDateFilter(object oEvent,
object oField)
INTERNAL ( Internal framework function, do not use ) Filters characters for a "DATE" field |
void |
fwkDefineShallowCheckingErrorColors(string sColor,
string sBgColor)
Defines colors for a shallow checking error (surface control) |
string |
fwkFieldDateGetValue()
INTERNAL ( Internal framework function, do not use ) Returns the current field value in ISO format |
void |
fwkFieldDateSetValue(string sDateIso)
INTERNAL ( Internal framework function, do not use ) Sets the current field value in ISO format |
void |
fwkFieldSetDisabled(boolean bFlag)
INTERNAL ( Internal framework function, do not use ) Sets the activation of the field |
boolean |
fwkFilter(object oEvent,
object oField,
string sType)
Filters input characters for the given field (main function for input filtering) |
string |
fwkFormatDate(string sVal,
string sFormat)
Deprecated. |
string |
fwkFormatDateYMD(string sYear,
string sMonth,
string sDay,
string sFormat)
Deprecated. |
string |
fwkFormatInt(string sVal,
string sFormat)
Returns the formatted field value using the given format ( function used for "INT" field type ) |
string |
fwkFormatNum(string sVal,
string sFormat)
Returns the formatted field value using the given format ( function used for "NUM" field type ) |
number |
fwkGetKeyCode(object oEvent)
Returns the ISO code of the pressed key |
string |
fwkGetOptionalChars(string sType)
INTERNAL ( Internal framework function, do not use ) Returns the option characters of the field's type, i.e. the right part of the ':' if any ( e.g. " -," for type="Alpha: -," ) |
string |
fwkGetPureType(string sType)
INTERNAL ( Internal framework function, do not use ) Returns the 'pure type' of the field, i.e. the left part of the ':' if any ( e.g. |
void |
fwkHtmlViewerSetValue(string sVal)
INTERNAL ( Internal framework function, do not use ) Sets the "HTMLviewer" field value |
boolean |
fwkIntFilter(object oEvent,
object oField,
string sOpt)
INTERNAL ( Internal framework function, do not use ) Filters characters for a "INTEGER" field |
void |
fwkInvalidChar(object oField)
|
boolean |
fwkNumFilter(object oEvent,
object oField,
string sOpt)
INTERNAL ( Internal framework function, do not use ) Filters characters for a "NUMERIC" field |
string |
fwkRadioGroupGetValue()
INTERNAL ( Internal framework function, do not use ) Returns the value of the radio group |
void |
fwkRadioGroupSetDisabled(boolean bFlag)
INTERNAL ( Internal framework function, do not use ) Sets the activation of the radio group widget |
void |
fwkRadioGroupSetValue(string sVal)
INTERNAL ( Internal framework function, do not use ) Sets the value of the radio group |
void |
fwkRestoreInitialColors(object oField)
INTERNAL ( Internal framework function, do not use ) Restores the initial colors od the given field |
string |
fwkRTEGetValue()
INTERNAL ( Internal framework function, do not use ) Returns the Rich Text Editor value |
void |
fwkRTESetValue(string sVal)
INTERNAL ( Internal framework function, do not use ) Sets the Rich Text Editor value |
boolean |
fwkSelectFilter(object oEvent,
object oField,
string sSelectedChars,
string sUpperLower)
INTERNAL ( Internal framework function, do not use ) Filters characters for a "SELECT" field |
void |
fwkSetFieldFocus(object oHtmlObject)
Selects the field with the "select()" function when it's possible else executes the "focus()" function |
void |
fwkSetFieldShallowCheckingErrorColor(object oField)
INTERNAL ( Internal framework function, do not use ) Sets the error colors for the given field (when an error occurred) |
void |
fwkSetKeyCode(object oEvent,
number iNewKeyCode)
Sets the ISO code of the key |
boolean |
fwkValidDate(string sDay,
string sMonth,
string sYear)
Checks the validity of the given date |
number |
GetDotPosition(string sFormat)
INTERNAL ( Internal framework function, do not use ) Returns the position of the dot in the format or -1 if invalid format (no dot or more than 1 dot) |
number |
privateAlphaFilter(number iCar,
string sOpt,
string sUpperLower)
INTERNAL ( Internal framework function, do not use ) Returns the converted character |
Method Detail |
public void fwkInvalidChar(object oField)
oField
- the field referencepublic void fwkDefineShallowCheckingErrorColors(string sColor, string sBgColor)
sColor
- the error colorsBgColor
- the error background colorpublic void fwkSetFieldShallowCheckingErrorColor(object oField)
oField
- the field referencepublic void fwkRestoreInitialColors(object oField)
oField
- the field referencepublic string fwkGetPureType(string sType)
sType
- the value of the "type" attribute
public string fwkGetOptionalChars(string sType)
sType
- the value of the "type" attribute
public boolean fwkFilter(object oEvent, object oField, string sType)
oEvent
- the event objectoField
- the field referencesType
- the field type ( "INT", "NUM", "DATE", "ALPHA", "ALPHAUC", etc... )
public number fwkGetKeyCode(object oEvent)
oEvent
- the event object
public void fwkSetKeyCode(object oEvent, number iNewKeyCode)
oEvent
- the event objectiNewKeyCode
- the new codepublic boolean fwkIntFilter(object oEvent, object oField, string sOpt)
oEvent
- the event objectoField
- the field referencesOpt
- the optionnal characters
public boolean fwkNumFilter(object oEvent, object oField, string sOpt)
oEvent
- the event objectoField
- the field referencesOpt
- the optionnal characters
public number privateAlphaFilter(number iCar, string sOpt, string sUpperLower)
iCar
- the character codesOpt
- the optionnal characterssUpperLower
- "U"=Upper | "L"=Lower | ""
public boolean fwkAlphaFilter(object oEvent, object oField, string sOpt, string sUpperLower)
oEvent
- the event objectoField
- the field referencesOpt
- the optionnal characterssUpperLower
- "U"=Upper | "L"=Lower | ""
public boolean fwkAlphaNumFilter(object oEvent, object oField, string sOpt, string sUpperLower)
oEvent
- the event objectoField
- the field referencesOpt
- the optionnal characterssUpperLower
- "U"=Upper | "L"=Lower | ""
public boolean fwkDateFilter(object oEvent, object oField)
oEvent
- the event objectoField
- the field reference
public boolean fwkSelectFilter(object oEvent, object oField, string sSelectedChars, string sUpperLower)
oEvent
- the event objectoField
- the field referencesSelectedChars
- the list of acceptable characterssUpperLower
- "U"=Upper | "L"=Lower | ""
public void fwkCheckNotNull(object oField)
oField
- the field referencepublic void fwkCheckRegExp(object oField, boolean bCanBeNull, string sRegExp)
oField
- the field referencebCanBeNull
- true(can be null) | false(cannot be null)sRegExp
- the regular expressionpublic void fwkCheckField(object oField, boolean bCanBeNull, string sType, number iMinValue, number iMaxValue, string sFormat)
oField
- the field to check ( object reference )bCanBeNull
- true (can be null) or false (cannot be null)sType
- the field type ( "INT", "NUM", "DATE", "ALPHA", "ALPHAUC", etc... )iMinValue
- the minimum value ( for "INT" and "NUM" fields )iMaxValue
- the maximum value ( for "INT" and "NUM" fields )sFormat
- the field's formatpublic boolean fwkValidDate(string sDay, string sMonth, string sYear)
sDay
- the daysMonth
- the monthsYear
- the year
public boolean fwkCheckDate(string sFieldValue)
sFieldValue
- the field value
public boolean fwkCheckInt(string sFieldValue, number iMinValue, number iMaxValue)
sFieldValue
- the field valueiMinValue
- the minimum valueiMaxValue
- the maximum value
public boolean fwkCheckNum(string sFieldValue, number fMinValue, number fMaxValue)
sFieldValue
- the field valuefMinValue
- the minimum valuefMaxValue
- the maximum value
public boolean fwkCheckCharAlpha(number c, string sOpt, string sUpperLower)
c
- the charactersOpt
- the optionnal characterssUpperLower
- "U"=Upper | "L"=Lower | ""
public boolean fwkCheckAlpha(string sFieldValue, string sOpt, string sUpperLower)
sFieldValue
- the field valuesOpt
- the optionnal characterssUpperLower
- "U"=Upper | "L"=Lower | ""
public boolean fwkCheckAlphaNum(string sFieldValue, string sOpt, string sUpperLower)
sFieldValue
- the field valuesOpt
- the optionnal characterssUpperLower
- "U"=Upper | "L"=Lower | ""
public boolean fwkCheckSelect(string sFieldValue, string sOpt)
sFieldValue
- the field valuesOpt
- the optionnal characters
public string fwkFormatDateYMD(string sYear, string sMonth, string sDay, string sFormat)
sYear
- the yearsMonth
- the monthsDay
- the daysFormat
- the format to apply ( "DD/MM/YYYY", "DD/MM/YY", "MM/DD/YYYY", "MM/DD/YY", "MM-DD-YYYY", ... )
public string fwkFormatDate(string sVal, string sFormat)
sVal
- the date valuesFormat
- the format to apply
public string fwkFormatInt(string sVal, string sFormat)
sVal
- the field valuesFormat
- the format to apply
public string fwkFormatNum(string sVal, string sFormat)
sVal
- the field valuesFormat
- the format to apply
public number GetDotPosition(string sFormat)
sFormat
- the format to apply
public void fwkSetFieldFocus(object oHtmlObject)
oHtmlObject
- the HTML objectpublic string fwkFieldDateGetValue()
public void fwkFieldDateSetValue(string sDateIso)
sDateIso
- the date ISO valuepublic string fwkCheckboxGetValue()
public void fwkCheckboxSetValue(string sVal)
sVal
- the new checkbox valuepublic string fwkRadioGroupGetValue()
public void fwkRadioGroupSetValue(string sVal)
sVal
- the new radio group valuepublic void fwkRadioGroupSetDisabled(boolean bFlag)
bFlag
- true(enable) | false(disable)public void fwkFieldSetDisabled(boolean bFlag)
bFlag
- true(enable) | false(disable)public string fwkRTEGetValue()
public void fwkRTESetValue(string sVal)
sVal
- the new Rich Text Editor valuepublic void fwkHtmlViewerSetValue(string sVal)
sVal
- the new value