|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cabo.ui.DeprecatedUINode | +--oracle.cabo.ui.BaseUINode | +--oracle.cabo.ui.BaseMutableUINode | +--oracle.cabo.ui.beans.BaseWebBean | +--oracle.cabo.ui.beans.MarlinBean | +--oracle.cabo.ui.beans.ScriptBean
The script bean supports both the importing of libraries and inline scripts. This class is derived from MarlinBean for backwards-compatibility only. The only methods supported are those found on BaseMutableUINode. On pages targeted to mobile devices, scripts should only be used to enhance the user experience, not to provide correct behavior, because not all mobile devices support scripting.
Example of a simple Javascript function script.
<script> <contents> function doubleIt() { var proxy = new TableProxy('table1'); var currTextField = proxy.getFormElement('numbers', 0); var dbl = 2 * (currTextField.value - 0); proxy._form.doubleField.value = dbl; } </contents> </script>
Almost the same example, but using the text attribute.
<script text="function doubleOrTriple() { var p = new TableProxy('table1'); var c = p.getFormElement('numbers', 0); var t = (c.value - 0); if (t < 10) { t *= 2 } else { t *= 3} p._form.newValueField.value = t; }"/>
It does not support any children.
Constructor Summary | |
|
ScriptBean()
Construct an instance of the ScriptBean. |
protected |
ScriptBean(boolean ignored,
java.lang.String localName)
Construct an instance of the ScriptBean. |
Method Summary | |
java.lang.String |
getSource()
Gets the URI of a script library to import. |
static java.lang.String |
getSource(MutableUINode bean)
Gets the URI of a script library to import. |
java.lang.String |
getText()
Gets the inline script |
static java.lang.String |
getText(MutableUINode bean)
Gets the inline script |
boolean |
isGeneratesContent()
Gets if the script generates content using document.write() or document.writeln(), set this to true. |
static boolean |
isGeneratesContent(MutableUINode bean)
Gets if the script generates content using document.write() or document.writeln(), set this to true. |
void |
setGeneratesContent(boolean generatesContent)
Sets if the script generates content using document.write() or document.writeln(), set this to true. |
static void |
setGeneratesContent(MutableUINode bean,
boolean generatesContent)
Sets if the script generates content using document.write() or document.writeln(), set this to true. |
static void |
setSource(MutableUINode bean,
java.lang.String source)
Sets the URI of a script library to import. |
void |
setSource(java.lang.String source)
Sets the URI of a script library to import. |
static void |
setText(MutableUINode bean,
java.lang.String text)
Sets the inline script |
void |
setText(java.lang.String text)
Sets the inline script |
Methods inherited from class oracle.cabo.ui.beans.MarlinBean |
isEqualMarlinName |
Methods inherited from class oracle.cabo.ui.BaseUINode |
getAttributeNames, getAttributeValue, getAttributeValueImpl, getChildArray, getChildNames, getIndexedChild, getIndexedChild, getIndexedChildCount, getLocalName, getNamedChild, getNamespaceURI, getNodeID, getNodeRole, getPreorderDescendentAttributeValue, getRawAttributeValue, getRenderedUINode, getRenderer, getRenderer, render, render, toString |
Methods inherited from class oracle.cabo.ui.DeprecatedUINode |
getAttributeValue, getChildNames, getNamedChild |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.cabo.ui.UINode |
getAttributeNames, getAttributeValue, getAttributeValue, getChildNames, getChildNames, getIndexedChild, getIndexedChild, getIndexedChildCount, getLocalName, getNamedChild, getNamedChild, getNamespaceURI, getNodeID, getNodeRole, getRawAttributeValue, render, render |
Constructor Detail |
public ScriptBean()
protected ScriptBean(boolean ignored, java.lang.String localName)
Method Detail |
public final java.lang.String getText()
public final void setText(java.lang.String text)
public final java.lang.String getSource()
public final void setSource(java.lang.String source)
public final boolean isGeneratesContent()
public final void setGeneratesContent(boolean generatesContent)
public static java.lang.String getText(MutableUINode bean)
public static void setText(MutableUINode bean, java.lang.String text)
public static java.lang.String getSource(MutableUINode bean)
public static void setSource(MutableUINode bean, java.lang.String source)
public static boolean isGeneratesContent(MutableUINode bean)
public static void setGeneratesContent(MutableUINode bean, boolean generatesContent)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |