Class CtlInlineEditButton<T extends IUpdatable<?>>

java.lang.Object
com.axemble.vdp.ui.framework.foundation.Component
com.axemble.vdp.ui.framework.foundation.Widget
com.axemble.vdp.ui.framework.widgets.CtlAbstractAction
com.axemble.vdp.ui.framework.widgets.CtlImageButton
com.vdoc.sdk.commons.ui.widget.view.inline.edit.CtlInlineEditButton<T>
Type Parameters:
T - the type
All Implemented Interfaces:
IAnyActionListener, IWidget, IWritable, com.axemble.vdp.ui.framework.components.listeners.ActionListener, INamedWidget, com.axemble.vdp.utils.parameters.ParamsHandler, Serializable

public class CtlInlineEditButton<T extends IUpdatable<?>> extends com.axemble.vdp.ui.framework.widgets.CtlImageButton implements com.axemble.vdp.ui.framework.components.listeners.ActionListener
Inline edit button graphical component
Author:
famaridon
See Also:
  • Field Details

    • viewModelItem

      protected final com.axemble.vdp.ui.framework.composites.base.models.views.ViewModelItem viewModelItem
    • view

      protected final com.axemble.vdp.ui.framework.composites.base.CtlAbstractView view
    • inlineEditMode

      protected InlineEditMode inlineEditMode
    • defaultCss

      protected final String defaultCss
    • editImage

      protected final String editImage
    • saveImage

      protected final String saveImage
    • viewItemDefaultCss

      protected final String viewItemDefaultCss
    • scriptOnAfterValidateList

      protected List<String> scriptOnAfterValidateList
    • beforeEditingList

      protected List<IBeforeEditing> beforeEditingList
    • updateableListenerList

      protected List<UpdateableListener<T extends IUpdatable<?>>> updateableListenerList
    • updatable

      protected T extends IUpdatable<?> updatable
  • Constructor Details

    • CtlInlineEditButton

      public CtlInlineEditButton(String actionName, String editImage, T updatable, com.axemble.vdp.ui.framework.composites.base.models.views.ViewModelItem viewModelItem, com.axemble.vdp.ui.framework.composites.base.CtlAbstractView view, String defaultCss)
      Constructor
      Parameters:
      actionName - the action name
      editImage - the edit image
      updatable - the updatable
      viewModelItem - the view model item
      view - the view
      defaultCss - the default Css
    • CtlInlineEditButton

      public CtlInlineEditButton(String actionName, String editImage, String saveImage, T updatable, com.axemble.vdp.ui.framework.composites.base.models.views.ViewModelItem viewModelItem, com.axemble.vdp.ui.framework.composites.base.CtlAbstractView view, String defaultCss)
      Constructor
      Parameters:
      actionName - the action name
      editImage - the edit image
      saveImage - the save image
      updatable - the updatable
      viewModelItem - the view model item
      view - the view
      defaultCss - the default Css
  • Method Details

    • setInlineEditMode

      public void setInlineEditMode(InlineEditMode inlineEditMode)
      set inlineEditMode property
      Parameters:
      inlineEditMode - set the inlineEditMode property
    • render

      public IWritable render() throws RenderException
      Description copied from interface: IWidget
      Render the widget
      Specified by:
      render in interface IWidget
      Overrides:
      render in class com.axemble.vdp.ui.framework.widgets.CtlImageButton
      Returns:
      writableWidget
      Throws:
      RenderException
    • getInlineEditMode

      public InlineEditMode getInlineEditMode()
      get inlineEditMode property
      Returns:
      get the inlineEditMode property
    • switchTo

      public void switchTo(InlineEditMode inlineEditMode)
      Switch mode
      Parameters:
      inlineEditMode - the inline edit mode to switch to (read or write)
    • onClick

      public void onClick(com.axemble.vdp.ui.framework.components.events.ActionEvent actionevent)
      Specified by:
      onClick in interface com.axemble.vdp.ui.framework.components.listeners.ActionListener
    • cancel

      public void cancel()
      cancel edit mode, return to read value
    • updateValues

      protected <V> void updateValues() throws ValidationException
      Throws:
      ValidationException
    • addUpdateableListener

      public boolean addUpdateableListener(UpdateableListener<T> updatableListener)
      Add updatable listener
      Parameters:
      updatableListener - the listener
      Returns:
      true
    • addScriptOnAfterValidate

      public void addScriptOnAfterValidate(String script)
      Add script on after validate
      Parameters:
      script - the script
    • addBeforeEditing

      public void addBeforeEditing(IBeforeEditing beforeEditing)
      Add before editing
      Parameters:
      beforeEditing - the before editing action