Package com.saperion.ngc.dialogs
Class RevisionHistoryDialog.RevisionListModel
java.lang.Object
org.zkoss.zul.AbstractListModel
com.saperion.ngc.dialogs.RevisionHistoryDialog.RevisionListModel
- All Implemented Interfaces:
Serializable
,org.zkoss.zul.ext.Pageable
,org.zkoss.zul.ext.Selectable
,org.zkoss.zul.ext.Sortable
,org.zkoss.zul.ListModel
,org.zkoss.zul.ListModelExt
,org.zkoss.zul.PageableModel
- Enclosing class:
- RevisionHistoryDialog
public static class RevisionHistoryDialog.RevisionListModel
extends org.zkoss.zul.AbstractListModel
implements org.zkoss.zul.ListModelExt
List model for the version history dialog.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.zkoss.zul.AbstractListModel
org.zkoss.zul.AbstractListModel.DefaultSelectionControl<E extends Object>
-
Field Summary
Fields inherited from class org.zkoss.zul.AbstractListModel
_selection
Fields inherited from interface org.zkoss.zul.PageableModel
INTERNAL_EVENT
-
Constructor Summary
ConstructorsConstructorDescriptionRevisionListModel
(List<String> versionIds, ResultSetPresenter resultPresenter, DocumentId documentId, String maskName, ResultSetViewImpl resultView, boolean historyAllowed) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListDataListener
(org.zkoss.zul.event.ListDataListener l) create
(ResultSetPresenter resultPresenter, ResultSetViewImpl view, DocumentId docId, String maskName) Factory method.getElementAt
(int index) int
getSize()
getSortDirection
(Comparator cmpr) void
removeListDataListener
(org.zkoss.zul.event.ListDataListener l) void
sort
(Comparator cmpr, boolean ascending) Methods inherited from class org.zkoss.zul.AbstractListModel
addPagingEventListener, addToSelection, clearSelection, clone, fireEvent, fireSelectionEvent, getActivePage, getPageCount, getPageSize, getSelection, getSelectionControl, isMultiple, isSelected, isSelectionEmpty, newEmptySelection, readSelection, removeAllSelection, removeFromSelection, removePagingEventListener, retainAllSelection, setActivePage, setMultiple, setPageSize, setSelection, setSelectionControl, writeSelection
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.zkoss.zul.ext.Sortable
sort
-
Constructor Details
-
RevisionListModel
public RevisionListModel(List<String> versionIds, ResultSetPresenter resultPresenter, DocumentId documentId, String maskName, ResultSetViewImpl resultView, boolean historyAllowed) Constructor.- Parameters:
versionIds
- list of version IDs for the document.resultPresenter
- ResultSetViewPresenterdocumentId
- id of the current documentmaskName
- name of the mask to display index dataresultView
- result set view to post errorshistoryAllowed
- whether the current user is allowed to view the old revisions documents
-
-
Method Details
-
getElementAt
- Specified by:
getElementAt
in interfaceorg.zkoss.zul.ListModel
- See Also:
-
ListModel.getElementAt(int)
-
getSize
public int getSize()- Specified by:
getSize
in interfaceorg.zkoss.zul.ListModel
- See Also:
-
ListModel.getSize()
-
sort
- Specified by:
sort
in interfaceorg.zkoss.zul.ext.Sortable
-
getSortDirection
- Specified by:
getSortDirection
in interfaceorg.zkoss.zul.ext.Sortable
-
addListDataListener
public void addListDataListener(org.zkoss.zul.event.ListDataListener l) - Specified by:
addListDataListener
in interfaceorg.zkoss.zul.ListModel
- Overrides:
addListDataListener
in classorg.zkoss.zul.AbstractListModel
-
removeListDataListener
public void removeListDataListener(org.zkoss.zul.event.ListDataListener l) - Specified by:
removeListDataListener
in interfaceorg.zkoss.zul.ListModel
- Overrides:
removeListDataListener
in classorg.zkoss.zul.AbstractListModel
-
create
public static RevisionHistoryDialog.RevisionListModel create(ResultSetPresenter resultPresenter, ResultSetViewImpl view, DocumentId docId, String maskName) throws NgcUiException, AuthenticationException Factory method.- Parameters:
resultPresenter
- The presenter to obtain the ids fromview
- The result set view to post errorsdocId
- The id of the document the revision history belongs tomaskName
- The mask- Returns:
- The correspondent revision list model.
- Throws:
AuthenticationException
- re-logon requiredNgcUiException
- exception to be handled by view
-