public abstract class BaseScriptComponent extends BaseSourcedComponent
| Modifier and Type | Class and Description |
|---|---|
static class |
BaseScriptComponent.ExecutionMode
Controls timing of script execution.
|
BaseComponent.ComponentReference<T extends BaseComponent>, BaseComponent.SubComponentlog| Modifier | Constructor and Description |
|---|---|
protected |
BaseScriptComponent(boolean contentSynced) |
protected |
BaseScriptComponent(String content,
boolean contentSynced) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Object |
_execute(Map<String,Object> variables) |
Object |
execute()
Execute the script with the default variable values.
|
Object |
execute(Map<String,Object> variables)
Execute the script with the specified variable values.
|
boolean |
getIncludeNamedComponents()
If true, any named components within the namespace occupied by "self" will be passed as
arguments to the script.
|
BaseScriptComponent.ExecutionMode |
getMode()
Returns the
execution mode. |
BaseComponent |
getSelf()
Returns the component referenced by the script language's "self" variable.
|
String |
getSelfName()
Returns the script language's variable name corresponding to "this".
|
protected void |
onAttach(Page page)
Triggers script execution.
|
void |
setIncludeNamedComponents(boolean includeNamedComponents)
If true, any named components within the namespace occupied by "self" will be passed as
arguments to the script.
|
void |
setMode(BaseScriptComponent.ExecutionMode mode)
Sets the
execution mode. |
void |
setSelf(BaseComponent self)
Sets the component to be referenced by the script language's "self" variable.
|
getSrc, setContent, setSrc_attach, _initProps, addChild, addChild, addChild, addChildren, addComposite, addEventForward, addEventForward, addEventForward, addEventForward, addEventListener, addEventListener, addEventListener, addEventListener, afterAddChild, afterRemoveChild, afterSetParent, areEqual, beforeAddChild, beforeRemoveChild, beforeSetParent, bind, bringToFront, defaultify, destroy, destroyChildren, detach, detachChildren, finalize, findAllNamed, findAttribute, findByName, findByName, findChildByData, findChildByLabel, fireEvent, fireEvent, fireEventToClient, fireEventToClient, getAncestor, getAncestor, getAttribute, getAttribute, getAttributes, getChild, getChildAt, getChildCount, getChildCount, getChildren, getChildren, getContent, getController, getControllers, getData, getData, getDefinition, getFirstChild, getId, getIndex, getLastChild, getLastController, getName, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, hasChildren, hasEventListener, hasEventListener, invoke, invoke, invoke, invoke, invoke, invokeIfAttached, isAncestor, isContainer, isContentSynced, isDead, isNamespace, isRendered, loadModule, loadModule, notifyAncestors, notifyDescendants, nullify, onDestroy, propertyChange, propertyChange, removeChild, removeEventForward, removeEventForward, removeEventForward, removeEventForward, removeEventListener, removeEventListener, removeEventListener, removeEventListener, setContentSynced, setData, setIndex, setName, setNamespace, setParent, sub, swapChildren, sync, toString, trimify, validate, validate, validateChild, validateIsChild, validateName, validatePage, validateParent, wireController, wireControllerclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waittransformForClientgetAttribute, hasAttribute, removeAttribute, setAttributeprotected BaseScriptComponent(boolean contentSynced)
protected BaseScriptComponent(String content, boolean contentSynced)
@Component.PropertyGetter(value="mode", description="The script\'s execution mode.") public BaseScriptComponent.ExecutionMode getMode()
execution mode.@Component.PropertySetter(value="mode", description="The script\'s execution mode.") public void setMode(BaseScriptComponent.ExecutionMode mode)
execution mode.mode - The execution mode.public String getSelfName()
@Component.PropertyGetter(value="self", description="The component to be referenced by the script language\'s \"self\" variable.") public BaseComponent getSelf()
execute(Map), that value will be used instead.@Component.PropertySetter(value="self", description="The component to be referenced by the script language\'s \"self\" variable.") public void setSelf(BaseComponent self)
execute(Map), that value will be
used instead.self - The component to be referenced by the script language's "self" variable.@Component.PropertyGetter(value="includeNamedComponents", description="If true, any named components within the namespace occupied by \"self\" will be passed as arguments to the script.") public boolean getIncludeNamedComponents()
@Component.PropertySetter(value="includeNamedComponents", defaultValue="true", description="If true, any named components within the namespace occupied by \"self\" will be passed as arguments to the script.") public void setIncludeNamedComponents(boolean includeNamedComponents)
includeNamedComponents - Set to true if named components are to be passed as arguments
to the script.public Object execute(Map<String,Object> variables)
variables - A mapped of named variable values.public Object execute()
protected void onAttach(Page page)
onAttach in class BaseComponentpage - The attached page.BaseComponent.onAttach(org.fujion.component.Page)Copyright © 2018 Fujion Framework. All rights reserved.