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>,Serializable,Iterable<com.vaadin.ui.Component>,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 by
CmsPathSelectField.- See Also:
-
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.ReadOnlyStatusChangeEventNested classes/interfaces inherited from interface com.vaadin.v7.data.Buffered
com.vaadin.v7.data.Buffered.SourceExceptionNested 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.v7.ui.Field
com.vaadin.v7.ui.Field.ValueChangeEventNested 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.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>, com.vaadin.v7.data.Property.ValueChangeListener, com.vaadin.v7.data.Property.ValueChangeNotifier, com.vaadin.v7.data.Property.ViewerNested classes/interfaces inherited from interface com.vaadin.server.Sizeable
com.vaadin.server.Sizeable.Unit -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CmsObjectCmsObject instance, doesn't have to be set.protected booleanIndicates if changing the website should be possible.protected StringThe file select dialog caption.protected CmsResourceFilterThe filter used for reading resources.protected booleanThe start with sitemap view flag.protected com.vaadin.ui.TextFieldThe text field containing the selected path.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDisables the site switch function.protected CmsResourceSelectDialog.OptionsGets the options object.booleanCheck if there is an error.protected com.vaadin.ui.CssLayoutprotected voidOpens the file selector dialog.voidRequire the resource to be a file.voidRequire the resource to be a folder.voidResets the type requirements.protected booleanresourceIsValid(CmsResource resource) Checks if the given resource is valid according to require Folder or File.voidsetBasePath(String path) Sets the base path.voidsetCmsObject(CmsObject cms) Method to set cms object to make it possible to user other site context.voidsetDefaultPath(String path) Sets the default path to open if no Path is selected yet.voidsetFileSelectButtonVisible(boolean visible) Sets the visibility of the file select button.voidsetFileSelectCaption(String caption) Sets the caption of the file select dialog.voidsetResourceFilter(CmsResourceFilter filter) Sets the filter to use for reading resources.protected abstract voidsetResourceValue(CmsResource resource) Sets the field value.voidsetStartWithSitempaView(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, setWidthMethods 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, writeDesignMethods inherited from class com.vaadin.v7.ui.AbstractLegacyComponent
getExplicitImmediateValue, isImmediate, setImmediateMethods 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, setWidthUndefinedMethods 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.event.Action.ShortcutNotifier
addShortcutListener, removeShortcutListenerMethods 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, 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, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidthFull, setWidthUndefined
-
Field Details
-
m_fileSelectCaption
The file select dialog caption. -
m_filter
The filter used for reading resources. -
m_startWithSitemapView
The start with sitemap view flag. -
m_textField
The text field containing the selected path. -
m_cms
CmsObject instance, doesn't have to be set. In normal case this is null. -
m_diableSiteSwitch
Indicates if changing the website should be possible.
-
-
Constructor Details
-
A_CmsFileSelectField
public A_CmsFileSelectField()Creates a new instance.
-
-
Method Details
-
disableSiteSwitch
Disables the site switch function. -
hasEditableGroupError
Description copied from interface:CmsEditableGroup.I_HasErrorCheck if there is an error.- Specified by:
hasEditableGroupErrorin interfaceCmsEditableGroup.I_HasError- Returns:
- true if there is an error
- See Also:
-
requireFile
Require the resource to be a file. -
requireFolder
Require the resource to be a folder. -
resetRequireType
Resets the type requirements. -
setBasePath
Sets the base path.- Parameters:
path- the base path
-
setCmsObject
Method to set cms object to make it possible to user other site context.- Parameters:
cms- Object to use
-
setDefaultPath
Sets the default path to open if no Path is selected yet.- Parameters:
path- to be opened
-
setFileSelectButtonVisible
Sets the visibility of the file select button.- Parameters:
visible- boolean
-
setFileSelectCaption
Sets the caption of the file select dialog.- Parameters:
caption- the caption
-
setResourceFilter
Sets the filter to use for reading resources.- Parameters:
filter- the new filter
-
setStartWithSitempaView
Sets the start with sitemap view flag.- Parameters:
startWithSitemapView- the start with sitemap view flag
-
getOptions
Gets the options object.- Returns:
- Options
-
initContent
- Specified by:
initContentin classcom.vaadin.v7.ui.CustomField<T>- See Also:
-
openFileSelector
Opens the file selector dialog. -
resourceIsValid
Checks if the given resource is valid according to require Folder or File.- Parameters:
resource- to check- Returns:
- true if resource is valid
-
setResourceValue
Sets the field value.- Parameters:
resource- the resource
-