Class CmsResourceSelectDialog
java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.CustomComponent
org.opencms.ui.components.fileselect.CmsResourceSelectDialog
- All Implemented Interfaces:
com.vaadin.event.ContextClickEvent.ContextClickNotifier,com.vaadin.event.MethodEventSource,com.vaadin.server.ClientConnector,com.vaadin.server.Sizeable,com.vaadin.shared.Connector,com.vaadin.ui.Component,com.vaadin.ui.HasComponents,Serializable,Iterable<com.vaadin.ui.Component>
- Direct Known Subclasses:
CmsLocaleLinkTargetSelectionDialog
Dialog with a site selector and file tree which can be used to select resources.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass for site select options.Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListenerNested classes/interfaces inherited from interface com.vaadin.ui.Component
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.ListenerNested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListenerNested classes/interfaces inherited from interface com.vaadin.server.Sizeable
com.vaadin.server.Sizeable.Unit -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CmsObjectThe CMS context.protected CmsResourceFilterThe resource filter.protected CmsResourceThe resource initially displayed at the root of the tree.static final StringThe property used for the site caption.Fields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXTFields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance.CmsResourceSelectDialog(CmsResourceFilter filter, CmsObject cms) public constructor with given CmsObject.CmsResourceSelectDialog(CmsResourceFilter filter, CmsObject _cms, CmsResourceSelectDialog.Options options) public constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a resource selection handler.protected CmsResourceTreeTablecreateTree(CmsObject cms, CmsResource root) Creates the resource tree for the given root.voidDisables the option to select resources from other sites.protected CmsResourceSelectDialogContentsGets the content panel of this dialog.protected CmsResourceTreeTableGets the file tree.protected voidonSiteChange(String site) Called when the user changes the site.voidOpens the given path.voidshowSitemapView(boolean showSitemapView) Switches between the folders and sitemap view of the tree.voidshowStartResource(CmsResource startResource) Displays the start resource by opening all nodes in the tree leading to it.protected voidupdateRoot(CmsObject rootCms, CmsResource siteRootResource) Updates the current site root resource.protected voidUpdates the filtering state.Methods inherited from class com.vaadin.ui.CustomComponent
getComponentCount, getCompositionRoot, getState, getState, iterator, setCompositionRootMethods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, readDesign, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthFull, setWidthUndefined, writeDesignMethods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlerMethods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible, writeDesignMethods inherited from interface com.vaadin.shared.Connector
getConnectorIdMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
-
Field Details
-
PROPERTY_SITE_CAPTION
The property used for the site caption.- See Also:
-
m_currentCms
The CMS context. -
m_resourceFilter
The resource filter. -
m_root
The resource initially displayed at the root of the tree.
-
-
Constructor Details
-
CmsResourceSelectDialog
Creates a new instance.- Parameters:
filter- the resource filter to use- Throws:
CmsException- if something goes wrong
-
CmsResourceSelectDialog
public constructor with given CmsObject.- Parameters:
filter- filter the resource filter to usecms- CmsObejct to use- Throws:
CmsException- if something goes wrong
-
CmsResourceSelectDialog
public CmsResourceSelectDialog(CmsResourceFilter filter, CmsObject _cms, CmsResourceSelectDialog.Options options) throws CmsException public constructor.- Parameters:
filter- resource filteroptions- optionscms- CmsObject- Throws:
CmsException- exception
-
-
Method Details
-
addSelectionHandler
Adds a resource selection handler.- Parameters:
handler- the handler
-
disableSiteSwitch
Disables the option to select resources from other sites. -
openPath
Opens the given path.- Parameters:
path- the path to open
-
showSitemapView
Switches between the folders and sitemap view of the tree.- Parameters:
showSitemapView-trueto show the sitemap view
-
showStartResource
Displays the start resource by opening all nodes in the tree leading to it.- Parameters:
startResource- the resource which should be shown in the tree
-
createTree
Creates the resource tree for the given root.- Parameters:
cms- the CMS contextroot- the root resource- Returns:
- the resource tree
-
getContents
Gets the content panel of this dialog.- Returns:
- content panel of this dialog
-
getFileTree
Gets the file tree.- Returns:
- the file tree
-
onSiteChange
Called when the user changes the site.- Parameters:
site- the new site root
-
updateRoot
Updates the current site root resource.- Parameters:
rootCms- the CMS contextsiteRootResource- the resource corresponding to a site root
-
updateView
Updates the filtering state.
-