|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echo2.app.Component nextapp.echo2.app.Column net.sf.echobinding.datacontrol.FormColumnTable<T>
public abstract class FormColumnTable<T>
A editable table that allows inline editing. A FormColumnTable
organizes the table data within one Column
component. Each
item in the list will be added to the column as a Row
. This
row has to be defined by overwriting the abstract method
ceateRow(BindingContext ctx, int rowNummer)
.
If you supply a PersistenceMangager, you can add new rows to the table by
calling the addRow()
method. Again, new rows will be added
to the table by the ceateRow(BindingContext ctx, int rowNummer)
method.
Field Summary | |
---|---|
protected nextapp.echo2.app.event.ActionListener |
_actionListener
|
protected BindingContext |
_ctx
|
protected java.util.List<T> |
_list
|
Fields inherited from class nextapp.echo2.app.Column |
---|
PROPERTY_BORDER, PROPERTY_CELL_SPACING, PROPERTY_INSETS |
Fields inherited from class nextapp.echo2.app.Component |
---|
CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY |
Constructor Summary | |
---|---|
FormColumnTable(java.util.List<T> list,
BindingContext ctx)
|
Method Summary | |
---|---|
void |
addRow()
Adds a new row to the table. |
void |
copyRow(BindingContext context)
Creates a copy of the selected row and adds it to the table. |
abstract nextapp.echo2.app.Component |
createRow(BindingContext ctx,
int rowNumber)
Defines how a table row should look like. |
void |
deleteRow(BindingContext context)
Removes the selected row from the table. |
void |
editRow(BindingContext context)
Shows the selected row in the edit form for editing. |
protected nextapp.echo2.app.event.ActionListener |
getActionListener()
|
BindingContext |
getContext()
Returns the binding context. |
java.util.List<T> |
getList()
Returns the list. |
PersistenceManager<T> |
getPersistenceManager()
Returns the persistence manager. |
void |
init()
|
protected void |
initialize()
|
boolean |
isPersistent(int row)
Decides wether a row is persistent or not. |
void |
save()
Saves each row object. |
void |
saveRow(BindingContext context)
Synchronizes the widgets in the form with the underlying bean. |
protected void |
setActionListener(nextapp.echo2.app.event.ActionListener actionListener)
|
void |
setContext(BindingContext ctx)
Sets the binding context. |
void |
setList(java.util.List<T> list)
Sets the list. |
void |
setPersistenceManager(PersistenceManager<T> persistenceManager)
Sets the persistence manager. |
Methods inherited from class nextapp.echo2.app.Column |
---|
getBorder, getCellSpacing, getInsets, setBorder, setCellSpacing, setInsets |
Methods inherited from class nextapp.echo2.app.Component |
---|
add, add, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, processInput, remove, remove, removeAll, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List<T> _list
protected BindingContext _ctx
protected nextapp.echo2.app.event.ActionListener _actionListener
Constructor Detail |
---|
public FormColumnTable(java.util.List<T> list, BindingContext ctx)
list
- ctx
- Method Detail |
---|
public void init()
init
in class nextapp.echo2.app.Component
protected void initialize()
public abstract nextapp.echo2.app.Component createRow(BindingContext ctx, int rowNumber)
ctx
- rowNumber
-
public void addRow()
EditableTable
addRow
in interface EditableTable<T>
public void deleteRow(BindingContext context)
EditableTable
deleteRow
in interface EditableTable<T>
public void copyRow(BindingContext context)
EditableTable
copyRow
in interface EditableTable<T>
public void saveRow(BindingContext context)
EditableTable
saveRow
in interface EditableTable<T>
public void editRow(BindingContext context)
EditableTable
editRow
in interface EditableTable<T>
protected nextapp.echo2.app.event.ActionListener getActionListener()
protected void setActionListener(nextapp.echo2.app.event.ActionListener actionListener)
public boolean isPersistent(int row)
EditableTable
isPersistent
in interface EditableTable<T>
public void save()
PersistenceManager
public PersistenceManager<T> getPersistenceManager()
public void setPersistenceManager(PersistenceManager<T> persistenceManager)
persistenceManager
- The persistence manager to set.public BindingContext getContext()
public void setContext(BindingContext ctx)
ctx
- The context to set.public java.util.List<T> getList()
public void setList(java.util.List<T> list)
list
- the list to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |