Class SaveAction

    • Constructor Detail

      • SaveAction

        public SaveAction()
    • Method Detail

      • execute

        public void execute()
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • updateView

        protected void updateView​(java.util.Map values,
                                  boolean resetAfter)
      • modify

        protected java.util.Map modify()
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • create

        protected java.util.Map create()
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getPropertiesToShowInEntityCreatedMessage

        protected java.util.Collection<java.lang.String> getPropertiesToShowInEntityCreatedMessage()
                                                                                            throws java.lang.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:
        java.lang.Exception
        Since:
        7.0.4
      • getValuesToSave

        protected java.util.Map getValuesToSave()
                                         throws java.lang.Exception
        Throws:
        java.lang.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