Class LiveComponent

  • All Implemented Interfaces:, ConstProperties, DebuggableObject, Scriptable

    public class LiveComponent
    extends ScriptableObject
    A class to implement naked references in JavaScript. This class is a proxy for all naked references in XFA.

    Instances of this class are registered as global objects such that any naked reference, including JavaScript variables, is first processed by the get method of this class.

    See Also:
    Serialized Form
    • Constructor Detail

      • LiveComponent

        public LiveComponent​(RhinoScriptHandler handler,
                             Obj xfaObject)
        Instantiates a LiveComponent object. The lone constructor used by this package to create instances of this class.
        handler - a Rhino script handler.
        xfaObject - the XFA object associated with this component. Typically this is the application model.
    • Method Detail

      • jsConstructor

        public void jsConstructor​(java.lang.Object handler,
                                  Obj object)
        Defines the JavaScript constructor to Rhino.

        This method is required by the Scriptable interface and must mirror the signature of the class constructor.

        handler - a Rhino script handler.
        object - the XFA object associated with this component.
      • getClassName

        public java.lang.String getClassName()
        Gets the name of the set of objects implemented by this class.

        This method is required by the Scriptable interface.

        Specified by:
        getClassName in interface Scriptable
        Specified by:
        getClassName in class ScriptableObject
      • get

        public java.lang.Object get​(java.lang.String name,
                                    Scriptable start)
        Gets the value of the named property of this object.
        Specified by:
        get in interface Scriptable
        get in class ScriptableObject
        name - the name of the property.
        start - the object in which the lookup began.
        the value of the property, or NOT_FOUND if the property is not xfa nor a naked reference to an XFA property.
        EvaluatorException - whenever an ExFull was thrown while getting the XFA property.
        See Also: