Class Index | File Index

Classes


Class SweetDevRia.EditableText


Extends RiaComponent, RiaComponent.
allowing edition of a text on double click
Defined in: EditableText.js.

Class Summary
Constructor Attributes Constructor Name and Description
<private>  
Field Summary
Field Attributes Field Name and Description
<private> <static>  
SweetDevRia.EditableText._instance
Unique instance of the EditableText component.
<static>  
SweetDevRia.EditableText.EDIT_ZONE
Default edit zone suffix, if none are declared.
<static>  
SweetDevRia.EditableText.EMPTY_VALUE
Default value if the content is empty.
<static>  
SweetDevRia.EditableText.ID
Unique EditableText JavaScript instance id.
Method Summary
Method Attributes Method Name and Description
<private> <static>  
SweetDevRia.EditableText.active(elem)
Activate an editable text element
<static>  
SweetDevRia.EditableText.add(id, editComp, value, srcId, listenersId, init)
Adds an editable text component to the manager.
<private> <static>  
SweetDevRia.EditableText.addEditCompEvent(elem)
Adds the event on the editable component
<static>  
SweetDevRia.EditableText.afterActive(elem)
This method is called after activing a editable text element.
<static>  
SweetDevRia.EditableText.afterClose()
This method is called after closing the current editable text.
<static>  
SweetDevRia.EditableText.afterValid()
This method is called after validating the current editable text.
<static>  
SweetDevRia.EditableText.beforeActive(elem)
This method is called before activing a editable text element.
<static>  
SweetDevRia.EditableText.beforeClose()
This method is called before closing the current editable text.
<static>  
SweetDevRia.EditableText.beforeValid()
This method is called before validating the current editable text.
<private> <static>  
SweetDevRia.EditableText.blurHandler(evt)
Blur handler for editable components
<static>  
SweetDevRia.EditableText.close()
Closes the current tooltip opened
<private> <static>  
SweetDevRia.EditableText.dblClickHandler(evt)
Double click handler for text components
<private> <static>  
SweetDevRia.EditableText.findEditComp(parent)
Find a element editable into a parent one
<private> <static>  
SweetDevRia.EditableText.getEditComp(elem)
Get an editable component from an editable element.
<static>  
SweetDevRia.EditableText.getEditCompValue(elem)
Gets a value of an editable component.
<static>  
SweetDevRia.EditableText.getInstance()
Get the unique instance of the EditableText component.
<static>  
SweetDevRia.EditableText.getTextValue(elem)
Gets a value of the static text component.
<private>  
Element keyboard event handler
<private>  
initElement(elem, listenersId)
Initializes an EditableText at page load
<private>  
Method called on page load.
<static>  
SweetDevRia.EditableText.setEditCompValue(elem, value)
Sets a value into an editable component, and set it the focus.
<static>  
SweetDevRia.EditableText.setTextValue(elem, value)
Sets a value to the static text component.
<static>  
SweetDevRia.EditableText.switchElement(toEdition, elem)
Switches an element's state
<private> <static>  
SweetDevRia.EditableText.valid()
Validates the value of the current active element, and notify the server.
Class Detail
<private> SweetDevRia.EditableText(id)
Parameters:
id
Field Detail
<private> <static> {EditableText} SweetDevRia.EditableText._instance
Unique instance of the EditableText component. Singleton.

<static> {String} SweetDevRia.EditableText.EDIT_ZONE
Default edit zone suffix, if none are declared. Used for tooltip.

<static> {String} SweetDevRia.EditableText.EMPTY_VALUE
Default value if the content is empty. This enable the click into the editable text.

<static> {String} SweetDevRia.EditableText.ID
Unique EditableText JavaScript instance id.
Method Detail
<private> <static> SweetDevRia.EditableText.active(elem)
Activate an editable text element
Parameters:
{EditableElement} elem
the element to activate

<static> SweetDevRia.EditableText.add(id, editComp, value, srcId, listenersId, init)
Adds an editable text component to the manager.
Parameters:
{String} id
the id of the component to add
{String} editComp
the component's id to edit
{String} value
the initial value of the component
{String} srcId
Optional, an id source creating this editableText.
{Array} listenersId
Optional, a list of id to listen to this component
{boolean} init
Optional, A boolean indicating if the component should be initialized right away.

<private> <static> SweetDevRia.EditableText.addEditCompEvent(elem)
Adds the event on the editable component
Parameters:
{EditableElement} elem
the elem to add the events on

<static> SweetDevRia.EditableText.afterActive(elem)
This method is called after activing a editable text element. To be overridden !!
Parameters:
{EditableElement} elem
the element to activate

<static> SweetDevRia.EditableText.afterClose()
This method is called after closing the current editable text. To be overridden !!

<static> SweetDevRia.EditableText.afterValid()
This method is called after validating the current editable text. To be overridden !!

<static> {boolean} SweetDevRia.EditableText.beforeActive(elem)
This method is called before activing a editable text element. To be overridden !!
Parameters:
{EditableElement} elem
the element to activate
Returns:
True if this method can be called, else false.

<static> {boolean} SweetDevRia.EditableText.beforeClose()
This method is called before closing the current editable text. To be overridden !!
Returns:
True if this method can be called, else false.

<static> {boolean} SweetDevRia.EditableText.beforeValid()
This method is called before validating the current editable text. To be overridden !!
Returns:
True if this method can be called, else false.

<private> <static> SweetDevRia.EditableText.blurHandler(evt)
Blur handler for editable components
Parameters:
evt

<static> SweetDevRia.EditableText.close()
Closes the current tooltip opened

<private> <static> SweetDevRia.EditableText.dblClickHandler(evt)
Double click handler for text components
Parameters:
evt

<private> <static> {HTMLElement} SweetDevRia.EditableText.findEditComp(parent)
Find a element editable into a parent one
Parameters:
{HTMLElement} parent
the HTMLElement to seek into
Returns:
the parent node of the editable component found

<private> <static> {HTMLElement} SweetDevRia.EditableText.getEditComp(elem)
Get an editable component from an editable element.
Parameters:
{EditableElement} elem
the element where the component must be extracted
Returns:
the editable component for an editabletext element

<static> {String} SweetDevRia.EditableText.getEditCompValue(elem)
Gets a value of an editable component.
Parameters:
{EditableElement} elem
the elem to get the value
Returns:
the component value from the editable component

<static> {EditableText} SweetDevRia.EditableText.getInstance()
Get the unique instance of the EditableText component. Singleton.
Returns:
the singleton instance of this editable text.

<static> {String} SweetDevRia.EditableText.getTextValue(elem)
Gets a value of the static text component.
Parameters:
{EditableElement} elem
the elem to get the value
Returns:
the component value from the text component

<private> handleEvent(evt)
Element keyboard event handler
Parameters:
{Event} evt
a well formed event

<private> initElement(elem, listenersId)
Initializes an EditableText at page load
Parameters:
{HTMLElement} elem
the element in the dom
{Array} listenersId
a list of listeners id

<private> initialize()
Method called on page load. Initializes the EditableText components in the page.

<static> SweetDevRia.EditableText.setEditCompValue(elem, value)
Sets a value into an editable component, and set it the focus.
Parameters:
{EditableElement} elem
the elem to fill in
{String} value
the value to set

<static> SweetDevRia.EditableText.setTextValue(elem, value)
Sets a value to the static text component.
Parameters:
{HTMLElement} elem
the elem to set the value inside
{String} value
the value to sets

<static> SweetDevRia.EditableText.switchElement(toEdition, elem)
Switches an element's state
Parameters:
{boolean} toEdition
the state to switch to
{EditableElement} elem
the element to switch

<private> <static> SweetDevRia.EditableText.valid()
Validates the value of the current active element, and notify the server.

Documentation generated by JsDoc Toolkit 2.0.0 on Thu Dec 02 2010 15:18:54 GMT+0100 (CET)