Class SaveAction

All Implemented Interfaces:
IAction, IChangeModeAction, IModuleContextAction, IRequestAction

public class SaveAction extends TabBaseAction
Author:
Javier Paniza
  • Constructor Details

    • SaveAction

      public SaveAction()
  • Method Details

    • execute

      public void execute() throws Exception
      Throws:
      Exception
    • updateView

      protected void updateView(Map values, boolean resetAfter)
    • modify

      protected Map modify() throws Exception
      Throws:
      Exception
    • create

      protected Map create() throws Exception
      Throws:
      Exception
    • getPropertiesToShowInEntityCreatedMessage

      protected Collection<String> getPropertiesToShowInEntityCreatedMessage() throws Exception
      Properties which values will display at the end of the message "{Entity} created successfully".
      Displaying the key in the message does not always apply. The default implementation is pretty good, but you can overwrite this method to define your own properties or just return null to not show any property.
      Returns:
      The properties to show or null to not show any property
      Throws:
      Exception
      Since:
      7.0.4
    • getValuesToSave

      protected Map getValuesToSave() throws Exception
      Throws:
      Exception
    • isResetAfter

      public boolean isResetAfter()
      If true reset the form after save, else refresh the form from database displayed the recently saved data.

      The default value is true.

    • setResetAfter

      public void setResetAfter(boolean b)
      If true reset the form after save, else refresh the form from database displayed the recently saved data.

      The default value is true.

    • isRefreshAfter

      public boolean isRefreshAfter()
      If false after save does not refresh the form from database.

      It only has effect if resetAfter is false. The default value is true.

      Since:
      4.8
    • setRefreshAfter

      public void setRefreshAfter(boolean refreshAfter)
      If false after save does not refresh the form from database.

      It only has effect if resetAfter is false. The default value is true.

      Since:
      4.8
    • isResetAfterOnCreate

      public boolean isResetAfterOnCreate()
      If true reset the form after save for creating, else refresh the form from database displayed the recently saved data.

      The default value is true.

      Since:
      5.8
    • setResetAfterOnCreate

      public void setResetAfterOnCreate(boolean resetAfterOnCreate)
      If true reset the form after save for creating, else refresh the form from database displayed the recently saved data.

      The default value is true.

      Since:
      5.8
    • isResetAfterOnModify

      public boolean isResetAfterOnModify()
      If true reset the form after save for modifying, else refresh the form from database displayed the recently saved data.

      The default value is true.

      Since:
      5.8
    • setResetAfterOnModify

      public void setResetAfterOnModify(boolean resetAfterOnModify)
      If true reset the form after save for modifying, else refresh the form from database displayed the recently saved data.

      The default value is true.

      Since:
      5.8