Package com.saperion.ngc.dialogs
Class AbstractStructureDialog
java.lang.Object
org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zul.Window
com.saperion.ngc.events.BaseWindow
com.saperion.ngc.dialogs.AbstractStructureDialog
- All Implemented Interfaces:
EventChild
,EventChildHandler
,LogEventChildHandler
,Serializable
,Cloneable
,org.zkoss.zk.ui.Component
,org.zkoss.zk.ui.ext.Scope
,org.zkoss.zk.ui.IdSpace
,org.zkoss.zk.ui.sys.ComponentCtrl
,org.zkoss.zul.ext.Framable
- Direct Known Subclasses:
CheckinDialog
,EditStructureDialog
,ShareBaseCheckInDialog
Base-class for dialogs that change a document's structure.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Result of Dialog.static class
Represents a row in the dialog's list.static enum
Actions to perform when a document was uploaded.Nested classes/interfaces inherited from class org.zkoss.zul.Window
org.zkoss.zul.Window.Mode
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.AbstractComponent.Children
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Cancel button.protected static final String
ID of the listbox in the dialog.List of the document's elements.static final int
OK button.protected static final String
ID of the login-button in the dialog.protected static final String
Name of the status attribute of a row.protected static final String
Indicates that the row was added to the document's structure.protected static final String
Indicates that the the document's content of a row in the dialog was changed.protected static final String
Status of the row that created a new item.protected static final String
Indicates that the element denoted by a row in the dialog will be deleted.protected static final String
Indicates that a row in the dialog was not changed.Fields inherited from class org.zkoss.zul.Window
EMBEDDED, HIGHLIGHTED, MODAL, OVERLAPPED, POPUP
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclass
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
Fields inherited from interface com.saperion.ngc.events.EventChild
ALL_EVENTS, ON_ADD_LINK, ON_ADD_LOOKUP, ON_ADD_TO_FAVORITES, ON_AFTER_QUERY, ON_BUTTON, ON_BUTTON_QUERY, ON_CANCEL, ON_CANCEL_AND, ON_CANCEL_EDIT, ON_CHANGE_DOCUMENT_SECURITY, ON_CHANGE_FOLDER_SECURITY, ON_CLEAR, ON_DELETE_SELECTED, ON_DISPLAY_POPUP, ON_DISPLAY_RESULTITEM, ON_DISPLAY_TEMPORARY_DOCUMENT, ON_DOCUMENT_ADDED, ON_DOCUMENT_CHECK, ON_DOCUMENT_FILING, ON_DOCUMENT_LOCKED, ON_DOCUMENT_PROLONG_RETENTION, ON_DOCUMENT_REDUCE_DISPOSITION, ON_DOCUMENT_RELEASE, ON_DOWNLOAD_RESULTITEM, ON_EDIT_CONTENT, ON_EDIT_FOLDER, ON_EDIT_ITEM, ON_EDIT_ITEM_SELECTED, ON_EDIT_LOOKUP, ON_EDIT_SELECTED, ON_EDIT_STRUCTURE, ON_EXPORT, ON_EXTERNAL_STORAGE_UPLOAD, ON_EXTERNAL_STORAGE_UPLOAD_STATUS, ON_FAST_ACCESS_DRAG_OVER, ON_FIELD_CHANGE, ON_FILE_ACTION, ON_FILE_PREVIEW, ON_FILE_SEARCH, ON_FORM_CREATED, ON_FORM_RENDER_ERROR, ON_FORWARD, ON_IGNORE, ON_INDEX, ON_INDEX_CLEAR, ON_INDEX_RESULTITEM, ON_ITEM_DOUBLECLICK, ON_LAUNCH_WORKFLOW, ON_LOG, ON_LOGON, ON_MACRO, ON_NAVIGATION, ON_NAVIGATION_FOLDER, ON_NAVIGATION_FORM, ON_NAVIGATION_WEBPART, ON_NEW_ITEM, ON_NEW_SELECTED, ON_OK, ON_ONEDRIVE_LOGIN, ON_OPEN_INDEX_MASK, ON_OPEN_MASK, ON_OPEN_QUERY_MASK, ON_PASSWORD_EXPIRED, ON_PRINT_DOCUMENTS, ON_QUERY, ON_QUERY_FAVORITE, ON_REFRESH, ON_REFRESH_FOLDER, ON_RESET_GUI, ON_REVISION_CREATED, ON_SAVE_AND, ON_SAVE_DOC, ON_SAVE_FOLDER, ON_SCROLL_NODE, ON_SELECT_TREE_ITEM, ON_SELECTDDC, ON_SEND_MAIL_RESULTITEM, ON_SET_LITIGATION_HOLD, ON_SHAREBASE_DOCUMENT_CHECK, ON_SHAREBASE_LOGIN, ON_START_WORKFLOW, ON_TAB_SELECTED, ON_UNDELETE_SELECTED, ON_UPLOAD_DOCUMENT, ON_UPLOAD_EXTERNAL_STORAGE_DOCUMENT, ON_UPLOAD_SUCCESS, ON_VARIABLES_AVAILABLE, ON_WF, ON_WF_COMMENT_DIALOG_CANCEL, ON_WF_COMMENT_DIALOG_OK, ON_WFCOMMENTS, ON_WFDELEGATE, ON_WFFORWARD, ON_WFFORWARD1, ON_WFFORWARD2, ON_WFFORWARD3, ON_WFFORWARD4, ON_WFFORWARD5, ON_WFHISTORY, ON_WFPUTBACK, ON_WFREMINDER, ON_WFTAKE, ON_WORKFLOW_ACTION, ON_WORKFLOW_COMMENT, ON_WORKFLOW_DISPLAY_COMMENT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContentUpdate
(int position, InputStream dataStream, String fileName) void
addContentUpdate
(int position, org.zkoss.util.media.Media media) Adds update entry for the given position; if entry exits for that position, it is replaced.protected org.zkoss.zul.Listitem
addNewDocument
(org.zkoss.zk.ui.event.UploadEvent uploadEvent) Adds a new item to the structure.void
Cancel dialog.void
endModalOk
(String versionComment) Ok.getLocalizedString
(String text) boolean
boolean
static boolean
Indicates if the given element can be deleted by this dialog.static boolean
Indicates if the given element can be updloaded by this dialog.void
onUpload
(org.zkoss.zk.ui.event.Event event) Event-listener for upload-event triggered when a user adds a new document in the dialog.abstract void
Removes the selected item from the list.protected void
setCommentEnabled
(boolean commentEnabled) protected void
setDefaultComment
(String defaultComment) protected void
setDocumentPages
(List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentPages) protected void
setListener
(org.zkoss.zk.ui.event.EventListener eventListener) void
setLocalization
(LocalizationUtil localizationUtil) Sets localization.void
Sets the action to perform when a document was uploaded.void
undoContentUpdate
(int position) Deletes content entry at the given position.abstract void
Uploads a new item to add it to the document.Methods inherited from class com.saperion.ngc.events.BaseWindow
getEventtarget, getMainWindow, postAddLinkEvent, postAddToFavoritesEvent, postCancelSelectedEvent, postChangeDocumentSecurityEvent, postChangeFolderSecurityEvent, postDeleteSelectedEvent, postDisplayPopupEvent, postDisplayPopupEvent, postDisplayResultItemEvent, postDisplayResultItemEvent, postDocumentCheckEvent, postDocumentCheckWithShareBaseEvent, postDocumentFilingEvent, postDocumentFilingEvent, postDocumentReleaseEvent, postDownloadResultItemEvent, postEditContentEvent, postEditItemSelectedEvent, postEditSelectedEvent, postEditSelectedEvent, postEditSelectedEvent, postEditStructureEvent, postErrorLogEvent, postErrorLogEvent, postExternalStorageUploadEvent, postExternalStorageUploadStatusEvent, postFieldChangeEvent, postFileActionEvent, postFileActionEvent, postFormButtonEvent, postIndexResultItemEvent, postInfoLogEvent, postInfoLogEvent, postLaunchWorkflowEvent, postLockDocumentEvent, postLogonEvent, postLogonEvent, postNavigationFolderEvent, postNavigationFormEvent, postNavigationFormEvent, postNavigationWebpartEvent, postNewSelectedEvent, postOpenMaskEvent, postPrintDocumentEvent, postProlongRetentionEvent, postQueryFavoriteEvent, postReduceDispositionEvent, postRefreshEvent, postResetGuiEvent, postResultFieldEvent, postSaveDocumentEvent, postSaveDocumentEvent, postSelectTreeItemEvent, postSendMailResultItemEvent, postSetLitigationHoldEvent, postShareBaseLoginEvent, postStartWorkflowEvent, postTabSelectedEvent, postUnDeleteSelectedEvent, postUploadDocumentEvent, postUploadeExternalStorageDocumentEvent, postUploadSuccessEvent, postWarningLogEvent, postWarningLogEvent, postWorkflowActionEvent, postWorkflowCommentEvent, postWorkflowDisplayCommentEvent, setEventtarget
Methods inherited from class org.zkoss.zul.Window
beforeChildAdded, clone, doEmbedded, doHighlighted, doModal, doOverlapped, doPopup, getBorder, getCaption, getContentSclass, getContentStyle, getDefaultActionOnShow, getMinheight, getMinwidth, getMode, getModeType, getPosition, getTitle, getZclass, inEmbedded, inHighlighted, inModal, inOverlapped, inPopup, insertBefore, isClosable, isCollapsible, isMaximizable, isMaximized, isMinimizable, isMinimized, isShadow, isSizable, onChildRemoved, onClose, onModal, onPageDetached, renderProperties, service, setBorder, setBorder, setClosable, setContentSclass, setContentStyle, setDefaultActionOnShow, setDraggable, setMaximizable, setMaximized, setMinheight, setMinimizable, setMinimized, setMinwidth, setMode, setMode, setMode, setPosition, setShadow, setSizable, setTitle, setTopmost, setVisible
Methods inherited from class org.zkoss.zul.impl.XulElement
getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, evalCSSFlex, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, invalidate, invalidatePartial, isChildable, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onPageAttached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
invalidatePartial
Methods inherited from interface org.zkoss.zk.ui.IdSpace
getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, hasFellow, hasFellow
Methods inherited from interface org.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
-
Field Details
-
STATUS_LOADED
Indicates that the the document's content of a row in the dialog was changed.- See Also:
-
STATUS_REMOVED
Indicates that the element denoted by a row in the dialog will be deleted.- See Also:
-
STATUS_UNCHANGED
Indicates that a row in the dialog was not changed.- See Also:
-
STATUS_NEW
Status of the row that created a new item.- See Also:
-
STATUS_ADDED
Indicates that the row was added to the document's structure.- See Also:
-
STATUS
Name of the status attribute of a row.- See Also:
-
OK_BUTTON
ID of the login-button in the dialog.- See Also:
-
CONTENT_LIST
ID of the listbox in the dialog.- See Also:
-
OK
public static final int OKOK button.- See Also:
-
CANCEL
public static final int CANCELCancel button.- See Also:
-
documentPages
List of the document's elements.
-
-
Constructor Details
-
AbstractStructureDialog
public AbstractStructureDialog()
-
-
Method Details
-
removeItem
public abstract void removeItem()Removes the selected item from the list. -
uploadItem
public abstract void uploadItem()Uploads a new item to add it to the document. -
setLocalization
Sets localization.- Parameters:
localizationUtil
- localization utility object
-
setDocumentPages
- Parameters:
documentPages
- list of the document's elements
-
addContentUpdate
public void addContentUpdate(int position, org.zkoss.util.media.Media media) Adds update entry for the given position; if entry exits for that position, it is replaced.- Parameters:
position
- content's position in documentmedia
- content, null indicates content to be removed
-
addContentUpdate
-
undoContentUpdate
public void undoContentUpdate(int position) Deletes content entry at the given position.- Parameters:
position
- content's position in document
-
hasNoUpdates
public boolean hasNoUpdates()- Returns:
- true if no updates are enqueued
-
endModalOk
Ok.- Parameters:
versionComment
- version comment- Throws:
Exception
- exception
-
getLocalizedString
- Parameters:
text
- text to localize- Returns:
- localized text
-
endModalCancel
Cancel dialog.- Throws:
Exception
- exception
-
setListener
protected void setListener(org.zkoss.zk.ui.event.EventListener eventListener) - Parameters:
eventListener
- listener to be called when dialog is closed
-
onUpload
public void onUpload(org.zkoss.zk.ui.event.Event event) Event-listener for upload-event triggered when a user adds a new document in the dialog.- Parameters:
event
- upload-event
-
addNewDocument
protected org.zkoss.zul.Listitem addNewDocument(org.zkoss.zk.ui.event.UploadEvent uploadEvent) Adds a new item to the structure.- Parameters:
uploadEvent
- event with unploaded document- Returns:
- newly created listitem or null if no item was added
-
setDefaultComment
- Parameters:
defaultComment
- default comment for comment-textbox in dialog
-
setCommentEnabled
protected void setCommentEnabled(boolean commentEnabled) - Parameters:
commentEnabled
- enable or disable comment-textbox in dialog
-
isCommentEnabled
public boolean isCommentEnabled()- Returns:
- true if comment textbox is enabled
-
setUploadAction
Sets the action to perform when a document was uploaded.- Parameters:
action
- action- See Also:
-
isUploadable
Indicates if the given element can be updloaded by this dialog. Currently all other types than images can be uploaded.- Parameters:
info
- archive-meta-info of element- Returns:
- true if this dialog permits to upload (checkin) this element, false otherwise.
-
isDeletable
Indicates if the given element can be deleted by this dialog. Currently all other types than images can be uploaded.- Parameters:
info
- archive-meta-info of element- Returns:
- true if this dialog permits to delete this element, false otherwise.
-