codeLabel


Name space rialto.widget
FILE rialtoEngine\javascript\components\controls\codeLabel.js
NAME codeLabel
INHERITS AbstractComponent
VERSION 0.86
update
DESCRIPTION This object create an input field with an help icon which opens a popup which lists the authorized values

This object is associated to an another one called FenRech which represents the popup to open on the help button click. To work with the server you'll need an url. The call can be pass from both the codeLabel object or the fenRech object. The treatment of the response must callback the refreshData method of the object. The parameter of the method is a javascript array of array incluing the available codes and labels. -a liste of value if this.boolWithLabel=false (ex: [[val1],[val2],...,[valn]]) -a list of array which contain a couple code/label if this.boolWithLabel=true (ex: [[code1,label1],...,[coden,labeln]])


CONSTRUCTOR


Name Type Description Default
Name String Name of the HTML element
top int Top position (in pixel) 0
left int Left position (in pixel) 0
width String Width (in pixel or %) 100%
parent String or reference Reference of an HTML or a javascript element parent of the code label html element
objPar.url String url called to retrieve codes
objPar.arrValue Array the array is a list of value (boolWithLabel=false) or a list of array which contain a couple code/label (boolWithLabel=true)
objPar.alwaysRefresh boolean If True and if url, the url will always be call to refresh data false
objPar.submitOnload boolean true to allow the popup to call the url onload true
objPar.codeWidth int width of the first code input if there is a label input 40
objPar.withLabel boolean True if the code input has a label protected field true

Example:
        var codeLabel0=new rialto.widget.codeLabel('codeLabel0',123,422,200,document.body,{alwaysRefresh:true,codeWidth:"",submitOnload:true,position:"absolute",withLabel:true});
        

PUBLIC METHODS


Method Arguments list Return value Inherits To redefine
setPermissiveValue Array arrPermValue void no no
getValue String no no
setValue String code,String label void no no
setEnable boolean isEnable void no no
isNotEmpty boolean no no

setPermissiveValue

this method is use to set the permissive value
Parameters:
Array arrPermValue:the array is a list of value (boolWithLabel=false) or a list of array which contain a couple code/label (boolWithLabel=true)
Example:
myCodLab.setPermissiveValue([[code1,label1],[code2,label2],[coden,labeln]]); 

getValue

return the value of the code input
Parameters:

setValue

this method will allow to change the value of the input
Parameters:
String code:new code to display
String label:new label to display

setEnable

this method will allow to enable or disable the code and label input according to the parameter
Parameters:
boolean isEnable:True to enable

isNotEmpty

return true if the label input is filled
Parameters: