Class A_CmsFileSelectField<T>
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.ui.AbstractComponent
-
- com.vaadin.v7.ui.AbstractLegacyComponent
-
- com.vaadin.v7.ui.AbstractField<T>
-
- com.vaadin.v7.ui.CustomField<T>
-
- org.opencms.ui.components.fileselect.A_CmsFileSelectField<T>
-
- Type Parameters:
T
- the value type
- All Implemented Interfaces:
com.vaadin.event.Action.ShortcutNotifier
,com.vaadin.event.ContextClickEvent.ContextClickNotifier
,com.vaadin.event.MethodEventSource
,com.vaadin.event.SerializableEventListener
,com.vaadin.server.ClientConnector
,com.vaadin.server.Sizeable
,com.vaadin.shared.Connector
,com.vaadin.ui.Component
,com.vaadin.ui.Component.Focusable
,com.vaadin.ui.HasComponents
,com.vaadin.v7.data.Buffered
,com.vaadin.v7.data.BufferedValidatable
,com.vaadin.v7.data.Property<T>
,com.vaadin.v7.data.Property.Editor
,com.vaadin.v7.data.Property.ReadOnlyStatusChangeListener
,com.vaadin.v7.data.Property.ReadOnlyStatusChangeNotifier
,com.vaadin.v7.data.Property.ValueChangeListener
,com.vaadin.v7.data.Property.ValueChangeNotifier
,com.vaadin.v7.data.Property.Viewer
,com.vaadin.v7.data.Validatable
,com.vaadin.v7.ui.Field<T>
,java.io.Serializable
,java.lang.Iterable<com.vaadin.ui.Component>
,java.util.EventListener
,CmsEditableGroup.I_HasError
- Direct Known Subclasses:
CmsPathSelectField
public abstract class A_CmsFileSelectField<T> extends com.vaadin.v7.ui.CustomField<T> implements CmsEditableGroup.I_HasError
Abstract file select field. Used byCmsPathSelectField
.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vaadin.v7.ui.AbstractField
com.vaadin.v7.ui.AbstractField.FocusShortcut, com.vaadin.v7.ui.AbstractField.ReadOnlyStatusChangeEvent
-
Nested classes/interfaces inherited from interface com.vaadin.v7.data.Buffered
com.vaadin.v7.data.Buffered.SourceException
-
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.v7.ui.Field
com.vaadin.v7.ui.Field.ValueChangeEvent
-
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.v7.data.Property
com.vaadin.v7.data.Property.Editor, com.vaadin.v7.data.Property.ReadOnlyException, com.vaadin.v7.data.Property.ReadOnlyStatusChangeListener, com.vaadin.v7.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.v7.data.Property.Transactional<T extends java.lang.Object>, com.vaadin.v7.data.Property.ValueChangeListener, com.vaadin.v7.data.Property.ValueChangeNotifier, com.vaadin.v7.data.Property.Viewer
-
-
Field Summary
Fields Modifier and Type Field Description protected CmsObject
m_cms
CmsObject instance, doesn't have to be set.protected boolean
m_diableSiteSwitch
Indicates if changing the website should be possible.protected java.lang.String
m_fileSelectCaption
The file select dialog caption.protected CmsResourceFilter
m_filter
The filter used for reading resources.protected boolean
m_startWithSitemapView
The start with sitemap view flag.protected com.vaadin.v7.ui.TextField
m_textField
The text field containing the selected path.
-
Constructor Summary
Constructors Constructor Description A_CmsFileSelectField()
Creates a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
disableSiteSwitch()
Disables the site switch function.protected CmsResourceSelectDialog.Options
getOptions()
Gets the options object.boolean
hasEditableGroupError()
Check if there is an error.protected com.vaadin.ui.CssLayout
initContent()
protected void
openFileSelector()
Opens the file selector dialog.void
requireFile()
Require the resource to be a file.void
requireFolder()
Require the resource to be a folder.void
resetRequireType()
Resets the type requirements.protected boolean
resourceIsValid(CmsResource resource)
Checks if the given resource is valid according to require Folder or File.void
setBasePath(java.lang.String path)
void
setCmsObject(CmsObject cms)
Method to set cms object to make it possible to user other site context.void
setDefaultPath(java.lang.String path)
Sets the default path to open if no Path is selected yet.void
setFileSelectButtonVisible(boolean visible)
Sets the visibility of the file select button.void
setFileSelectCaption(java.lang.String caption)
Sets the caption of the file select dialog.void
setResourceFilter(CmsResourceFilter filter)
Sets the filter to use for reading resources.protected abstract void
setResourceValue(CmsResource resource)
Sets the field value.void
setStartWithSitempaView(boolean startWithSitemapView)
Sets the start with sitemap view flag.-
Methods inherited from class com.vaadin.v7.ui.CustomField
attach, focus, getContent, getTabIndex, iterator, setFocusDelegate, setHeight, setTabIndex, setWidth
-
Methods inherited from class com.vaadin.v7.ui.AbstractField
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, beforeClientResponse, clear, commit, detach, discard, fireReadOnlyStatusChange, fireValueChange, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getCustomAttributes, getErrorMessage, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getState, getState, getType, getValidators, getValue, isBuffered, isEmpty, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValid, isValidationVisible, readDesign, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setLocale, setPropertyDataSource, setReadOnly, setRequired, setRequiredError, setValidationVisible, setValue, setValue, setValue, shouldHideErrors, validate, validate, valueChange, writeDesign
-
Methods inherited from class com.vaadin.v7.ui.AbstractLegacyComponent
getExplicitImmediateValue, isImmediate, setImmediate
-
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthFull, setWidthUndefined
-
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.event.Action.ShortcutNotifier
addShortcutListener, removeShortcutListener
-
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, 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
-
-
-
-
Field Detail
-
m_fileSelectCaption
protected java.lang.String m_fileSelectCaption
The file select dialog caption.
-
m_filter
protected CmsResourceFilter m_filter
The filter used for reading resources.
-
m_startWithSitemapView
protected boolean m_startWithSitemapView
The start with sitemap view flag.
-
m_textField
protected com.vaadin.v7.ui.TextField m_textField
The text field containing the selected path.
-
m_cms
protected CmsObject m_cms
CmsObject instance, doesn't have to be set. In normal case this is null.
-
m_diableSiteSwitch
protected boolean m_diableSiteSwitch
Indicates if changing the website should be possible.
-
-
Constructor Detail
-
A_CmsFileSelectField
public A_CmsFileSelectField()
Creates a new instance.
-
-
Method Detail
-
disableSiteSwitch
public void disableSiteSwitch()
Disables the site switch function.
-
hasEditableGroupError
public boolean hasEditableGroupError()
Description copied from interface:CmsEditableGroup.I_HasError
Check if there is an error.- Specified by:
hasEditableGroupError
in interfaceCmsEditableGroup.I_HasError
- Returns:
- true if there is an error
- See Also:
org.opencms.ui.components.editablegroup.I_CmsEditableGroup.I_HasError#hasEditableGroupError()
-
requireFile
public void requireFile()
Require the resource to be a file.
-
requireFolder
public void requireFolder()
Require the resource to be a folder.
-
resetRequireType
public void resetRequireType()
Resets the type requirements.
-
setBasePath
public void setBasePath(java.lang.String path)
-
setCmsObject
public void setCmsObject(CmsObject cms)
Method to set cms object to make it possible to user other site context.- Parameters:
cms
- Object to use
-
setDefaultPath
public void setDefaultPath(java.lang.String path)
Sets the default path to open if no Path is selected yet.- Parameters:
path
- to be opened
-
setFileSelectButtonVisible
public void setFileSelectButtonVisible(boolean visible)
Sets the visibility of the file select button.- Parameters:
visible
- boolean
-
setFileSelectCaption
public void setFileSelectCaption(java.lang.String caption)
Sets the caption of the file select dialog.- Parameters:
caption
- the caption
-
setResourceFilter
public void setResourceFilter(CmsResourceFilter filter)
Sets the filter to use for reading resources.- Parameters:
filter
- the new filter
-
setStartWithSitempaView
public void setStartWithSitempaView(boolean startWithSitemapView)
Sets the start with sitemap view flag.- Parameters:
startWithSitemapView
- the start with sitemap view flag
-
getOptions
protected CmsResourceSelectDialog.Options getOptions()
Gets the options object.- Returns:
- Options
-
initContent
protected com.vaadin.ui.CssLayout initContent()
- Specified by:
initContent
in classcom.vaadin.v7.ui.CustomField<T>
- See Also:
CustomField.initContent()
-
openFileSelector
protected void openFileSelector()
Opens the file selector dialog.
-
resourceIsValid
protected boolean resourceIsValid(CmsResource resource)
Checks if the given resource is valid according to require Folder or File.- Parameters:
resource
- to check- Returns:
- true if resource is valid
-
setResourceValue
protected abstract void setResourceValue(CmsResource resource)
Sets the field value.- Parameters:
resource
- the resource
-
-