telosys.functions
Interface Fields


public interface Fields

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

fwkInvalidChar

public void fwkInvalidChar(object oField)
Parameters:
oField - the field reference

fwkDefineShallowCheckingErrorColors

public void fwkDefineShallowCheckingErrorColors(string sColor,
                                                string sBgColor)
Defines colors for a shallow checking error (surface control)

Parameters:
sColor - the error color
sBgColor - the error background color

fwkSetFieldShallowCheckingErrorColor

public void fwkSetFieldShallowCheckingErrorColor(object oField)
INTERNAL ( Internal framework function, do not use )
Sets the error colors for the given field (when an error occurred)

Parameters:
oField - the field reference

fwkRestoreInitialColors

public void fwkRestoreInitialColors(object oField)
INTERNAL ( Internal framework function, do not use )
Restores the initial colors od the given field

Parameters:
oField - the field reference

fwkGetPureType

public 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. "Alpha" for type="Alpha: ._;,")

Parameters:
sType - the value of the "type" attribute
Returns:
the field type

fwkGetOptionalChars

public 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: -," )

Parameters:
sType - the value of the "type" attribute
Returns:
the option characters

fwkFilter

public boolean fwkFilter(object oEvent,
                         object oField,
                         string sType)
Filters input characters for the given field (main function for input filtering)

Parameters:
oEvent - the event object
oField - the field reference
sType - the field type ( "INT", "NUM", "DATE", "ALPHA", "ALPHAUC", etc... )
Returns:
true(OK) | false(KO)

fwkGetKeyCode

public number fwkGetKeyCode(object oEvent)
Returns the ISO code of the pressed key

Parameters:
oEvent - the event object
Returns:
the key code

fwkSetKeyCode

public void fwkSetKeyCode(object oEvent,
                          number iNewKeyCode)
Sets the ISO code of the key

Parameters:
oEvent - the event object
iNewKeyCode - the new code

fwkIntFilter

public boolean fwkIntFilter(object oEvent,
                            object oField,
                            string sOpt)
INTERNAL ( Internal framework function, do not use )
Filters characters for a "INTEGER" field

Parameters:
oEvent - the event object
oField - the field reference
sOpt - the optionnal characters
Returns:
true(OK) | false(KO)

fwkNumFilter

public boolean fwkNumFilter(object oEvent,
                            object oField,
                            string sOpt)
INTERNAL ( Internal framework function, do not use )
Filters characters for a "NUMERIC" field

Parameters:
oEvent - the event object
oField - the field reference
sOpt - the optionnal characters
Returns:
true(OK) | false(KO)

privateAlphaFilter

public number privateAlphaFilter(number iCar,
                                 string sOpt,
                                 string sUpperLower)
INTERNAL ( Internal framework function, do not use )
Returns the converted character

Parameters:
iCar - the character code
sOpt - the optionnal characters
sUpperLower - "U"=Upper | "L"=Lower | ""
Returns:
the converted character

fwkAlphaFilter

public boolean fwkAlphaFilter(object oEvent,
                              object oField,
                              string sOpt,
                              string sUpperLower)
INTERNAL ( Internal framework function, do not use )
Filters characters for a "ALPHABETICAL" field

Parameters:
oEvent - the event object
oField - the field reference
sOpt - the optionnal characters
sUpperLower - "U"=Upper | "L"=Lower | ""
Returns:
true(OK) | false(KO)

fwkAlphaNumFilter

public boolean fwkAlphaNumFilter(object oEvent,
                                 object oField,
                                 string sOpt,
                                 string sUpperLower)
INTERNAL ( Internal framework function, do not use )
Filters characters for a "ALPHANUMERIC" field

Parameters:
oEvent - the event object
oField - the field reference
sOpt - the optionnal characters
sUpperLower - "U"=Upper | "L"=Lower | ""
Returns:
true(OK) | false(KO)

fwkDateFilter

public boolean fwkDateFilter(object oEvent,
                             object oField)
INTERNAL ( Internal framework function, do not use )
Filters characters for a "DATE" field

Parameters:
oEvent - the event object
oField - the field reference
Returns:
true(OK) | false(KO)

fwkSelectFilter

public boolean fwkSelectFilter(object oEvent,
                               object oField,
                               string sSelectedChars,
                               string sUpperLower)
INTERNAL ( Internal framework function, do not use )
Filters characters for a "SELECT" field

Parameters:
oEvent - the event object
oField - the field reference
sSelectedChars - the list of acceptable characters
sUpperLower - "U"=Upper | "L"=Lower | ""
Returns:
true(OK) | false(KO)

fwkCheckNotNull

public void fwkCheckNotNull(object oField)
Checks the field is not null

Parameters:
oField - the field reference

fwkCheckRegExp

public void fwkCheckRegExp(object oField,
                           boolean bCanBeNull,
                           string sRegExp)
Checks the field matches the regular expression

Parameters:
oField - the field reference
bCanBeNull - true(can be null) | false(cannot be null)
sRegExp - the regular expression

fwkCheckField

public void fwkCheckField(object oField,
                          boolean bCanBeNull,
                          string sType,
                          number iMinValue,
                          number iMaxValue,
                          string sFormat)
Checks the given field (main function for field checking)

Parameters:
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 format

fwkValidDate

public boolean fwkValidDate(string sDay,
                            string sMonth,
                            string sYear)
Checks the validity of the given date

Parameters:
sDay - the day
sMonth - the month
sYear - the year
Returns:
true(OK) | false(KO)

fwkCheckDate

public boolean fwkCheckDate(string sFieldValue)
Deprecated.  

DEPRECATED : Do not use ! Checks the validity of a "DATE" field

Parameters:
sFieldValue - the field value
Returns:
true(OK) | false(KO)

fwkCheckInt

public boolean fwkCheckInt(string sFieldValue,
                           number iMinValue,
                           number iMaxValue)
Checks the validity of a "INTEGER" field

Parameters:
sFieldValue - the field value
iMinValue - the minimum value
iMaxValue - the maximum value
Returns:
true(OK) | false(KO)

fwkCheckNum

public boolean fwkCheckNum(string sFieldValue,
                           number fMinValue,
                           number fMaxValue)
Checks the validity of a "NUMERIC" field

Parameters:
sFieldValue - the field value
fMinValue - the minimum value
fMaxValue - the maximum value
Returns:
true(OK) | false(KO)

fwkCheckCharAlpha

public boolean fwkCheckCharAlpha(number c,
                                 string sOpt,
                                 string sUpperLower)
Checks the validity of a "ALPHABETICAL" character

Parameters:
c - the character
sOpt - the optionnal characters
sUpperLower - "U"=Upper | "L"=Lower | ""
Returns:
true(OK) | false(KO)

fwkCheckAlpha

public boolean fwkCheckAlpha(string sFieldValue,
                             string sOpt,
                             string sUpperLower)
Checks the validity of a "ALPHABETICAL" field

Parameters:
sFieldValue - the field value
sOpt - the optionnal characters
sUpperLower - "U"=Upper | "L"=Lower | ""
Returns:
true(OK) | false(KO)

fwkCheckAlphaNum

public boolean fwkCheckAlphaNum(string sFieldValue,
                                string sOpt,
                                string sUpperLower)
Checks the validity of a "ALPHANUMERIC" field

Parameters:
sFieldValue - the field value
sOpt - the optionnal characters
sUpperLower - "U"=Upper | "L"=Lower | ""
Returns:
true(OK) | false(KO)

fwkCheckSelect

public boolean fwkCheckSelect(string sFieldValue,
                              string sOpt)
Checks the validity of a "SELECT" field

Parameters:
sFieldValue - the field value
sOpt - the optionnal characters
Returns:
true(OK) | false(KO)

