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
Modifier and TypeClassDescriptionstatic class
Class 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.DetachListener
Nested 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.Listener
Nested 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.ComponentDetachListener
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
com.vaadin.server.Sizeable.Unit
-
Field Summary
Modifier and TypeFieldDescriptionprotected CmsObject
The CMS context.protected CmsResourceFilter
The resource filter.protected CmsResource
The resource initially displayed at the root of the tree.static final String
The property used for the site caption.Fields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXT
Fields 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
ConstructorDescriptionCreates 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 TypeMethodDescriptionvoid
Adds a resource selection handler.protected CmsResourceTreeTable
createTree
(CmsObject cms, CmsResource root) Creates the resource tree for the given root.void
Disables the option to select resources from other sites.protected CmsResourceSelectDialogContents
Gets the content panel of this dialog.protected CmsResourceTreeTable
Gets the file tree.protected void
onSiteChange
(String site) Called when the user changes the site.void
Opens the given path.void
showSitemapView
(boolean showSitemapView) Switches between the folders and sitemap view of the tree.void
showStartResource
(CmsResource startResource) Displays the start resource by opening all nodes in the tree leading to it.protected void
updateRoot
(CmsObject rootCms, CmsResource siteRootResource) Updates the current site root resource.protected void
Updates the filtering state.Methods inherited from class com.vaadin.ui.CustomComponent
getComponentCount, getCompositionRoot, getState, getState, iterator, setCompositionRoot
Methods 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, writeDesign
Methods 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, updateDiffstate
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods 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, setErrorHandler
Methods 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, writeDesign
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods 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_filter
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 filtercms
- CmsObjectoptions
- options- 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
-true
to 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.
-