org.apache.cocoon.forms.flow.javascript.v3
Class ScriptableWidget

java.lang.Object
  extended byorg.mozilla.javascript.ScriptableObject
      extended byorg.apache.cocoon.forms.flow.javascript.v3.ScriptableWidget
All Implemented Interfaces:
ActionListener, org.mozilla.javascript.debug.DebuggableObject, EventListener, org.mozilla.javascript.Scriptable, Serializable, ValueChangedListener, WidgetListener, WidgetValidator

public class ScriptableWidget
extends org.mozilla.javascript.ScriptableObject
implements ValueChangedListener, ActionListener, WidgetValidator

Version:
$Id: ScriptableWidget.java 161264 2005-04-14 12:32:26Z sylvain $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
DONTENUM, EMPTY, PERMANENT, READONLY
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
ScriptableWidget()
           
ScriptableWidget(Object widget)
           
 
Method Summary
 void actionPerformed(ActionEvent event)
           
 void delete(int index)
           
 Object get(int index, org.mozilla.javascript.Scriptable start)
           
 Object get(String id, org.mozilla.javascript.Scriptable start)
           
 Object[] getAllIds()
           
 String getClassName()
           
 Object[] getIds()
           
 boolean has(int index, org.mozilla.javascript.Scriptable start)
           
 boolean has(String id, org.mozilla.javascript.Scriptable start)
           
 ScriptableWidget jsFunction_addRow()
           
 boolean jsFunction_equals(Object other)
           
 Object jsFunction_getAttribute(String jsname)
           
 ScriptableWidget jsFunction_getForm()
           
 String jsFunction_getId()
           
 Object jsFunction_getParent()
           
 String jsFunction_getRequestParameterName()
           
 org.mozilla.javascript.ScriptableObject jsFunction_getRow(int index)
           
 ScriptableWidget jsFunction_getSubmitWidget()
           
 Object jsFunction_getValue()
           
 String jsFunction_getWidgetClass()
           
 boolean jsFunction_isRequired()
           
 ScriptableWidget jsFunction_lookupWidget(String id)
           
 void jsFunction_removeAttribute(String name)
           
 void jsFunction_removeRow(Object obj)
           
 void jsFunction_setAttribute(String name, Object value)
           
 void jsFunction_setSelectionList(Object arg, Object valuePathArg, Object labelPathArg)
           
 void jsFunction_setValidationError(Object message, Object parameters)
           
 void jsFunction_setValue(Object value)
           
 String jsFunction_toString()
           
 Widget jsFunction_unwrap()
           
 Object jsGet_length()
           
 Object jsGet_onActivate()
           
 Object jsGet_onChange()
           
 WidgetState jsGet_state()
           
 Object jsGet_validator()
           
 Object jsGet_value()
           
 void jsSet_length(int len)
           
 void jsSet_onActivate(Object value)
           
 void jsSet_onChange(Object value)
           
 void jsSet_state(Object stateObj)
           
 void jsSet_validator(Object value)
           
 void jsSet_value(Object value)
           
 boolean validate(Widget widget)
          Validate a widget.
 void valueChanged(ValueChangedEvent event)
           
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, callMethod, callMethod, defineClass, defineClass, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, equivalentValues, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, hasInstance, hasProperty, hasProperty, isSealed, put, put, putProperty, putProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptableWidget

public ScriptableWidget()

ScriptableWidget

public ScriptableWidget(Object widget)
Method Detail

getClassName

public String getClassName()
Specified by:
getClassName in interface org.mozilla.javascript.Scriptable

has

public boolean has(String id,
                   org.mozilla.javascript.Scriptable start)
Specified by:
has in interface org.mozilla.javascript.Scriptable

has

public boolean has(int index,
                   org.mozilla.javascript.Scriptable start)
Specified by:
has in interface org.mozilla.javascript.Scriptable

get

public Object get(String id,
                  org.mozilla.javascript.Scriptable start)
