corelib.services.web.components
Class DataGrid

java.lang.Object
  extended by corelib.services.web.components.WebComponent
      extended by corelib.services.web.components.VisualComponent
          extended by corelib.services.web.components.DataGrid
All Implemented Interfaces:
DataRepeater

public class DataGrid
extends VisualComponent
implements DataRepeater

TODO

Since:
0.4.1
Author:
Alexia Ramaļoli

Field Summary
 
Fields inherited from class corelib.services.web.components.VisualComponent
cssClass, cssStyle, toolTipText, visible
 
Fields inherited from class corelib.services.web.components.WebComponent
dataBindings, webPage, xmlNode
 
Fields inherited from interface corelib.services.web.webapplications.DataRepeater
REPEATER_ID_SEPARATOR
 
Constructor Summary
DataGrid()
           
 
Method Summary
 void addDataGridListener(DataGridListener listener)
          Add a listener to this component.
 void component_load(WebPageEvent event)
          Fired when the web page is fully initialized.
 void component_preRepeaterDuplications(WebPageEvent event)
           
 void component_renderBegin(WebPageEvent webPageEvent)
           
 void fireDeleteDataGridEvent()
          Invoked by the web page event dispatcher, when it's necessary to fire delete line data grid event.
 void fireDisplayDataGridEvent()
          Invoked by the web page event dispatcher, when it's necessary to fire display line data grid event.
 void fireEditDataGridEvent()
          Invoked by the web page event dispatcher, when it's necessary to fire edit line data grid event.
 void fireInsertDataGridEvent()
          Invoked by the web page event dispatcher, when it's necessary to fire insert line data grid event.
 int getBeanPerPage()
          Returns the bean per page value.
 int getDefaultPage()
          Returns the default page value.
 java.lang.String getDeleteButtonLabel()
          Returns Delete button label.
 java.lang.String getDisplayButtonLabel()
          Returns Display button label.
 java.lang.String getEditButtonLabel()
          Returns Edit button label.
 java.lang.String getElementAlias()
          Returns the used alias for each data value during the components duplication.
 java.lang.String getInsertButtonLabel()
          Returns Insert button label.
 java.lang.String getJsDeletingMessage()
          Returns the displayed message when user try to delete one entry.
 java.lang.String getNextLabel()
          Returns the next page button label.
 java.lang.String getPreviousLabel()
          Returns the previous page button label.
 java.lang.String getRowCountLabel()
          Returns the label for display row count.
 java.lang.Object getValues()
          Returns the element collection to display in the DataGrid.
 boolean isAllowDeleteEvent()
          Returns if the DataGrid display and fire delete button.
 boolean isAllowDisplayEvent()
          Returns if the DataGrid display and fire display button.
 boolean isAllowEditEvent()
          Returns if the DataGrid display and fire edit button.
 boolean isAllowInsertEvent()
          Returns if the DataGrid display and fire insert button.
 void removeDataGridListener(DataGridListener listener)
          Remove the specifier listener to this component.
 void repeateChildren(org.w3c.dom.Document xmlDocument)
          Duplicates, in the DOM document, the DataRepeater web component (and it's sub nodes) for all items stored in the values set.
 void setAllowDeleteEvent(boolean allowDeleteEvent)
          Change if the DataGrid display and fire delete button event.
 void setAllowDisplayEvent(boolean allowDisplayEvent)
          Change if the DataGrid display and fire display button event.
 void setAllowEditEvent(boolean allowEditEvent)
          Change if the DataGrid display and fire edit button event.
 void setAllowInsertEvent(boolean allowInsertEvent)
          Change if the DataGrid display and fire insert button event.
 void setBeanPerPage(int beanPerPage)
          Change the bean per page value.
 void setDefaultPage(int defaultPage)
          Change the default page value.
 void setDeleteButtonLabel(java.lang.String deleteButtonLabel)
          Change the Delete button label value.
 void setDisplayButtonLabel(java.lang.String displayButtonLabel)
          Change the Display button label value.
 void setEditButtonLabel(java.lang.String editButtonLabel)
          Change the Edit button label value.
 void setElementAlias(java.lang.String elementAlias)
          Changes the used alias for each data value during the components duplication.
 void setInsertButtonLabel(java.lang.String insertButtonLabel)
          Change the Insert button label value.
 void setJsDeletingMessage(java.lang.String jsDeletingMessage)
          Change the displayed message when user try to delete one entry.
 void setNextLabel(java.lang.String nextLabel)
          Change the next page button label.
 void setPreviousLabel(java.lang.String previousLabel)
          Change the previous page button label.
 void setRowCountLabel(java.lang.String rowCountLabel)
          Change the label for display row count.
 void setValues(java.lang.Object values)
          Changes the element collection to repeat.
 
Methods inherited from class corelib.services.web.components.VisualComponent
component_postRender, component_preRender, component_renderChildren, component_renderEnd, component_renderJavascriptLocalisation, encodeAttributeValue, getCssClass, getCssStyle, getOnClickListener, getSharedAttributesHtmlEncoding, getToolTipText, isVisible, renderElement, setCssClass, setCssStyle, setOnClickListener, setToolTipText, setVisible
 
Methods inherited from class corelib.services.web.components.WebComponent
addBindingExpression, addChildComponent, component_init, getChildComponents, getDataBinding, getElementsByTagName, getId, getWebPage, getXmlNode, setId, setWebPage, setXmlNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataGrid

public DataGrid()
Method Detail

getElementAlias

public java.lang.String getElementAlias()
Returns the used alias for each data value during the components duplication.

Returns:
The used alias for each data value.

setElementAlias

public void setElementAlias(java.lang.String elementAlias)
Changes the used alias for each data value during the components duplication.

Parameters:
elementAlias - The new alias for each data value.

addDataGridListener

public void addDataGridListener(DataGridListener listener)
Add a listener to this component.

Parameters:
listener - The listener to add.

removeDataGridListener

public void removeDataGridListener(DataGridListener listener)
Remove the specifier listener to this component.

Parameters:
listener - The listener to remove.

fireInsertDataGridEvent

public void fireInsertDataGridEvent()
Invoked by the web page event dispatcher, when it's necessary to fire insert line data grid event.


fireDisplayDataGridEvent

public void fireDisplayDataGridEvent()
Invoked by the web page event dispatcher, when it's necessary to fire display line data grid event.


fireEditDataGridEvent

public void fireEditDataGridEvent()
Invoked by the web page event dispatcher, when it's necessary to fire edit line data grid event.


fireDeleteDataGridEvent

public void fireDeleteDataGridEvent()
Invoked by the web page event dispatcher, when it's necessary to fire delete line data grid event.


component_preRepeaterDuplications

public void component_preRepeaterDuplications(WebPageEvent event)
Overrides:
component_preRepeaterDuplications in class WebComponent

repeateChildren

public void repeateChildren(org.w3c.dom.Document xmlDocument)
Duplicates, in the DOM document, the DataRepeater web component (and it's sub nodes) for all items stored in the values set.

Specified by:
repeateChildren in interface DataRepeater
Parameters:
xmlDocument - The DOM instance used during the duplication.

component_load

public void component_load(WebPageEvent event)
Description copied from class: WebComponent
Fired when the web page is fully initialized.

Overrides:
component_load in class WebComponent
Parameters:
event - Qualify the current web page event.

component_renderBegin

public void component_renderBegin(WebPageEvent webPageEvent)
Overrides:
component_renderBegin in class VisualComponent

getValues

public java.lang.Object getValues()
Returns the element collection to display in the DataGrid.

Returns:
The element collection.

setValues

public void setValues(java.lang.Object values)
Changes the element collection to repeat.

Parameters:
values - The new element collection.

getBeanPerPage

public int getBeanPerPage()
Returns the bean per page value. By default the value is 10.

Returns:
The integer value.

setBeanPerPage

public void setBeanPerPage(int beanPerPage)
Change the bean per page value. By default the value is 10.

Parameters:
beanPerPage - The integer bean per page value.

getDefaultPage

public int getDefaultPage()
Returns the default page value. The DataGrid uses this index of page when the request method is GET.

Returns:
The label value.

setDefaultPage

public void setDefaultPage(int defaultPage)
Change the default page value. The DataGrid uses this index of page when the request method is GET.

Parameters:
defaultPage - The integer page value.

getPreviousLabel

public java.lang.String getPreviousLabel()
Returns the previous page button label. By Default the value is "<".

Returns:
The label value.

setPreviousLabel

public void setPreviousLabel(java.lang.String previousLabel)
Change the previous page button label. By Default the value is "<".

Parameters:
previousLabel - The label value.

getNextLabel

public java.lang.String getNextLabel()
Returns the next page button label. By Default the value is ">".

Returns:
The label value.

setNextLabel

public void setNextLabel(java.lang.String nextLabel)
Change the next page button label. By Default the value is ">".

Parameters:
nextLabel - The label value.

getRowCountLabel

public java.lang.String getRowCountLabel()
Returns the label for display row count. By Default the value is "Total :".

Returns:
The label value.

setRowCountLabel

public void setRowCountLabel(java.lang.String rowCountLabel)
Change the label for display row count. By Default the value is "Total :".

Parameters:
rowCountLabel - The label value.

isAllowDeleteEvent

public boolean isAllowDeleteEvent()
Returns if the DataGrid display and fire delete button.

Returns:
The boolean value.

setAllowDeleteEvent

public void setAllowDeleteEvent(boolean allowDeleteEvent)
Change if the DataGrid display and fire delete button event.

Parameters:
allowDeleteEvent - The boolean value.

isAllowEditEvent

public boolean isAllowEditEvent()
Returns if the DataGrid display and fire edit button.

Returns:
The boolean value.

setAllowEditEvent

public void setAllowEditEvent(boolean allowEditEvent)
Change if the DataGrid display and fire edit button event.

Parameters:
allowEditEvent - The boolean value.

isAllowDisplayEvent

public boolean isAllowDisplayEvent()
Returns if the DataGrid display and fire display button.

Returns:
The boolean value.

setAllowDisplayEvent

public void setAllowDisplayEvent(boolean allowDisplayEvent)
Change if the DataGrid display and fire display button event.

Parameters:
allowDisplayEvent - The boolean value.

isAllowInsertEvent

public boolean isAllowInsertEvent()
Returns if the DataGrid display and fire insert button.

Returns:
The boolean value.

setAllowInsertEvent

public void setAllowInsertEvent(boolean allowInsertEvent)
Change if the DataGrid display and fire insert button event.

Parameters:
allowInsertEvent - The boolean value.

getDeleteButtonLabel

public java.lang.String getDeleteButtonLabel()
Returns Delete button label. By Default the value is "Delete".

Returns:
The boolean value.

setDeleteButtonLabel

public void setDeleteButtonLabel(java.lang.String deleteButtonLabel)
Change the Delete button label value. By Default the value is "Delete".

Parameters:
deleteButtonLabel - The label value.

getEditButtonLabel

public java.lang.String getEditButtonLabel()
Returns Edit button label. By Default the value is "Edit".

Returns:
The boolean value.

setEditButtonLabel

public void setEditButtonLabel(java.lang.String editButtonLabel)
Change the Edit button label value. By Default the value is "Edit".

Parameters:
editButtonLabel - The label value.

getDisplayButtonLabel

public java.lang.String getDisplayButtonLabel()
Returns Display button label. By Default the value is "Display".

Returns:
The boolean value.

setDisplayButtonLabel

public void setDisplayButtonLabel(java.lang.String displayButtonLabel)
Change the Display button label value. By Default the value is "Display".

Parameters:
displayButtonLabel - The label value.

getInsertButtonLabel

public java.lang.String getInsertButtonLabel()
Returns Insert button label. By Default the value is "Insert".

Returns:
The boolean value.

setInsertButtonLabel

public void setInsertButtonLabel(java.lang.String insertButtonLabel)
Change the Insert button label value. By Default the value is "Insert".

Parameters:
insertButtonLabel - The label value.

getJsDeletingMessage

public java.lang.String getJsDeletingMessage()
Returns the displayed message when user try to delete one entry. By Default the value is "Are you sure you want to delete this entry?".

Returns:
The message value.

setJsDeletingMessage

public void setJsDeletingMessage(java.lang.String jsDeletingMessage)
Change the displayed message when user try to delete one entry. By Default the value is "Are you sure you want to delete this entry?".

Parameters:
jsDeletingMessage - The message value.


CAUTION: Ellipse is proposed to you in BETA version to allow evaluation of this framework. Infini Software is released from any responsibility for the use of Ellipse Framework.

Copyright 2012 Infini Software - All Rights Reserved.