|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.data.pojo.PersistentListHelper
public class PersistentListHelper
Helps to handle a List selection while working with POJO model.
Copyright (c) Formaria Ltd., 2008
License: see license.txt
| Constructor Summary | |
|---|---|
PersistentListHelper(ListHolder lh,
PageSupport ps)
Creates a new instance of PersistentListHelper |
|
PersistentListHelper(ListHolder lh,
PageSupport ps,
PersistentPojoModel sm)
Creates a new instance of PersistentListHelper |
|
PersistentListHelper(ListHolder lh,
PageSupport ps,
java.lang.String outputPath)
Creates a new instance of PersisentListHelper |
|
| Method Summary | |
|---|---|
void |
clearSelection()
Removes the selection from the underlying list holder |
void |
clearSelectionModel()
Removes the reference to the underlying POJO from the selection model. |
void |
deleteSelectedPojo()
Removes the POJO being stored in the selection model from the persistent context. |
PersistentPojoModel |
getListSelectedModel()
Gets the selected element on the list |
java.lang.Object |
getSelectedPojo()
Gets the POJO of the selected model node, if the selection model has been set the its underlying POJO is returned, otherwise the POJO on the underlying list is returned. |
PersistentPojoModel |
getSelectionModel()
Gets the selection model |
void |
mergeSelectedPojo()
Merges the selected POJO, changes its state to persistent |
void |
persistSelectedPojo()
Persists the selected POJO |
boolean |
selectionChanged()
Copies the currently selected element on the list into the given model node. |
boolean |
selectionEmpty()
Indicates whether the list selection is empty |
void |
updateBinding()
Updates the binding of the underlying ListHolder object |
void |
updateListHolder()
Marks the source model node as dirty and updates the binding of the underlying list holder object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersistentListHelper(ListHolder lh,
PageSupport ps,
PersistentPojoModel sm)
lh - the ListHolder object whose selection is to be handled.ps - the owning page of the specified list holder object.sm - the model node intended to store the selected POJO.
public PersistentListHelper(ListHolder lh,
PageSupport ps)
lh - the ListHolder object whose selection is to be handled.ps - the owning page of the specified list holder object.
public PersistentListHelper(ListHolder lh,
PageSupport ps,
java.lang.String outputPath)
lh - the ListHolder object whose selection is to be handledps - the owning page of the specified listoutputPath - the binding path to the selection model node which will
store the selected POJOs.| Method Detail |
|---|
public PersistentPojoModel getListSelectedModel()
public PersistentPojoModel getSelectionModel()
public void persistSelectedPojo()
public void mergeSelectedPojo()
public void deleteSelectedPojo()
public void clearSelectionModel()
public boolean selectionChanged()
public boolean selectionEmpty()
public java.lang.Object getSelectedPojo()
public void clearSelection()
public void updateBinding()
public void updateListHolder()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||