Specified by:
get in interface org.mozilla.javascript.Scriptable

get

public Object get(int index,
                  org.mozilla.javascript.Scriptable start)
Specified by:
get in interface org.mozilla.javascript.Scriptable

getAllIds

public Object[] getAllIds()
Specified by:
getAllIds in interface org.mozilla.javascript.debug.DebuggableObject

getIds

public Object[] getIds()
Specified by:
getIds in interface org.mozilla.javascript.Scriptable

delete

public void delete(int index)
Specified by:
delete in interface org.mozilla.javascript.Scriptable

jsGet_value

public Object jsGet_value()

jsFunction_getValue

public Object jsFunction_getValue()

jsFunction_setValue

public void jsFunction_setValue(Object value)
                         throws org.mozilla.javascript.JavaScriptException
Throws:
org.mozilla.javascript.JavaScriptException

jsSet_length

public void jsSet_length(int len)

jsGet_length

public Object jsGet_length()

jsSet_value

public void jsSet_value(Object value)
                 throws org.mozilla.javascript.JavaScriptException
Throws:
org.mozilla.javascript.JavaScriptException

jsFunction_getId

public String jsFunction_getId()

jsGet_state

public WidgetState jsGet_state()

jsSet_state

public void jsSet_state(Object stateObj)

jsFunction_getSubmitWidget

public ScriptableWidget jsFunction_getSubmitWidget()

jsFunction_getRequestParameterName

public String jsFunction_getRequestParameterName()

jsFunction_getParent

public Object jsFunction_getParent()

jsFunction_isRequired

public boolean jsFunction_isRequired()

jsFunction_getForm

public ScriptableWidget jsFunction_getForm()

jsFunction_equals

public boolean jsFunction_equals(Object other)

jsFunction_lookupWidget

public ScriptableWidget jsFunction_lookupWidget(String id)

jsFunction_setValidationError

public void jsFunction_setValidationError(Object message,
                                          Object parameters)

jsFunction_setAttribute

public void jsFunction_setAttribute(String name,
                                    Object value)

jsFunction_getAttribute

public Object jsFunction_getAttribute(String jsname)

jsFunction_removeAttribute

public void jsFunction_removeAttribute(String name)

jsFunction_unwrap

public Widget jsFunction_unwrap()

jsFunction_addRow

public ScriptableWidget jsFunction_addRow()

jsFunction_getRow

public org.mozilla.javascript.ScriptableObject jsFunction_getRow(int index)

jsFunction_removeRow

public void jsFunction_removeRow(Object obj)
                          throws org.mozilla.javascript.JavaScriptException
Throws:
org.mozilla.javascript.JavaScriptException

jsGet_onChange

public Object jsGet_onChange()

jsGet_onActivate

public Object jsGet_onActivate()

jsSet_onChange

public void jsSet_onChange(Object value)

jsSet_onActivate

public void jsSet_onActivate(Object value)

valueChanged

public void valueChanged(ValueChangedEvent event)
Specified by:
valueChanged in interface ValueChangedListener

actionPerformed

public void actionPerformed(ActionEvent event)
Specified by:
actionPerformed in interface ActionListener

jsGet_validator

public Object jsGet_validator()

jsSet_validator

public void jsSet_validator(Object value)

validate

public boolean validate(Widget widget)
Description copied from interface: WidgetValidator
Validate a widget.

Specified by:
validate in interface WidgetValidator
Parameters:
widget - the widget to validate
Returns:
true if validation was successful. If not, the validator must have set a ValidationError on the widget or one of its children.

jsFunction_setSelectionList

public void jsFunction_setSelectionList(Object arg,
                                        Object valuePathArg,
                                        Object labelPathArg)
                                 throws Exception
Throws:
Exception

jsFunction_getWidgetClass

public String jsFunction_getWidgetClass()

jsFunction_toString

public String jsFunction_toString()


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.