|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.araneaframework.core.BaseComponent
org.araneaframework.core.BaseService
org.araneaframework.core.BaseWidget
org.araneaframework.core.BaseApplicationWidget
public class BaseApplicationWidget
A full featured Widget with support for composite, eventlisteners, viewmodel.
| Nested Class Summary | |
|---|---|
protected class |
BaseApplicationWidget.CompositeImpl
|
protected class |
BaseApplicationWidget.ViewableImpl
|
class |
BaseApplicationWidget.ViewModel
|
| Nested classes/interfaces inherited from class org.araneaframework.core.BaseWidget |
|---|
BaseWidget.WidgetImpl |
| Nested classes/interfaces inherited from class org.araneaframework.core.BaseService |
|---|
BaseService.ServiceImpl |
| Nested classes/interfaces inherited from class org.araneaframework.core.BaseComponent |
|---|
BaseComponent.ComponentImpl |
| Nested classes/interfaces inherited from interface org.araneaframework.core.ApplicationWidget |
|---|
ApplicationWidget.WidgetViewModel |
| Nested classes/interfaces inherited from interface org.araneaframework.core.ApplicationService |
|---|
ApplicationService.ServiceViewModel |
| Nested classes/interfaces inherited from interface org.araneaframework.core.ApplicationComponent |
|---|
ApplicationComponent.ComponentViewModel |
| Nested classes/interfaces inherited from interface org.araneaframework.Composite |
|---|
Composite.CompositeComponent, Composite.CompositeService, Composite.CompositeWidget |
| Nested classes/interfaces inherited from interface org.araneaframework.Viewable |
|---|
Viewable.ViewableComponent, Viewable.ViewableService, Viewable.ViewableWidget |
| Nested classes/interfaces inherited from interface org.araneaframework.Composite |
|---|
Composite.CompositeComponent, Composite.CompositeService, Composite.CompositeWidget |
| Nested classes/interfaces inherited from interface org.araneaframework.Viewable |
|---|
Viewable.ViewableComponent, Viewable.ViewableService, Viewable.ViewableWidget |
| Nested classes/interfaces inherited from interface org.araneaframework.Widget |
|---|
Widget.Interface |
| Nested classes/interfaces inherited from interface org.araneaframework.Composite |
|---|
Composite.CompositeComponent, Composite.CompositeService, Composite.CompositeWidget |
| Nested classes/interfaces inherited from interface org.araneaframework.Widget |
|---|
Widget.Interface |
| Nested classes/interfaces inherited from interface org.araneaframework.Viewable |
|---|
Viewable.ViewableComponent, Viewable.ViewableService, Viewable.ViewableWidget |
| Nested classes/interfaces inherited from interface org.araneaframework.Widget |
|---|
Widget.Interface |
| Field Summary |
|---|
| Fields inherited from class org.araneaframework.core.BaseService |
|---|
currentInputData, currentOutputData |
| Fields inherited from interface org.araneaframework.core.ApplicationWidget |
|---|
EVENT_HANDLER_ID_KEY, EVENT_PARAMETER_KEY, EVENT_PATH_KEY |
| Fields inherited from interface org.araneaframework.core.ApplicationService |
|---|
ACTION_HANDLER_ID_KEY, ACTION_PARAMETER_KEY, ACTION_PATH_KEY |
| Constructor Summary | |
|---|---|
BaseApplicationWidget()
|
|
| Method Summary | |
|---|---|
Composite.Interface |
_getComposite()
Returns the Composite.Interface internal implementation. |
Viewable.Interface |
_getViewable()
Returns the Viewable.Interface internal implementation. |
protected void |
action(Path path,
InputData input,
OutputData output)
If Path.hasNext() routes to the action to child, otherwise calls the
appropriate ActionListener. |
void |
addActionListener(Object actionId,
ActionListener listener)
Adds the ActionListener listener with the specified action id. |
void |
addEventListener(Object eventId,
EventListener listener)
Adds an EventListener to this Widget with an eventId. |
void |
addWidget(Object key,
Widget child)
Adds a widget as a child widget with the key. |
void |
addWidget(Object key,
Widget child,
Environment env)
Adds a widget as a child widget with the key. |
void |
clearActionListeners(Object actionId)
Clears all the ActionListeners with the specified actionId. |
void |
clearEventlisteners(Object eventId)
Clears all the EventListeners from this Widget with the specified eventId. |
void |
clearGlobalEventListener()
Clears the global eventlistener of this Widget. |
void |
disableWidget(Object key)
Disables the widget with the specified key. |
void |
enableWidget(Object key)
Enables the widget with the specified key. |
protected void |
event(Path path,
InputData input)
If path hasNextStep() routes to the correct child, otherwise calls the appropriate listener. |
protected String |
getActionId(InputData input)
Returns the id of the action based on the input. |
Environment |
getChildEnvironment()
Get the child Environment of this component. |
Map |
getChildren()
Returns all the childcomponents of this component. |
protected Environment |
getChildWidgetEnvironment()
Returns the widget's Environment by default. |
Environment |
getEnvironment()
Provides access to the Environment of this
Component. |
protected String |
getEventId(InputData input)
Returns the id of the event in InputData. |
Object |
getViewModel()
Returns the view model. |
Widget |
getWidget(Object key)
Returns the widget with the specified key. |
protected void |
handleAction(InputData input,
OutputData output)
Calls the approriate listener |
protected void |
handleEvent(InputData input)
Calls the respective listeners. |
protected void |
handleUpdate(InputData input)
Callback called when update(InputData) is invoked. |
protected void |
propagate(Message message)
Forwards the message to the component and to all of its
children components. |
void |
putViewData(String key,
Object customDataItem)
Adds custom data to the widget view model (${widget.custom['key']}). |
void |
putViewDataOnce(String key,
Object customDataItem)
Adds custom data to the widget view model (${widget.custom['key']}). |
void |
removeActionListener(ActionListener listener)
Removes the ActionListener listener from this component. |
void |
removeEventListener(EventListener listener)
Removes the listener from the Widget's eventlisteners. |
void |
removeViewData(String key)
Removes the custom data under key. |
void |
removeWidget(Object key)
Removes component from the children and calls destroy on it. |
protected void |
render(OutputData output)
Renders the component to output, meant for overriding. |
void |
setGlobalEventListener(EventListener eventListener)
Adds a global eventlistener to this Widget. |
protected void |
update(InputData input)
|
| Methods inherited from class org.araneaframework.core.BaseWidget |
|---|
_getWidget, getInputData, getOutputData, handleWidgetException |
| Methods inherited from class org.araneaframework.core.BaseService |
|---|
_getService, handleServiceException |
| Methods inherited from class org.araneaframework.core.BaseComponent |
|---|
_addComponent, _addComponent, _checkCall, _disableComponent, _enableComponent, _endCall, _endWaitingCall, _getChildren, _getComponent, _getDisabledChildren, _propagate, _relocateComponent, _removeComponent, _setEnvironment, _setScope, _startCall, _startWaitingCall, _strictCheckCall, _strictStartCall, _waitNoCall, destroy, disable, enable, getScope, handleException, init, isAlive, isDead, isInitialized |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.araneaframework.Component |
|---|
_getComponent, getScope, isAlive |
| Methods inherited from interface org.araneaframework.Service |
|---|
_getService |
| Methods inherited from interface org.araneaframework.Component |
|---|
_getComponent, getScope, isAlive |
| Methods inherited from interface org.araneaframework.Component |
|---|
_getComponent, getScope, isAlive |
| Methods inherited from interface org.araneaframework.Service |
|---|
_getService |
| Methods inherited from interface org.araneaframework.Component |
|---|
_getComponent, getScope, isAlive |
| Methods inherited from interface org.araneaframework.Component |
|---|
_getComponent, getScope, isAlive |
| Methods inherited from interface org.araneaframework.Service |
|---|
_getService |
| Methods inherited from interface org.araneaframework.Component |
|---|
_getComponent, getScope, isAlive |
| Methods inherited from interface org.araneaframework.Widget |
|---|
_getWidget |
| Methods inherited from interface org.araneaframework.Component |
|---|
_getComponent, getScope, isAlive |
| Methods inherited from interface org.araneaframework.Service |
|---|
_getService |
| Methods inherited from interface org.araneaframework.Component |
|---|
_getComponent, getScope, isAlive |
| Methods inherited from interface org.araneaframework.Widget |
|---|
_getWidget |
| Methods inherited from interface org.araneaframework.Service |
|---|
_getService |
| Methods inherited from interface org.araneaframework.Component |
|---|
_getComponent, getScope, isAlive |
| Methods inherited from interface org.araneaframework.Component |
|---|
_getComponent, getScope, isAlive |
| Methods inherited from interface org.araneaframework.Service |
|---|
_getService |
| Methods inherited from interface org.araneaframework.Component |
|---|
_getComponent, getScope, isAlive |
| Methods inherited from interface org.araneaframework.Widget |
|---|
_getWidget |
| Methods inherited from interface org.araneaframework.Service |
|---|
_getService |
| Methods inherited from interface org.araneaframework.Component |
|---|
_getComponent, getScope, isAlive |
| Constructor Detail |
|---|
public BaseApplicationWidget()
| Method Detail |
|---|
protected Environment getChildWidgetEnvironment()
throws Exception
Exception
protected void propagate(Message message)
throws Exception
BaseComponentmessage to the component and to all of its
children components.
propagate in class BaseComponentmessage - A message to forward.
Exception - Any runtime exception that may occur.
protected void update(InputData input)
throws Exception
update in class BaseWidgetException
protected void event(Path path,
InputData input)
throws Exception
event in class BaseWidgetException
protected void handleUpdate(InputData input)
throws Exception
update(InputData) is invoked.
Exception
protected void handleEvent(InputData input)
throws Exception
Exception
protected void action(Path path,
InputData input,
OutputData output)
throws Exception
Path.hasNext() routes to the action to child, otherwise calls the
appropriate ActionListener.
action in class BaseServicepath - The path of the component to whom the action is targeted.input - The request data.output - The response data.
Exception - Any runtime exception that may occur.
protected void handleAction(InputData input,
OutputData output)
throws Exception
Exception
protected void render(OutputData output)
throws Exception
render in class BaseWidgetExceptionprotected String getEventId(InputData input)
protected String getActionId(InputData input)
public Viewable.Interface _getViewable()
_getViewable in interface Viewablepublic Composite.Interface _getComposite()
_getComposite in interface Compositepublic Map getChildren()
public Widget getWidget(Object key)
key - of the child being returned
public void addWidget(Object key,
Widget child,
Environment env)
key - of the the child Widgetchild - Widget being addedenv - the Environment the child will be initialized with
public void addWidget(Object key,
Widget child)
key - of the the child Widgetchild - Widget being addedpublic void removeWidget(Object key)
key - of the child being removedpublic void enableWidget(Object key)
public void disableWidget(Object key)
public Environment getEnvironment()
ComponentEnvironment of this
Component.
getEnvironment in interface ComponentgetEnvironment in class BaseComponentEnvironment of the Component.public final Environment getChildEnvironment()
ApplicationComponent
getChildEnvironment in interface ApplicationComponentpublic void setGlobalEventListener(EventListener eventListener)
eventListener - a EventListener added as the global eventlistener.public void clearGlobalEventListener()
public void addEventListener(Object eventId,
EventListener listener)
eventId - the eventId of the listenerlistener - the EventListener being addedremoveEventListener(org.araneaframework.core.EventListener)public void removeEventListener(EventListener listener)
listener - the EventListener to removeaddEventListener(java.lang.Object, org.araneaframework.core.EventListener)public void clearEventlisteners(Object eventId)
eventId - the id of the EventListeners.
public void putViewData(String key,
Object customDataItem)
removeViewData(String).
public void removeViewData(String key)
public void putViewDataOnce(String key,
Object customDataItem)
public Object getViewModel()
throws Exception
Exception
public void addActionListener(Object actionId,
ActionListener listener)
public void removeActionListener(ActionListener listener)
public void clearActionListeners(Object actionId)
actionId - the actionId
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||