Class DefaultPdoEditor<T extends PersistentDomainObject<T>>

    • Constructor Detail

      • DefaultPdoEditor

        public DefaultPdoEditor​(Class<T> pdoClass,
                                ResourceBundle bundle)
        Creates the default editor from a pdo class.
        Parameters:
        pdoClass - the PDO class
        bundle - the optional resource bundle
    • Method Detail

      • getPdoClass

        public Class<T> getPdoClass()
        Gets the PDO class.
        Returns:
        the PDO class
      • getBundle

        public ResourceBundle getBundle()
        Gets the optional resource bundle.
        Returns:
        null if none
      • getPdo

        public T getPdo()
      • setPdo

        public void setPdo​(T pdo)
        Description copied from interface: PdoController
        Sets the PDO.
        Parameters:
        pdo - the pdo
      • getValidationPath

        public String getValidationPath()
        Description copied from class: PdoEditor
        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.
        Overrides:
        getValidationPath in class PdoEditor<T extends PersistentDomainObject<T>>
        Returns:
        the validation root path, default is null
        See Also:
        PdoEditor.getValidationMappers()
      • getFirstFocusableNode

        protected FxComponent getFirstFocusableNode​(Map<PdoMember,​FxComponent> nodes)
        Gets the first focusable node.
        Parameters:
        nodes - the nodes map
        Returns:
        the node, null if none
      • createNode

        protected FxComponent createNode​(PdoMember attribute)
        Creates an FX node for a given PDO attribute.
        Attributes must be bindable.
        Parameters:
        attribute - the PDO attribute
        Returns:
        the node, null if skip attribute
        See Also:
        Bindable
      • bind

        protected void bind​(org.tentackle.bind.BindingMember parent,
                            PdoMember attribute,
                            FxComponent node,
                            String bindingOptions)
        Binds the node to the PDO member.
        Parameters:
        parent - the PDO parent binding member
        attribute - the PDO attribute
        node - the FX node
        bindingOptions - the binding options
      • createNodeMap

        protected Map<PdoMember,​FxComponent> createNodeMap()
        Creates a map of attributes to nodes.
        Returns:
        the node map
      • createView

        protected javafx.scene.Parent createView​(Map<PdoMember,​FxComponent> nodes)
        Creates a view from the nodes map.
        Parameters:
        nodes - the nodes map
        Returns:
        the view
      • createLabel

        protected javafx.scene.control.Label createLabel​(PdoMember attribute)
        Creates the label.
        Parameters:
        attribute - the pdo member
        Returns:
        the label node