fwkFormatDateYMD

public string fwkFormatDateYMD(string sYear,
                               string sMonth,
                               string sDay,
                               string sFormat)
Deprecated.  

DEPRECATED : Do not use ! Returns the formatted date with the given format

Parameters:
sYear - the year
sMonth - the month
sDay - the day
sFormat - the format to apply ( "DD/MM/YYYY", "DD/MM/YY", "MM/DD/YYYY", "MM/DD/YY", "MM-DD-YYYY", ... )
Returns:
the formatted date

fwkFormatDate

public string fwkFormatDate(string sVal,
                            string sFormat)
Deprecated.  

DEPRECATED : Do not use ! Returns the formatted date with the given format

Parameters:
sVal - the date value
sFormat - the format to apply
Returns:
the formatted date

fwkFormatInt

public string fwkFormatInt(string sVal,
                           string sFormat)
Returns the formatted field value using the given format ( function used for "INT" field type )

Parameters:
sVal - the field value
sFormat - the format to apply
Returns:
the formatted value

fwkFormatNum

public string fwkFormatNum(string sVal,
                           string sFormat)
Returns the formatted field value using the given format ( function used for "NUM" field type )

Parameters:
sVal - the field value
sFormat - the format to apply
Returns:
the formatted value

GetDotPosition

public 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)

Parameters:
sFormat - the format to apply
Returns:
the dot position

fwkSetFieldFocus

public void fwkSetFieldFocus(object oHtmlObject)
Selects the field with the "select()" function when it's possible else executes the "focus()" function

Parameters:
oHtmlObject - the HTML object

fwkFieldDateGetValue

public string fwkFieldDateGetValue()
INTERNAL ( Internal framework function, do not use )
Returns the current field value in ISO format

Returns:
the field value in ISO format

fwkFieldDateSetValue

public void fwkFieldDateSetValue(string sDateIso)
INTERNAL ( Internal framework function, do not use )
Sets the current field value in ISO format

Parameters:
sDateIso - the date ISO value

fwkCheckboxGetValue

public string fwkCheckboxGetValue()
INTERNAL ( Internal framework function, do not use )
Returns the value of the checkbox

Returns:
the checkbox value

fwkCheckboxSetValue

public void fwkCheckboxSetValue(string sVal)
INTERNAL ( Internal framework function, do not use )
Sets the value of the checkbox

Parameters:
sVal - the new checkbox value

fwkRadioGroupGetValue

public string fwkRadioGroupGetValue()
INTERNAL ( Internal framework function, do not use )
Returns the value of the radio group

Returns:
the radio group value

fwkRadioGroupSetValue

public void fwkRadioGroupSetValue(string sVal)
INTERNAL ( Internal framework function, do not use )
Sets the value of the radio group

Parameters:
sVal - the new radio group value

fwkRadioGroupSetDisabled

public void fwkRadioGroupSetDisabled(boolean bFlag)
INTERNAL ( Internal framework function, do not use )
Sets the activation of the radio group widget

Parameters:
bFlag - true(enable) | false(disable)

fwkFieldSetDisabled

public void fwkFieldSetDisabled(boolean bFlag)
INTERNAL ( Internal framework function, do not use )
Sets the activation of the field

Parameters:
bFlag - true(enable) | false(disable)

fwkRTEGetValue

public string fwkRTEGetValue()
INTERNAL ( Internal framework function, do not use )
Returns the Rich Text Editor value

Returns:
the Rich Text Editor value

fwkRTESetValue

public void fwkRTESetValue(string sVal)
INTERNAL ( Internal framework function, do not use )
Sets the Rich Text Editor value

Parameters:
sVal - the new Rich Text Editor value

fwkHtmlViewerSetValue

public void fwkHtmlViewerSetValue(string sVal)
INTERNAL ( Internal framework function, do not use )
Sets the "HTMLviewer" field value

Parameters:
sVal - the new value