Class FormDataListener

  • All Implemented Interfaces:

    public class FormDataListener
    extends Obj
    FormDataListener manages the mapping (i.e., binding) between an Element in the FormModel and its corresponding DataNode in the DataModel. An Element and DataNode that are bound will each be peered to a FormDataListener.
    • Constructor Detail

      • FormDataListener

        public FormDataListener​(Element formNode,
                                DataNode dataNode)
    • Method Detail

      • getDataNode

        public DataNode getDataNode()
        Gets the DataNode associated with this mapping.
        the DataNode associated with this mapping.
      • getFormNode

        public Element getFormNode()
        Gets the form Element associated with this mapping.
        the form Element associated with this mapping.
      • setDataNode

        public void setDataNode​(DataNode newDataNode)
      • isMapped

        public static boolean isMapped​(DataNode dataNode)
        Determines whether a DataNode is currently mapped (i.e., bound) to a form node.
        dataNode -
        true if dataNode is currently mapped to a form node.
      • isFieldValueChange

        public boolean isFieldValueChange​(Object peerNode,
                                          int eventType,
                                          String arg1,
                                          Object arg2)
      • updateFromPeer

        public void updateFromPeer​(Object peerNode,
                                   int eventType,
                                   String arg1,
                                   Object arg2)
        Description copied from interface: Peer
        This method will be called by the peer whenever its state changes.
         eventType                        (String)arg1  (Object)arg2
         UPDATED                          update type   (optional)
         ATTR_CHANGED                     attr name     (optional)
         CHILD_ADDED                      (optional)    added node
         CHILD_REMOVED                    (optional)    removed node
         VALUE_CHANGED                    new data      (optional)
         PARENT_CHANGED                   (optional)    new parent
         DESCENDENT_ATTR_CHANGED          attr name     changed node
         DESCENDENT_VALUE_CHANGED         (optional)    changed node
         DESCENDENT_ADDED                 (optional)    added node
         DESCENDENT_REMOVED               (optional)    removed node
         PERMS_LOCK_SET                   (optional)    (optional)
         PERMS_LOCK_CLEARED               (optional)    (optional)
         PROTO_ATTR_CHANGED               attr name     changed node
         PROTO_CHILD_ADDED                (optional)    added node of the protoype
         PROTO_CHILD_REMOVED              (optional)    removed node from the prototype
         PROTO_VALUE_CHANGED              new data      prototype node
         PROTO_DESCENDENT_ATTR_CHANGED    attr name     changed prototype node
         PROTO_DESCENDENT_VALUE_CHANGED   (optional)    changed prototype node
         PROTO_DESCENDENT_ADDED           (optional)    added node to the prototype
         PROTO_DESCENDENT_REMOVED         (optional)    removed node from the prototype
        Specified by:
        updateFromPeer in interface Peer
        updateFromPeer in class Obj
        peerNode - the peer to this object.
        eventType - the event type as enumerated in this class
        arg1 - additional event information
        arg2 - additional event information
      • peerRemoved

        public void peerRemoved​(Peer peer)
        Description copied from interface: Peer
        Called when this Peer is removed from peer. Derived classes can override this method to receive direct notifications when a peer is removed.
        Specified by:
        peerRemoved in interface Peer
        peerRemoved in class Obj
        peer - the Peer from which this Peer has been removed from notification.
      • getClassName

        public String getClassName()
        Description copied from class: Obj
        Gets the name of this object's class. Overriden by derived classes such as Element that have a local name that may be returned instead.
        getClassName in class Obj
        the class name.
      • getClassAtom

        public String getClassAtom()
        Description copied from class: Obj
        Returns the atomic name of this element's class.
        getClassAtom in class Obj
        the class name as an interned string.