info.magnolia.ui.form.field
Class LinkField

java.lang.Object
  extended by com.vaadin.server.AbstractClientConnector
      extended by com.vaadin.ui.AbstractComponent
          extended by com.vaadin.ui.AbstractField<T>
              extended by com.vaadin.ui.CustomField<String>
                  extended by info.magnolia.ui.form.field.LinkField
All Implemented Interfaces:
com.vaadin.data.Buffered, com.vaadin.data.BufferedValidatable, com.vaadin.data.Property<String>, com.vaadin.data.Property.Editor, com.vaadin.data.Property.ReadOnlyStatusChangeListener, com.vaadin.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.data.Property.ValueChangeListener, com.vaadin.data.Property.ValueChangeNotifier, com.vaadin.data.Property.Viewer, com.vaadin.data.Validatable, com.vaadin.event.Action.ShortcutNotifier, com.vaadin.event.MethodEventSource, com.vaadin.server.ClientConnector, com.vaadin.server.Sizeable, com.vaadin.shared.Connector, com.vaadin.ui.Component, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Field<String>, com.vaadin.ui.HasComponents, Serializable, Iterable<com.vaadin.ui.Component>

public class LinkField
extends com.vaadin.ui.CustomField<String>

A base custom field comprising a text field and a button placed to its immediate right. A PropertyTranslator can be set in order to have a different display and property stored. For example, display can be the Item path and value stored is the identifier of the Item.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractField
com.vaadin.ui.AbstractField.FocusShortcut, com.vaadin.ui.AbstractField.ReadOnlyStatusChangeEvent
 
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.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.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.server.Sizeable
com.vaadin.server.Sizeable.Unit
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Field
com.vaadin.ui.Field.ValueChangeEvent
 
Nested classes/interfaces inherited from interface com.vaadin.data.Buffered
com.vaadin.data.Buffered.SourceException
 
Nested classes/interfaces inherited from interface com.vaadin.data.Property
com.vaadin.data.Property.Editor, com.vaadin.data.Property.ReadOnlyException, com.vaadin.data.Property.ReadOnlyStatusChangeListener, com.vaadin.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.data.Property.Transactional<T>, com.vaadin.data.Property.ValueChangeListener, com.vaadin.data.Property.ValueChangeNotifier, com.vaadin.data.Property.Viewer
 
Field Summary
 
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
LinkField(LinkFieldDefinition linkFieldDefinition, AppController appController, UiContext uiContext, info.magnolia.objectfactory.ComponentProvider componentProvider)
           
 
Method Summary
 com.vaadin.server.ErrorMessage getErrorMessage()
           
 com.vaadin.data.Property getPropertyDataSource()
           
 com.vaadin.ui.Button getSelectButton()
           
 com.vaadin.ui.TextField getTextField()
           
 Class<String> getType()
           
 String getValue()
           
protected  com.vaadin.ui.Component initContent()
           
 boolean isValid()
           
 void setButtonCaptionNew(String buttonCaptionNew)
          Caption section.
 void setButtonCaptionOther(String buttonCaptionOther)
           
 void setPropertyDataSource(com.vaadin.data.Property newDataSource)
          Set propertyDatasource.
 void setValue(String newValue)
           
 
Methods inherited from class com.vaadin.ui.CustomField
attach, getContent, iterator, setHeight, setWidth
 
Methods inherited from class com.vaadin.ui.AbstractField
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, beforeClientResponse, commit, detach, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getInternalValue, getModelType, getRequiredError, getState, getState, getTabIndex, getValidators, isBuffered, isEmpty, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValidationVisible, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setLocale, setReadOnly, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, shouldHideErrors, toString, validate, validate, valueChange
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isConnectorEnabled, isEnabled, isImmediate, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setIcon, setId, setImmediate, setParent, setPrimaryStyleName, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth
 
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hasListeners, isAttached, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible
 
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.shared.Connector
getConnectorId
 
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setSizeFull, setSizeUndefined, setWidth
 
Methods inherited from interface com.vaadin.event.Action.ShortcutNotifier
addShortcutListener, removeShortcutListener
 

Constructor Detail

LinkField

public LinkField(LinkFieldDefinition linkFieldDefinition,
                 AppController appController,
                 UiContext uiContext,
                 info.magnolia.objectfactory.ComponentProvider componentProvider)
Method Detail

initContent

protected com.vaadin.ui.Component initContent()
Specified by:
initContent in class com.vaadin.ui.CustomField<String>

getTextField

public com.vaadin.ui.TextField getTextField()

getSelectButton

public com.vaadin.ui.Button getSelectButton()

getValue

public String getValue()
Specified by:
getValue in interface com.vaadin.data.Property<String>
Overrides:
getValue in class com.vaadin.ui.AbstractField<String>

setValue

public void setValue(String newValue)
              throws com.vaadin.data.Property.ReadOnlyException,
                     com.vaadin.data.util.converter.Converter.ConversionException
Specified by:
setValue in interface com.vaadin.data.Property<String>
Overrides:
setValue in class com.vaadin.ui.AbstractField<String>
Throws:
com.vaadin.data.Property.ReadOnlyException
com.vaadin.data.util.converter.Converter.ConversionException

setPropertyDataSource

public void setPropertyDataSource(com.vaadin.data.Property newDataSource)
Set propertyDatasource. If the translator is not null, set it as datasource.

Specified by:
setPropertyDataSource in interface com.vaadin.data.Property.Viewer
Overrides:
setPropertyDataSource in class com.vaadin.ui.AbstractField<String>

getPropertyDataSource

public com.vaadin.data.Property getPropertyDataSource()
Specified by:
getPropertyDataSource in interface com.vaadin.data.Property.Viewer
Overrides:
getPropertyDataSource in class com.vaadin.ui.AbstractField<String>

getType

public Class<String> getType()
Specified by:
getType in interface com.vaadin.data.Property<String>
Specified by:
getType in class com.vaadin.ui.AbstractField<String>

setButtonCaptionNew

public void setButtonCaptionNew(String buttonCaptionNew)
Caption section.


setButtonCaptionOther

public void setButtonCaptionOther(String buttonCaptionOther)

isValid

public boolean isValid()
Specified by:
isValid in interface com.vaadin.data.Validatable
Overrides:
isValid in class com.vaadin.ui.AbstractField<String>

getErrorMessage

public com.vaadin.server.ErrorMessage getErrorMessage()
Overrides:
getErrorMessage in class com.vaadin.ui.AbstractField<String>


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.