Text


Name space rialto.widget
FILE rialtoEngine\javascript\components\controls\inputField.js
NAME Text
INHERITS AbstractComponent
VERSION 0.86
update
DESCRIPTION This object create an input text



CONSTRUCTOR


Name Type Description Default
name String Name of the HTML input
top int Top position (in pixel) 0
left int Left position (in pixel) 0
width String Width (in pixel or %) 100%
dataType String type of input (A=Alpha-N=Num-D=Date-H=hour-P=password-Hi=hidden-T=textArea)
parent String or reference Reference of an HTML or a javascript element parent of the input html element
objPar.autoUp boolean Automatic UpperCase Conversion true
objPar.isRequired boolean Field is surrounded in red whith a star false
objPar.disable boolean True if the area is disabled false
objPar.accessKey String character use to set focus by pressing the alt key
objPar.tabIndex String focus oder while pressing the tab key
objPar.rows int Max number of lines if datatype=textarea 5

Example:
          txt = new rialto.widget.Text('DOSA',10,80,200,'I',CADRE1,{autoUp:true,isRequired:false,disable:false,rows:5,tabIndex:1});          
        

PUBLIC METHODS


Method Arguments list Return value Inherits To redefine
displayMessage String strMess,boolean boolSetFoc void no no
hasChanged boolean no no
setEnable boolean isEnable void no no
getValue String no no
setValue String newText void no no
showAsRequired void no no
removeAsRequired void no no
setFocus void no no
onblur boolean no yes
onfocus no yes

displayMessage

this method will allow to display a message in a popoup
Parameters:
String strMess:message to display
boolean boolSetFoc:true to set the focus to the input after the message validation

hasChanged

this method will indicate if the text value has changed
Parameters:

setEnable

this method will allow to enable or disable the text according to the parameter
Parameters:
boolean isEnable:True to enable

getValue

this method will return the value of the input field
Parameters:

setValue

this method will allow to change the value of the input field
Parameters:
String newText:new value of the input field

showAsRequired

this method will indicate that the input is required (red border whith a star)
Parameters:

removeAsRequired

reset the require style
Parameters:

setFocus

this method will give the focus to the input
Parameters:

onblur

this method will be raise after onblur event. It must return a boolean that indicates if the check is ok
Parameters:

The code must be redefine after the instanciation of the component. By default this method does nothing.

onfocus

this method will be raise after onfocus event
Parameters:

The code must be redefine after the instanciation of the component. By default this method does nothing.