Class LiveComponent
- java.lang.Object
-
- org.mozilla.javascript.ScriptableObject
-
- com.adobe.xfa.scripthandler.rhino.LiveComponent
-
- All Implemented Interfaces:
java.io.Serializable
,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
-
-
Field Summary
-
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
-
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
-
-
Constructor Summary
Constructors Constructor Description LiveComponent(RhinoScriptHandler handler, Obj xfaObject)
Instantiates a LiveComponent object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
get(java.lang.String name, Scriptable start)
Gets the value of the named property of this object.java.lang.String
getClassName()
Gets the name of the set of objects implemented by this class.static java.lang.Object
invoke(Context cx, Scriptable obj, java.lang.Object[] args, Function func)
void
jsConstructor(java.lang.Object handler, Obj object)
Defines the JavaScript constructor to Rhino.void
put(java.lang.String name, Scriptable start, java.lang.Object value)
Puts the value of the named property of the start object.-
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasInstance, hasProperty, hasProperty, isConst, isEmpty, isExtensible, isSealed, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
-
-
-
-
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.- Parameters:
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.
- Parameters:
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 interfaceScriptable
- Specified by:
getClassName
in classScriptableObject
-
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 interfaceScriptable
- Overrides:
get
in classScriptableObject
- Parameters:
name
- the name of the property.start
- the object in which the lookup began.- Returns:
- the value of the property, or NOT_FOUND if the property is not xfa nor a naked reference to an XFA property.
- Throws:
EvaluatorException
- whenever an ExFull was thrown while getting the XFA property.- See Also:
Context.getUndefinedValue()
-
put
public void put(java.lang.String name, Scriptable start, java.lang.Object value)
Puts the value of the named property of the start object.This method may (or not) set the property in the start object.
- Specified by:
put
in interfaceScriptable
- Overrides:
put
in classScriptableObject
- Parameters:
name
- the name of the property.start
- the object whose property is being set.value
- the value to set the property to.- See Also:
Scriptable.has(String, Scriptable)
,Scriptable.get(String, Scriptable)
,ScriptableObject.putProperty(Scriptable, String, Object)
,Context.toObject(Object, Scriptable)
-
invoke
public static java.lang.Object invoke(Context cx, Scriptable obj, java.lang.Object[] args, Function func)
-
-