Class PdoEditor<T extends PersistentDomainObject<T>>

    • Constructor Detail

      • PdoEditor

        public PdoEditor()
    • Method Detail

      • requestInitialFocus

        public abstract void requestInitialFocus()
        Requests the initial focus after stage is shown.
      • isViewAllowed

        public boolean isViewAllowed()
        Returns whether the user has sufficient permissions to view the PDO.
        Returns:
        true if allowed
      • isEditAllowed

        public boolean isEditAllowed()
        Returns whether the user has sufficient permissions to edit the PDO.
        Returns:
        true if allowed
      • isRemoveAllowed

        public boolean isRemoveAllowed()
        Returns whether the user is allowed to edit the PDO and the PDO is removable.
        Returns:
        true if remove allowed
      • isNewAllowed

        public boolean isNewAllowed()
        Returns whether the user is allowed to create a new PDO.
        Returns:
        true if creation allowed
      • getValidationPath

        public String getValidationPath()
        Gets the validation root path.
        By default, the server returns validation results with a validation path that starts with the entity baseclassname (the first character in lowercase). If the bound PDO variable of the editor uses a different name, a ValidationMapper is necessary to map the results back to the form.
        This method is provided to reduce the amount of application code.
        Returns:
        the validation root path, default is null
        See Also:
        getValidationMappers()
      • getValidationMappers

        public NavigableSet<org.tentackle.validate.ValidationMapper> getValidationMappers()
        Gets the validation mappers to map the validation results to the controls.
        If getValidationPath() returns a non-null value, a set with a default mapper will be created.
        Returns:
        the mappers, null if none
      • validateForm

        public boolean validateForm()
        Validates the form before the PDO get saved.
        This can be used for validations that are not covered by the persistence model, for example password confirmation.
        Returns:
        true if ok
      • print

        public void print()
        Prints the current PDO.
      • setChangeable

        public void setChangeable​(boolean changeable)
        Set the changeable property of the editor's view.
        Parameters:
        changeable - true if changeable
      • isChangeable

        public boolean isChangeable()
        Get the changeable property of the editor's view.
        Returns:
        true if changeable