org.araneaframework.uilib.core
Class PopupFlowWrapperWidget
java.lang.Object
org.araneaframework.core.BaseComponent
org.araneaframework.core.BaseService
org.araneaframework.core.BaseWidget
org.araneaframework.core.BaseApplicationWidget
org.araneaframework.uilib.core.PopupFlowWrapperWidget
- All Implemented Interfaces:
- Serializable, Component, Composite, Composite.CompositeComponent, Composite.CompositeService, Composite.CompositeWidget, ApplicationComponent, ApplicationService, ApplicationWidget, FlowContext, FlowContextWidget, Service, Viewable, Viewable.ViewableComponent, Viewable.ViewableService, Viewable.ViewableWidget, Widget
public class PopupFlowWrapperWidget
- extends BaseApplicationWidget
- implements FlowContextWidget
Wrapper around the flow that is started from new session-thread. It pretends
to be FlowContext for wrapped flows and proxies
method calls to current real FlowContext
and/or to FlowContext from which wrapped flow was started.
- Author:
- Taimo Peelo (taimo@araneaframework.org)
- See Also:
- Serialized Form
|
Method Summary |
void |
addNestedEnvironmentEntry(ApplicationWidget scope,
Object entryId,
Object envEntry)
Adds an environment entry that is visible in all subflows. |
void |
cancel()
Finishes the current flow passing control back to the calling flow. |
void |
finish(Object result)
Finishes the current flow passing control back to the calling flow. |
protected Environment |
getChildWidgetEnvironment()
Returns the widget's Environment by default. |
FlowContext.FlowReference |
getCurrentReference()
Deprecated. |
protected PopupWindowContext |
getOpenerPopupContext()
|
protected PopupWindowContext |
getPopupContext()
|
protected String |
getRequestURL()
|
protected String |
getResponseURL(String url,
String topServiceId,
String threadServiceId)
|
FlowContext.TransitionHandler |
getTransitionHandler()
Returns currently active FlowContext.TransitionHandler. |
protected void |
init()
Init callback. |
boolean |
isNested()
Returns whether the current flow is nested, that is has a caller flow. |
protected void |
render(OutputData output)
Renders the component to output, meant for overriding. |
void |
replace(Widget flow)
Destroys the current flow and starts a new one. |
void |
replace(Widget flow,
FlowContext.Configurator configurator)
Destroys the current flow and starts a new one. |
void |
reset(EnvironmentAwareCallback callback)
Resets all currently running flows and calls the callback allowing to start
new flows. |
void |
setTransitionHandler(FlowContext.TransitionHandler handler)
Sets the FlowContext.TransitionHandler which performs the
flow navigation. |
void |
start(Widget flow)
Starts a new nested subflow. |
void |
start(Widget flow,
FlowContext.Configurator configurator,
FlowContext.Handler handler)
Starts a new nested subflow, that can be configured using the configurator. |
void |
start(Widget flow,
FlowContext.Handler handler)
Starts a new nested subflow. |
| Methods inherited from class org.araneaframework.core.BaseApplicationWidget |
_getComposite, _getViewable, action, addActionListener, addEventListener, addWidget, addWidget, clearActionListeners, clearEventlisteners, clearGlobalEventListener, disableWidget, enableWidget, event, getActionId, getChildEnvironment, getChildren, getEnvironment, getEventId, getViewModel, getWidget, handleAction, handleEvent, handleUpdate, propagate, putViewData, putViewDataOnce, removeActionListener, removeEventListener, removeViewData, removeWidget, setGlobalEventListener, update |
| 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, isAlive, isDead, isInitialized |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
child
protected Widget child
PopupFlowWrapperWidget
public PopupFlowWrapperWidget(Widget child)
getChildWidgetEnvironment
protected Environment getChildWidgetEnvironment()
- Description copied from class:
BaseApplicationWidget
- Returns the widget's Environment by default. Usually overridden.
- Overrides:
getChildWidgetEnvironment in class BaseApplicationWidget
init
protected void init()
throws Exception
- Description copied from class:
BaseComponent
- Init callback. Gets called when the component is initilized.
- Overrides:
init in class BaseComponent
- Throws:
Exception - Any runtime exception that may occur.
start
public void start(Widget flow,
FlowContext.Handler handler)
- Description copied from interface:
FlowContext
- Starts a new nested subflow. Current flow becomes inactive untils subflow calls
FlowContext.finish(Object) or
FlowContext.cancel(). FlowContext.Handler allows to receive notification, when the subflow ends execution.
- Specified by:
start in interface FlowContext
start
public void start(Widget flow)
- Description copied from interface:
FlowContext
- Starts a new nested subflow. Current flow becomes inactive untils subflow calls
FlowContext.finish(Object) or
FlowContext.cancel().
- Specified by:
start in interface FlowContext
start
public void start(Widget flow,
FlowContext.Configurator configurator,
FlowContext.Handler handler)
- Description copied from interface:
FlowContext
- Starts a new nested subflow, that can be configured using the configurator. Current flow becomes inactive
untils subflow calls
FlowContext.finish(Object) or FlowContext.cancel(). FlowContext.Handler allows to receive notification,
when the subflow ends execution.
- Specified by:
start in interface FlowContext
replace
public void replace(Widget flow)
- Description copied from interface:
FlowContext
- Destroys the current flow and starts a new one. When the new flow will end execution it will return control
to the caller of the current flow (if there is one).
- Specified by:
replace in interface FlowContext
replace
public void replace(Widget flow,
FlowContext.Configurator configurator)
- Description copied from interface:
FlowContext
- Destroys the current flow and starts a new one. When the new flow ends execution it will return control
to the caller of the current flow (if there is one). Started subflow can be configured using the configurator.
- Specified by:
replace in interface FlowContext
finish
public void finish(Object result)
- Description copied from interface:
FlowContext
- Finishes the current flow passing control back to the calling flow. Optionally may return some value that
can be interpreted by the calling flow as the result of the call.
- Specified by:
finish in interface FlowContext
cancel
public void cancel()
- Description copied from interface:
FlowContext
- Finishes the current flow passing control back to the calling flow.
Should be interpreted by the calling flow as a unsuccessful return.
- Specified by:
cancel in interface FlowContext
isNested
public boolean isNested()
- Description copied from interface:
FlowContext
- Returns whether the current flow is nested, that is has a caller flow.
- Specified by:
isNested in interface FlowContext
reset
public void reset(EnvironmentAwareCallback callback)
- Description copied from interface:
FlowContext
- Resets all currently running flows and calls the
callback allowing to start
new flows. Useful e.g. in a menu, when selecting a new menu item and reseting the old
stack.
- Specified by:
reset in interface FlowContext
getCurrentReference
public FlowContext.FlowReference getCurrentReference()
- Deprecated.
- Description copied from interface:
FlowContext
- Returns a reference to the current flow that can be used later to manipulate the current flow.
- Specified by:
getCurrentReference in interface FlowContext
addNestedEnvironmentEntry
public void addNestedEnvironmentEntry(ApplicationWidget scope,
Object entryId,
Object envEntry)
- Description copied from interface:
FlowContext
- Adds an environment entry that is visible in all subflows.
- Specified by:
addNestedEnvironmentEntry in interface FlowContext
render
protected void render(OutputData output)
throws Exception
- Description copied from class:
BaseApplicationWidget
- Renders the component to output, meant for overriding.
- Overrides:
render in class BaseApplicationWidget
- Throws:
Exception
getRequestURL
protected String getRequestURL()
getResponseURL
protected String getResponseURL(String url,
String topServiceId,
String threadServiceId)
getPopupContext
protected PopupWindowContext getPopupContext()
getOpenerPopupContext
protected PopupWindowContext getOpenerPopupContext()
setTransitionHandler
public void setTransitionHandler(FlowContext.TransitionHandler handler)
- Description copied from interface:
FlowContext
- Sets the
FlowContext.TransitionHandler which performs the
flow navigation.
- Specified by:
setTransitionHandler in interface FlowContext
getTransitionHandler
public FlowContext.TransitionHandler getTransitionHandler()
- Description copied from interface:
FlowContext
- Returns currently active
FlowContext.TransitionHandler.
- Specified by:
getTransitionHandler in interface FlowContext