telosys.functions
Interface Common


public interface Common

Common functions


Method Summary
 object $(string id)
          Returns a reference on the object associated with the given id
An error alert is fired if there is no object for the given id
 void fwkCancelEvent(object evt)
          Cancel the given event ( stop the event propagation )
 void fwkCreateLogger(string loggerName)
          Creates a new logger (with its console)
 void fwkDisable(object obj)
          Disables the field associated with the given reference
 void fwkDisable(string id)
          Disables the field associated with the given id
 void fwkEnable(object obj)
          Enables the field associated with the given reference
 void fwkEnable(string id)
          Enables the field associated with the given id
 void fwkExecInnerScript(object obj)
          Deprecated. use fwkExecuteInnerScript instead
 void fwkExecuteInnerScript(object obj)
          Execute all the JavaScript code embedded in the given object Search all the 'script' tags and execute the code
 void fwkExecuteInnerScript(string id)
          Execute all the JavaScript code embedded in the given object Search all the 'script' tags and execute the code
 object fwkGetField(string id)
          Deprecated.  
 object fwkGetIFrameDocument(object obj)
          Returns the 'document object' of the given iframe
 object fwkGetIFrameDocument(string id)
          Returns the 'document object' of the given iframe
 string fwkGetInnerHTML(object obj)
          Returns the "innerHTML" attribute value of the field associated with the given reference
 string fwkGetInnerHTML(string id)
          Returns the "innerHTML" attribute value of the field associated with the given id
 string fwkGetLocation()
          Returns the current page URL ( shortcut for 'window.location.href' )
 string fwkGetName(object obj)
          Returns the name (standard "name" attribute) of the field associated with the given reference
 string fwkGetName(string id)
          Returns the name (standard "name" attribute) of the field associated with the given id
 object fwkGetParentDIV(object obj)
          Returns the DIV parent of the given object
 void fwkGetRelativeXY(object obj)
          Returns the position of the given object The position is returned as an array ([x,y]) The origin (0,0) is the first parent element with position="relative"
 void fwkGetRelativeXY(string id)
          Returns the position of the given object The position is returned as an array ([x,y]) The origin (0,0) is the first parent element with position="relative"
 string fwkGetType(object obj)
          Returns the type (standard "type" attribute) of the field associated with the given reference
 string fwkGetType(string id)
          Returns the type (standard "type" attribute) of the field associated with the given id
 string fwkGetValue(object obj)
          Returns the value (standard "value" attribute) of the field associated with the given reference
 string fwkGetValue(string id)
          Returns the value (standard "value" attribute) of the field associated with the given id
 void fwkGetXY(object obj)
          Returns the position of the given object in the screen The position is returned as an array ([x,y])
 void fwkGetXY(string id)
          Returns the position of the given object in the screen The position is returned as an array ([x,y])
 boolean fwkIsChecked(object obj)
          Returns true if the field associated with the given reference is checked
 boolean fwkIsChecked(string id)
          Returns true if the field associated with the given id is checked
 boolean fwkIsEnabled(object obj)
          Returns true if the field associated with the given reference is enabled
 boolean fwkIsEnabled(string id)
          Returns true if the field associated with the given id is enabled
 void fwkIsReadonly(object obj)
          Returns true if the field associated with the given reference is "read only"
 void fwkIsReadonly(string id)
          Returns true if the field associated with the given id is "read only"
 boolean fwkIsVisible(object obj)
          Returns true if the field associated with the given reference is visible
 boolean fwkIsVisible(string id)
          Returns true if the field associated with the given id is visible
 void fwkLoadPage(string url)
          Loads the given page URL ( shortcut for 'window.location = URL' )
and add a new entry in the history
 void fwkReloadPage()
          Reloads the current page ( shortcut for 'window.location.reload()' )
Reuse the same entry in the history
 void fwkReplacePage(string url)
          Replaces the current page by the content of the given URL ( shortcut for 'window.location.replace(URL)' )
