Object
AbstractClientConnector
AbstractComponent
AbstractLegacyComponent
AbstractField<Object>
CustomField<Object>
DBSearchField
All Implemented Interfaces:
CaptionField, ExecutionContextAware, ExecutionContextField<Object>, DBMultiBindField, ListenerField<Object>, Action.ShortcutNotifier, ContextClickEvent.ContextClickNotifier, MethodEventSource, SerializableEventListener, ClientConnector, Sizeable, Connector, Component, Component.Focusable, HasComponents, Buffered, BufferedValidatable, Property<Object>, Property.Editor, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer, Validatable, Field<Object>, Serializable, Iterable<Component>, EventListener

@Component @Scope("prototype") public class DBSearchField extends CustomField<Object> implements ExecutionContextField<Object>, ListenerField<Object>, DBMultiBindField, CaptionField
Componente para selecao de valores baseados em uma Query Pla
Author:
eduardo
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class AbstractField

    AbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEvent

    Nested classes/interfaces inherited from interface Buffered

    Buffered.SourceException

    Nested classes/interfaces inherited from interface ClientConnector

    ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener

    Nested classes/interfaces inherited from interface Component

    Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener

    Nested classes/interfaces inherited from interface Field

    Field.ValueChangeEvent

    Nested classes/interfaces inherited from interface HasComponents

    HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListener

    Nested classes/interfaces inherited from interface Property

    Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeEvent, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer

    Nested classes/interfaces inherited from interface Sizeable

    Sizeable.Unit
  • Field Summary

    Fields inherited from class AbstractComponent

    DESIGN_ATTR_PLAIN_TEXT

    Fields inherited from interface Sizeable

    SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bindParameter(BindParameterContextValue contextValue, String propertyName, Object defaultValue)
    Informa ao componente os dados de bindagem contextual
    void
    bindParameter(String fieldId, String propertyName, Object defaultValue)
    Informa ao componente os dados de bindagem do parametro dinamico para o datasource
    void
    bindProperty(String fieldId, String propertyName)
    Informa ao componente os dados de bindagem da propriedade
     
    void
     
     
    Container.Indexed
     
    EventBus
     
    Coleta o contexto de execucao deste campo
    TextField
     
    TextField
     
     
    Informa ao sistema a lista de campos que o componente deseja ouvir.
     
     
    Class<? extends Object>
     
    protected void
     
    protected Component
     
    boolean
     
    boolean
    Retorna a configuracao de atualizacao automatica do componente
    void
    listen(String fieldKey, Field<?> field)
    Fornece a referencia ao campo concreto para ouvir alteracoes
    void
     
    void
    setEnabled(boolean enabled)
     
    void
    setEventBus(EventBus eventBus)
     
    void
    Configura o contexto de execuco do campo
    void
    setFieldId(String fieldId)
     
    void
    setFieldSearchByIdDefaultEnabled(boolean fieldSearchByIdDefaultEnabled)
     
    void
    setFieldType(Type fieldType)
     
    protected void
     
    void
    setLoadItemQuery(String loadItemQuery)
     
    void
    setQuery(Conexao conexao, ContextScript<ScriptQueryResolver> ctxQueryResolver, String columnId, String columnCaption)
     
    void
    setQuery(Conexao conexao, String sqlQuery, String columnId)
     
    void
    setQuery(Conexao conexao, String sqlQuery, String columnId, String columnCaption)
     
    void
    setQuery(Query query, String idItemId)
     
    void
    setQuery(Query query, String idItemId, String columnCaption)
     
    void
    setReadOnly(boolean readOnly)
     
    void
    setRefreshOnChange(boolean refreshOnChange)
    Determina se o campo deve ouvir alteracoes nos campos bindados e se atualizar automaticamente
    void
     
    void
     
    void
    setSearchWindowResizable(boolean resizable)
     
    void
     

    Methods inherited from class CustomField

    attach, getContent, getTabIndex, iterator, setFocusDelegate, setHeight, setTabIndex, setWidth

    Methods inherited from class 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, 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, setInvalidAllowed, setInvalidCommitted, setLocale, setPropertyDataSource, setRequired, setRequiredError, setValidationVisible, setValue, setValue, setValue, shouldHideErrors, validate, validate, valueChange, writeDesign

    Methods inherited from class AbstractLegacyComponent

    getExplicitImmediateValue, isImmediate, setImmediate

    Methods inherited from class 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, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthFull, setWidthUndefined

    Methods inherited from class 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 Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface Action.ShortcutNotifier

    addShortcutListener, removeShortcutListener

    Methods inherited from interface Buffered

    commit, discard, isBuffered, isModified, setBuffered

    Methods inherited from interface BufferedValidatable

    isInvalidCommitted, setInvalidCommitted

    Methods inherited from interface 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 Component

    addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible, writeDesign

    Methods inherited from interface Component.Focusable

    getTabIndex, setTabIndex

    Methods inherited from interface Connector

    getConnectorId

    Methods inherited from interface Field

    clear, getRequiredError, isEmpty, isRequired, setRequired, setRequiredError

    Methods inherited from interface Iterable

    forEach, spliterator

    Methods inherited from interface Property

    getValue, isReadOnly, setValue

    Methods inherited from interface Property.ValueChangeListener

    valueChange

    Methods inherited from interface Property.ValueChangeNotifier

    addListener, addValueChangeListener, removeListener, removeValueChangeListener

    Methods inherited from interface Property.Viewer

    getPropertyDataSource, setPropertyDataSource

    Methods inherited from interface Sizeable

    getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined

    Methods inherited from interface Validatable

    addValidator, getValidators, isInvalidAllowed, isValid, removeAllValidators, removeValidator, setInvalidAllowed, validate
  • Constructor Details

    • DBSearchField

      public DBSearchField()
  • Method Details

    • getEventBus

      public EventBus getEventBus()
    • setEventBus

      public void setEventBus(EventBus eventBus)
    • setConexaoService

      @Autowired public void setConexaoService(ConexaoService conexaoService)
    • setSearchPresenter

      @Autowired public void setSearchPresenter(DBSearchPresenter searchPresenter)
    • getSearchPresenter

      public DBSearchPresenter getSearchPresenter()
    • setFieldId

      public void setFieldId(String fieldId)
    • getContainerDataSource

      public Container.Indexed getContainerDataSource()
    • setQuery

      public void setQuery(Query query, String idItemId)
    • setQuery

      public void setQuery(Query query, String idItemId, String columnCaption)
    • setQuery

      public void setQuery(Conexao conexao, String sqlQuery, String columnId)
    • setQuery

      public void setQuery(Conexao conexao, String sqlQuery, String columnId, String columnCaption)
    • setQuery

      public void setQuery(Conexao conexao, ContextScript<ScriptQueryResolver> ctxQueryResolver, String columnId, String columnCaption)
    • getLoadItemQuery

      public String getLoadItemQuery()
    • setLoadItemQuery

      public void setLoadItemQuery(String loadItemQuery)
    • initContent

      protected Component initContent()
      Specified by:
      initContent in class CustomField<Object>
    • init

      @PostConstruct protected void init()
    • getFieldSearchById

      public TextField getFieldSearchById()
    • getFieldPropertyDisplay

      public TextField getFieldPropertyDisplay()
    • setFieldSearchByIdDefaultEnabled

      public void setFieldSearchByIdDefaultEnabled(boolean fieldSearchByIdDefaultEnabled)
    • isFieldSearchByIdDefaultEnabled

      public boolean isFieldSearchByIdDefaultEnabled()
    • getType

      public Class<? extends Object> getType()
      Specified by:
      getType in interface Property<Object>
      Specified by:
      getType in class AbstractField<Object>
    • focus

      public void focus()
      Specified by:
      focus in interface Component.Focusable
      Overrides:
      focus in class CustomField<Object>
    • setSearchWindowWidth

      public void setSearchWindowWidth(String width)
    • setSearchWindowHeight

      public void setSearchWindowHeight(String height)
    • setSearchWindowResizable

      public void setSearchWindowResizable(boolean resizable)
    • setInternalValue

      protected void setInternalValue(Object newValue)
      Overrides:
      setInternalValue in class AbstractField<Object>
    • setEnabled

      public void setEnabled(boolean enabled)
      Specified by:
      setEnabled in interface Component
      Overrides:
      setEnabled in class AbstractComponent
    • setReadOnly

      public void setReadOnly(boolean readOnly)
      Specified by:
      setReadOnly in interface Property<Object>
      Overrides:
      setReadOnly in class AbstractField<Object>
    • getFieldType

      public Type getFieldType()
    • setFieldType

      public void setFieldType(Type fieldType)
    • convertValue

      public Object convertValue(Object source)
    • setExecutionContext

      public void setExecutionContext(ExecutionContext context)
      Description copied from interface: ExecutionContextAware
      Configura o contexto de execuco do campo
      Specified by:
      setExecutionContext in interface ExecutionContextAware
      Parameters:
      context -
    • getExecutionContext

      public ExecutionContext getExecutionContext()
      Description copied from interface: ExecutionContextAware
      Coleta o contexto de execucao deste campo
      Specified by:
      getExecutionContext in interface ExecutionContextAware
      Returns:
    • getListenFields

      public Collection<String> getListenFields()
      Description copied from interface: ListenerField
      Informa ao sistema a lista de campos que o componente deseja ouvir. Apos coletar essa informacao, o consumidor da fabrica de componentes deve localizar os campos necessarios, e invocar o metodo "listen".
      Specified by:
      getListenFields in interface ListenerField<Object>
      Returns:
    • bindProperty

      public void bindProperty(String fieldId, String propertyName)
      Description copied from interface: DBMultiBindField
      Informa ao componente os dados de bindagem da propriedade
      Specified by:
      bindProperty in interface DBMultiBindField
      Parameters:
      fieldId -
      propertyName -
    • bindParameter

      public void bindParameter(String fieldId, String propertyName, Object defaultValue)
      Description copied from interface: DBMultiBindField
      Informa ao componente os dados de bindagem do parametro dinamico para o datasource
      Specified by:
      bindParameter in interface DBMultiBindField
      Parameters:
      fieldId -
      propertyName -
      defaultValue -
    • bindParameter

      public void bindParameter(BindParameterContextValue contextValue, String propertyName, Object defaultValue)
      Description copied from interface: DBMultiBindField
      Informa ao componente os dados de bindagem contextual
      Specified by:
      bindParameter in interface DBMultiBindField
      Parameters:
      contextValue -
      propertyName -
      defaultValue -
    • setRefreshOnChange

      public void setRefreshOnChange(boolean refreshOnChange)
      Description copied from interface: DBMultiBindField
      Determina se o campo deve ouvir alteracoes nos campos bindados e se atualizar automaticamente
      Specified by:
      setRefreshOnChange in interface DBMultiBindField
      Parameters:
      refreshOnChange -
    • isRefreshOnChante

      public boolean isRefreshOnChante()
      Description copied from interface: DBMultiBindField
      Retorna a configuracao de atualizacao automatica do componente
      Specified by:
      isRefreshOnChante in interface DBMultiBindField
      Returns:
    • listen

      public void listen(String fieldKey, Field<?> field)
      Description copied from interface: ListenerField
      Fornece a referencia ao campo concreto para ouvir alteracoes
      Specified by:
      listen in interface ListenerField<Object>
      Parameters:
      fieldKey -
      field -
    • getCaptionValue

      public String getCaptionValue()
      Specified by:
      getCaptionValue in interface CaptionField