telosys.objects
Class Screen

java.lang.Object
  extended bytelosys.objects.Screen

public class Screen
extends java.lang.Object

Screen object
This object is designed to manage the current screen
NB : Many of its methods are not supposed to be used directly by the application


Constructor Summary
protected Screen(string sreenName, string ajaxUrl)
          Constructor The screen id is "0"
protected Screen(string sreenName, string ajaxUrl, number screenId)
          Constructor
 
Method Summary
 boolean CheckAllFields()
          Checks all fields of the screen
 boolean CheckField(object oField)
          Checks a specific field
 void clear(string sZone)
          Clears all fields of the screen or of the given screen zone (can be null)
 void clearField(object oField)
          Clears the given field
 void clearViews(string sZone)
          Clears all views of the screen or of the given screen zone (can be null)
 void close()
          Deprecated.  
 void desc()
          Shows (alert) a description of the screen
 void disable(string sZone)
          Disables all the screen or the given screen zone (can be null)
 void enable(string sZone)
          Enables all the screen or the given screen zone (can be null)
 void Exit()
          Deprecated.  
 string getElementsString()
          Returns a string with all elements of the screen
 string getRequestURL()
          Returns the URL use to send the requests
 number getScreenId()
          Returns the screen id
 string getScreenName()
          Returns the screen name
 ScreenView[] getViews()
          Returns an array with all views of the screen
 void OnLoad()
          Deprecated.  
 void RegisterCheckBox(string sId, string sScreenZone, string sXmlTag, string sXmlAttr, string sValOn, string sValOff)
          Registers a checkbox
 void RegisterComboBox(string sId, string sScreenZone, string sXmlTag, string sXmlAttr)
          Registers a combobox
 object RegisterField(string sFieldId, string sScreenZone, string sXmlTag, string sXmlAttr)
          Registers a field
 void RegisterFieldDate(string sId, string sScreenZone, string sXmlTag, string sXmlAttr, string sFormat)
          Registers a date field
 void RegisterHidden(string sId, string sScreenZone, string sXmlTag, string sXmlAttr)
          Registers ...
 void RegisterHtmlViewer(string sId, string sScreenZone, string sXmlTag, string sXmlAttr)
          Registers a html viewer
 void RegisterListBox(string sId, string sScreenZone, string sXmlTag, string sXmlAttr)
          Registers a listbox
 void RegisterRadioGroup(string sId, string sScreenZone, string sXmlTag, string sXmlAttr, string[] aRadioIds)
          Registers a radio group
 void RegisterRichTextEditor(string sId, string sScreenZone, string sXmlTag, string sXmlAttr)
          Registers a rich text editor
 void RegisterTextArea(string sId, string sScreenZone, string sXmlTag, string sXmlAttr)
          Registers a text area
 object RegisterView(string sContainerId, string sScreenZone, string sXmlTag, string sRenderer)
          Registers a view
 string ScreenToXml(string argElementName)
          Returns the xml description of the given element
 void setDisabled(boolean bFlagDisabled, string sZone)
          Sets disabled all screen or the given screen zone (can be null)
 void setFieldDisabled(object oField, java.lang.Boolean bFlag)
          Sets enable/disable the field
 void setParametersFromFields(Map paramMap)
          Populates the given map with the value of each field declared in the screen
map[xmlAttribute] = fieldValue
 void setParametersFromFields(Map paramMap, string elementName)
          Populates the given map with the values of the fields belonging to the given element name
map[xmlAttribute] = fieldValue
 void setTrace(boolean flag)
          Set the "trace" flag
 void XmlToScreen(object oResponse)
          Populates the fields and views of the screen with XML data received
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Screen

protected Screen(string sreenName,
                 string ajaxUrl)
Constructor The screen id is "0"

Parameters:
sreenName - : name of the screen
ajaxUrl - : URL for AJAX actions requests

Screen

protected Screen(string sreenName,
                 string ajaxUrl,
                 number screenId)
Constructor

Parameters:
sreenName - : name of the screen
ajaxUrl - : URL for AJAX actions requests
screenId - : id of the screen ( 0 to N )
Method Detail

getScreenName

public string getScreenName()
Returns the screen name

Returns:
the screen name

getScreenId

public number getScreenId()
Returns the screen id

Returns:
the screen id

getRequestURL

public string getRequestURL()
Returns the URL use to send the requests

Returns:
the URL use to send the requests

getElementsString

public string getElementsString()
Returns a string with all elements of the screen

Returns:
all elements of the screen

getViews

public ScreenView[] getViews()
Returns an array with all views of the screen

Returns:
all views of the screen

ScreenToXml

public string ScreenToXml(string argElementName)
Returns the xml description of the given element

Parameters:
argElementName - the element name
Returns:
the xml description of the element

XmlToScreen

public void XmlToScreen(object oResponse)
Populates the fields and views of the screen with XML data received

Parameters:
oResponse - the server response object

RegisterView

public object RegisterView(string sContainerId,
                           string sScreenZone,
                           string sXmlTag,
                           string sRenderer)
Registers a view

Parameters:
sContainerId - the container id
sScreenZone - the screen zone ("zone" attribute)
sXmlTag - the xml tag ("view" attribute)
sRenderer - the renderer to use ("renderer" attribute)
Returns:
the container object

RegisterField

public object RegisterField(string sFieldId,
                            string sScreenZone,
                            string sXmlTag,
                            string sXmlAttr)
Registers a field

Parameters:
sFieldId - the field id
sScreenZone - the screen zone ("zone" attribute)
sXmlTag - the xml tag
sXmlAttr -
Returns:
the field object

RegisterFieldDate

public void RegisterFieldDate(string sId,
                              string sScreenZone,
                              string sXmlTag,
                              string sXmlAttr,
                              string sFormat)
Registers a date field

Parameters:
sId - the field id
sScreenZone - the screen zone ("zone" attribute)
sXmlTag - the xml tag
sXmlAttr -
sFormat - the date format

RegisterHidden

public void RegisterHidden(string sId,
                           string sScreenZone,
                           string sXmlTag,
                           string sXmlAttr)
Registers ...

Parameters:
sId - the field id
sScreenZone - the screen zone ("zone" attribute)
sXmlTag - the xml tag
sXmlAttr -

RegisterComboBox

public void RegisterComboBox(string sId,
                             string sScreenZone,
                             string sXmlTag,
                             string sXmlAttr)
Registers a combobox

Parameters:
sId - the field id
sScreenZone - the screen zone ("zone" attribute)
sXmlTag - the xml tag
sXmlAttr -

RegisterListBox

public void RegisterListBox(string sId,
                            string sScreenZone,
                            string sXmlTag,
                            string sXmlAttr)
Registers a listbox

Parameters:
sId - the field id
sScreenZone - the screen zone ("zone" attribute)
sXmlTag - the xml tag
sXmlAttr -

RegisterCheckBox

public void RegisterCheckBox(string sId,
                             string sScreenZone,
                             string sXmlTag,
                             string sXmlAttr,
                             string sValOn,
                             string sValOff)
Registers a checkbox

Parameters:
sId - the field id
sScreenZone - the screen zone ("zone" attribute)
sXmlTag - the xml tag
sXmlAttr -
sValOn - the on value
sValOff - the off value

RegisterRadioGroup

public void RegisterRadioGroup(string sId,
                               string sScreenZone,
                               string sXmlTag,
                               string sXmlAttr,
                               string[] aRadioIds)
Registers a radio group

Parameters:
sId - the field id
sScreenZone - the screen zone ("zone" attribute)
sXmlTag - the xml tag
sXmlAttr -
aRadioIds - the list of id (an array)

RegisterTextArea

public void RegisterTextArea(string sId,
                             string sScreenZone,
                             string sXmlTag,
                             string sXmlAttr)
Registers a text area

Parameters:
sId - the field id
sScreenZone - the screen zone ("zone" attribute)
sXmlTag - the xml tag
sXmlAttr -

RegisterRichTextEditor

public void RegisterRichTextEditor(string sId,
                                   string sScreenZone,
                                   string sXmlTag,
                                   string sXmlAttr)
Registers a rich text editor

Parameters:
sId - the field id
sScreenZone - the screen zone ("zone" attribute)
sXmlTag - the xml tag
sXmlAttr -

RegisterHtmlViewer

public void RegisterHtmlViewer(string sId,
                               string sScreenZone,
                               string sXmlTag,
                               string sXmlAttr)
Registers a html viewer

Parameters:
sId - the field id
sScreenZone - the screen zone ("zone" attribute)
sXmlTag - the xml tag
sXmlAttr -

clearField

public void clearField(object oField)
Clears the given field

Parameters:
oField - the field reference

setFieldDisabled

public void setFieldDisabled(object oField,
                             java.lang.Boolean bFlag)
Sets enable/disable the field

Parameters:
oField - the field reference
bFlag - true(enable) | false(disable)

clearViews

public void clearViews(string sZone)
Clears all views of the screen or of the given screen zone (can be null)

Parameters:
sZone - the screen zone (can be null)

clear

public void clear(string sZone)
Clears all fields of the screen or of the given screen zone (can be null)

Parameters:
sZone - the screen zone (can be null)

enable

public void enable(string sZone)
Enables all the screen or the given screen zone (can be null)

Parameters:
sZone - the screen zone (can be null)

disable

public void disable(string sZone)
Disables all the screen or the given screen zone (can be null)

Parameters:
sZone - the screen zone (can be null)

setDisabled

public void setDisabled(boolean bFlagDisabled,
                        string sZone)
Sets disabled all screen or the given screen zone (can be null)

Parameters:
bFlagDisabled - true(enable) | false(disable)
sZone - the screen zone (can be null)

desc

public void desc()
Shows (alert) a description of the screen


OnLoad

public void OnLoad()
Deprecated.  

DO NOT USE !


Exit

public void Exit()
Deprecated.  

DO NOT USE !


close

public void close()
Deprecated.  

DO NOT USE !


CheckField

public boolean CheckField(object oField)
Checks a specific field

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

CheckAllFields

public boolean CheckAllFields()
Checks all fields of the screen

Returns:
true(OK) | false(KO)

setTrace

public void setTrace(boolean flag)
Set the "trace" flag

Parameters:
flag -
Since:
v 1.1.0

setParametersFromFields

public void setParametersFromFields(Map paramMap,
                                    string elementName)
Populates the given map with the values of the fields belonging to the given element name
map[xmlAttribute] = fieldValue

Parameters:
paramMap - the map to populate
elementName - the name of the element
Since:
v 1.1.0

setParametersFromFields

public void setParametersFromFields(Map paramMap)
Populates the given map with the value of each field declared in the screen
map[xmlAttribute] = fieldValue

Parameters:
paramMap - the map to populate
Since:
v 1.1.0