This function avoids creating a new entry in the history (the current entry is reused)
 void fwkResetForm(object obj)
          Reset the given FORM
 void fwkResetForm(string id)
          Reset the FORM identified by the given id
 void fwkSetChecked(object obj, boolean bool)
          Checks (true) or unchecks (false) the field associated with the given reference
 void fwkSetChecked(string id, boolean bool)
          Checks (true) or unchecks (false) the field associated with the given id
 void fwkSetFieldButtonDisabled(object oField, boolean bDisabled)
          Disables or enables the button or picto associated with a field widget
 void fwkSetFieldButtonVisibility(object oField, string sVisibility)
          Sets the visibility of the button or picto associated with a field widget
 void fwkSetFocus(object obj)
          Set the focus on the given object
 void fwkSetFocus(string id)
          Set the focus on the object identified by the given id
 void fwkSetHidden(object obj)
          Sets the "style.visible" attribute of the field associated with the given reference as "visible"
 void fwkSetHidden(string id)
          Sets the "style.visible" attribute of the field associated with the given id as "hidden"
 void fwkSetInnerHTML(object obj, string HTMLString)
          Sets the "innerHTML" attribute of the field associated with the given reference
 void fwkSetInnerHTML(string id, string HTMLString)
          Sets the "innerHTML" attribute of the field associated with the given id
 void fwkSetReadonly(object obj, boolean bool)
          Sets the "readOnly" attribute of the field associated with the given reference as "read only"
 void fwkSetReadonly(string id, boolean bool)
          Sets the "readOnly" attribute of the field associated with the given id as "read only"
 void fwkSetValue(object obj, object value)
          Sets the value (standard "value" attribute) of the field associated with the given reference
 void fwkSetValue(string id, object value)
          Sets the value (standard "value" attribute) of the field associated with the given id
 void fwkSetVisible(object obj)
          Sets the "style.visible" attribute of the field associated with the given reference as "visible"
 void fwkSetVisible(string id)
          Sets the "style.visible" attribute of the field associated with the given id as "visible"
 void fwkShowActionView(object obj, object response, string viewName)
          Gets the given view from the action response object and puts it in the given container
 void fwkShowActionView(string id, object response, string viewName)
          Gets the given view from the action response object and puts it in the given container
 void fwkShowServiceView(object obj, object response)
          Gets the result view from the service response object and puts it in the given container
 void fwkShowServiceView(string id, object response)
          Gets the result view from the service response object and puts it in the given container
 void fwkShowViewContent(object obj, object viewContent)
          Show a view content in a given container ( by setting the content in the 'innerHTML' attribute of the container ) If there are 'script' tags in the content they are executed
 void fwkShowViewContent(string containerId, object viewContent)
          Show a view content in a given container ( by setting the content in the 'innerHTML' attribute of the container ) If there are 'script' tags in the content they are executed
 void fwkShowXY(object obj, int x, int y)
          Shows an object ( set visible ) at the given X/Y coordinates
 void fwkShowXY(string id, int x, int y)
          Shows an object ( set visible ) at the given X/Y coordinates
 void fwkSubmitForm(object obj)
          Submit the given FORM
 void fwkSubmitForm(string id)
          Submit the FORM identified by the given id
 

Method Detail

$

public object $(string id)
Returns a reference on the object associated with the given id
An error alert is fired if there is no object for the given id

Parameters:
id - the widget id
Returns:
the browser object

fwkGetField

public object fwkGetField(string id)
Deprecated.  

Same as '$' function

Parameters:
id - the widget id
Returns:
the browser object

fwkGetName

public string fwkGetName(string id)
Returns the name (standard "name" attribute) of the field associated with the given id

Parameters:
id - the widget id
Returns:
the field name

fwkGetName

public string fwkGetName(object obj)
Returns the name (standard "name" attribute) of the field associated with the given reference

Parameters:
obj - the widget reference
Returns:
the field name

fwkGetType

public string fwkGetType(string id)
Returns the type (standard "type" attribute) of the field associated with the given id

Parameters:
id - the widget id
Returns:
the field type

fwkGetType

public string fwkGetType(object obj)
Returns the type (standard "type" attribute) of the field associated with the given reference

Parameters:
obj - the widget reference
Returns:
the field type

fwkGetValue

public string fwkGetValue(string id)
Returns the value (standard "value" attribute) of the field associated with the given id

Parameters:
id - the widget id
Returns:
the field value

fwkGetValue

public string fwkGetValue(object obj)
Returns the value (standard "value" attribute) of the field associated with the given reference

Parameters:
obj - the field reference
Returns:
the field value

fwkSetValue

public void fwkSetValue(string id,
                        object value)
Sets the value (standard "value" attribute) of the field associated with the given id

Parameters:
id - the widget id
value - the new value

fwkSetValue

public void fwkSetValue(object obj,
                        object value)
Sets the value (standard "value" attribute) of the field associated with the given reference

Parameters:
obj - the field reference
value - the new value

fwkEnable

public void fwkEnable(string id)
Enables the field associated with the given id

Parameters:
id - the widget id

fwkEnable

public void fwkEnable(object obj)
Enables the field associated with the given reference

Parameters:
obj - the field reference

fwkDisable

public void fwkDisable(string id)
Disables the field associated with the given id

Parameters:
id - the widget id

fwkDisable

public void fwkDisable(object obj)
Disables the field associated with the given reference

Parameters:
obj - the field reference

fwkIsEnabled

public boolean fwkIsEnabled(string id)
Returns true if the field associated with the given id is enabled

Parameters:
id - the widget id
Returns:
true if enabled, else false

fwkIsEnabled

public boolean fwkIsEnabled(object obj)
Returns true if the field associated with the given reference is enabled

Parameters:
obj - the field reference
Returns:
true if enabled, else false

fwkSetVisible

public void fwkSetVisible(string id)
Sets the "style.visible" attribute of the field associated with the given id as "visible"

Parameters:
id - the widget id

fwkSetVisible

public void fwkSetVisible(object obj)
Sets the "style.visible" attribute of the field associated with the given reference as "visible"

Parameters:
obj - the widget reference

fwkSetHidden

public void fwkSetHidden(string id)
Sets the "style.visible" attribute of the field associated with the given id as "hidden"

Parameters:
id - the widget id

fwkSetHidden

public void fwkSetHidden(object obj)
Sets the "style.visible" attribute of the field associated with the given reference as "visible"

Parameters:
obj - the widget reference

fwkIsVisible

public boolean fwkIsVisible(string id)
Returns true if the field associated with the given id is visible

Parameters:
id - the widget id
Returns:
true if visible, else false

fwkIsVisible

public boolean fwkIsVisible(object obj)
Returns true if the field associated with the given reference is visible

Parameters:
obj - the widget reference
Returns:
true if visible, else false

fwkSetChecked

public void fwkSetChecked(string id,
                          boolean bool)
Checks (true) or unchecks (false) the field associated with the given id

Parameters:
id - the widget id
bool - true(check) or false(uncheck)

fwkSetChecked

public void fwkSetChecked(object obj,
                          boolean bool)
Checks (true) or unchecks (false) the field associated with the given reference

Parameters:
obj - the widget's reference
bool - true(check) | false(uncheck)

fwkIsChecked

public boolean fwkIsChecked(string id)
Returns true if the field associated with the given id is checked

Parameters:
id - the widget id
Returns:
true(checked) | false(unchecked)

fwkIsChecked

public boolean fwkIsChecked(object obj)
Returns true if the field associated with the given reference is checked

Parameters:
obj - the widget reference
Returns:
true(checked) | false(unchecked)

fwkSetReadonly

public void fwkSetReadonly(string id,
                           boolean bool)
Sets the "readOnly" attribute of the field associated with the given id as "read only"

Parameters:
id - the widget id
bool - true(read only) | false(read write)

fwkSetReadonly

public void fwkSetReadonly(object obj,
                           boolean bool)
Sets the "readOnly" attribute of the field associated with the given reference as "read only"

Parameters:
obj - the widget reference
bool - true(read only) | false(read write)

fwkIsReadonly

public void fwkIsReadonly(string id)
Returns true if the field associated with the given id is "read only"

Parameters:
id - the widget id

fwkIsReadonly

public void fwkIsReadonly(object obj)
Returns true if the field associated with the given reference is "read only"

Parameters:
obj - the widget reference

fwkSetInnerHTML

public void fwkSetInnerHTML(string id,
                            string HTMLString)
Sets the "innerHTML" attribute of the field associated with the given id

Parameters:
id - the widget id
HTMLString - the "inner HTML" string

fwkSetInnerHTML

public void fwkSetInnerHTML(object obj,
                            string HTMLString)
Sets the "innerHTML" attribute of the field associated with the given reference

Parameters:
obj - the widget reference
HTMLString - the "inner HTML" string

fwkGetInnerHTML

public string fwkGetInnerHTML(string id)
Returns the "innerHTML" attribute value of the field associated with the given id

Parameters:
id - the widget id
Returns:
the "innerHTML" attribute value

fwkGetInnerHTML

public string fwkGetInnerHTML(object obj)
Returns the "innerHTML" attribute value of the field associated with the given reference

Parameters:
obj - the widget reference
Returns:
the "innerHTML" attribute value

fwkShowActionView

public void fwkShowActionView(string id,
                              object response,
                              string viewName)
Gets the given view from the action response object and puts it in the given container

Parameters:
id - the container id
response - the response object
viewName - the view name

fwkShowActionView

public void fwkShowActionView(object obj,
                              object response,
                              string viewName)
Gets the given view from the action response object and puts it in the given container

Parameters:
obj - the container's object reference
response - the response object
viewName - the view name
Since:
v 1.1.0

fwkShowServiceView

public void fwkShowServiceView(string id,
                               object response)
Gets the result view from the service response object and puts it in the given container

Parameters:
id - the container id
response - the response object

fwkShowServiceView

public void fwkShowServiceView(object obj,
                               object response)
Gets the result view from the service response object and puts it in the given container

Parameters:
obj - the container's object reference
response - the response object
Since:
v 1.1.0

fwkGetXY

public void fwkGetXY(object obj)
Returns the position of the given object in the screen The position is returned as an array ([x,y])

Parameters:
obj - : the field reference

fwkGetXY

public void fwkGetXY(string id)
Returns the position of the given object in the screen The position is returned as an array ([x,y])

Parameters:
id - : html id of the object

fwkGetRelativeXY

public void fwkGetRelativeXY(object obj)
Returns the position of the given object The position is returned as an array ([x,y]) The origin (0,0) is the first parent element with position="relative"

Parameters:
obj - : the field reference

fwkGetRelativeXY

public void fwkGetRelativeXY(string id)
Returns the position of the given object The position is returned as an array ([x,y]) The origin (0,0) is the first parent element with position="relative"

Parameters:
id - : html id of the object

fwkShowXY

public void fwkShowXY(object obj,
                      int x,
                      int y)
Shows an object ( set visible ) at the given X/Y coordinates

Parameters:
obj - the object reference
x - the X coordinate
y - the Y coordinate

fwkShowXY

public void fwkShowXY(string id,
                      int x,
                      int y)
Shows an object ( set visible ) at the given X/Y coordinates

Parameters:
id - the object id
x - the X coordinate
y - the Y coordinate

fwkSetFieldButtonDisabled

public void fwkSetFieldButtonDisabled(object oField,
                                      boolean bDisabled)
Disables or enables the button or picto associated with a field widget

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

fwkSetFieldButtonVisibility

public void fwkSetFieldButtonVisibility(object oField,
                                        string sVisibility)
Sets the visibility of the button or picto associated with a field widget

Parameters:
oField - the field reference
sVisibility - the visibility ( "visible" or "hidden" )

fwkGetIFrameDocument

public object fwkGetIFrameDocument(object obj)
Returns the 'document object' of the given iframe

Parameters:
obj - the IFRAME object reference
Returns:
the 'document' object

fwkGetIFrameDocument

public object fwkGetIFrameDocument(string id)
Returns the 'document object' of the given iframe

Parameters:
id - the IFRAME id
Returns:
the 'document' object

fwkExecuteInnerScript

public void fwkExecuteInnerScript(object obj)
Execute all the JavaScript code embedded in the given object Search all the 'script' tags and execute the code

Parameters:
obj - : the object reference ( object containing the JS code )

fwkExecuteInnerScript

public void fwkExecuteInnerScript(string id)
Execute all the JavaScript code embedded in the given object Search all the 'script' tags and execute the code

Parameters:
id - : the id of the object ( object containing the JS code )

fwkExecInnerScript

public void fwkExecInnerScript(object obj)
Deprecated. use fwkExecuteInnerScript instead

Internal framework function ( do not use )

Parameters:
obj -

fwkShowViewContent

public void fwkShowViewContent(string containerId,
                               object viewContent)
Show a view content in a given container ( by setting the content in the 'innerHTML' attribute of the container ) If there are 'script' tags in the content they are executed

Parameters:
containerId - : the id of the container where to set the content
viewContent - : the content to set in the container

fwkShowViewContent

public void fwkShowViewContent(object obj,
                               object viewContent)
Show a view content in a given container ( by setting the content in the 'innerHTML' attribute of the container ) If there are 'script' tags in the content they are executed

Parameters:
obj - : the container's object reference where to set the content
viewContent - : the content to set in the container
Since:
v 1.1.0

fwkGetParentDIV

public object fwkGetParentDIV(object obj)
Returns the DIV parent of the given object

Parameters:
obj -
Returns:
the DIV object or null if there's no DIV parent

fwkCancelEvent

public void fwkCancelEvent(object evt)
Cancel the given event ( stop the event propagation )

Parameters:
evt -

fwkLoadPage

public void fwkLoadPage(string url)
Loads the given page URL ( shortcut for 'window.location = URL' )
and add a new entry in the history

Parameters:
url - e.g. 'http://myhost:8080/', 'page', '../page', '..', '../..', '/', etc...

fwkReplacePage

public void fwkReplacePage(string url)
Replaces the current page by the content of the given URL ( shortcut for 'window.location.replace(URL)' )
This function avoids creating a new entry in the history (the current entry is reused)

Parameters:
url - e.g. 'http://myhost:8080/', 'page', '../page', '..', '../..', '/', etc...

fwkReloadPage

public void fwkReloadPage()
Reloads the current page ( shortcut for 'window.location.reload()' )
Reuse the same entry in the history


fwkGetLocation

public string fwkGetLocation()
Returns the current page URL ( shortcut for 'window.location.href' )

Returns:

fwkSetFocus

public void fwkSetFocus(object obj)
Set the focus on the given object

Parameters:
obj -

fwkSetFocus

public void fwkSetFocus(string id)
Set the focus on the object identified by the given id

Parameters:
id -

fwkSubmitForm

public void fwkSubmitForm(object obj)
Submit the given FORM

Parameters:
obj -

fwkSubmitForm

public void fwkSubmitForm(string id)
Submit the FORM identified by the given id

Parameters:
id -

fwkResetForm

public void fwkResetForm(object obj)
Reset the given FORM

Parameters:
obj -

fwkResetForm

public void fwkResetForm(string id)
Reset the FORM identified by the given id

Parameters:
id -

fwkCreateLogger

public void fwkCreateLogger(string loggerName)
Creates a new logger (with its console)

Parameters:
loggerName - : the name of the logger (kept as global window variable)