org.araneaframework.uilib.core
Class BaseUIWidget

java.lang.Object
  extended byorg.araneaframework.core.BaseComponent
      extended byorg.araneaframework.core.BaseService
          extended byorg.araneaframework.core.BaseWidget
              extended byorg.araneaframework.core.BaseApplicationWidget
                  extended byorg.araneaframework.uilib.core.BaseUIWidget
All Implemented Interfaces:
ApplicationComponent, ApplicationService, ApplicationWidget, Component, Composite, Composite.CompositeComponent, Composite.CompositeService, Composite.CompositeWidget, Serializable, Service, Viewable, Viewable.ViewableComponent, Viewable.ViewableService, Viewable.ViewableWidget, Widget
Direct Known Subclasses:
ListWidget

public class BaseUIWidget
extends BaseApplicationWidget

This widget represents the usual custom application widget that is rendered using JSP tags. It assumes to be connected with a JSP page and allows setting its view selector.

Author:
Jevgeni Kabanov (ekabanov at araneaframework dot org)
See Also:
Serialized Form

Nested Class Summary
protected  class BaseUIWidget.ComponentImpl
           
 
Nested classes inherited from class org.araneaframework.core.BaseApplicationWidget
BaseApplicationWidget.CompositeImpl, BaseApplicationWidget.ViewableImpl, BaseApplicationWidget.ViewModel
 
Nested classes inherited from class org.araneaframework.core.BaseWidget
BaseWidget.WidgetImpl
 
Nested classes inherited from class org.araneaframework.core.BaseService
BaseService.ServiceImpl
 
Nested classes inherited from class org.araneaframework.core.ApplicationWidget
ApplicationWidget.WidgetViewModel
 
Nested classes inherited from class org.araneaframework.core.ApplicationService
ApplicationService.ServiceViewModel
 
Nested classes inherited from class org.araneaframework.core.ApplicationComponent
ApplicationComponent.ComponentViewModel
 
Nested classes inherited from class org.araneaframework.Component
Component.Interface
 
Nested classes inherited from class org.araneaframework.Composite
Composite.CompositeComponent, Composite.CompositeService, Composite.CompositeWidget, Composite.Interface
 
Nested classes inherited from class org.araneaframework.Viewable
Viewable.Interface, Viewable.ViewableComponent, Viewable.ViewableService, Viewable.ViewableWidget
 
Nested classes inherited from class org.araneaframework.Service
Service.Interface
 
Nested classes inherited from class org.araneaframework.Widget
Widget.Interface
 
Field Summary
protected  String viewSelector
           
 
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
BaseUIWidget()
           
 
Method Summary
 Component.Interface _getComponent()
          The factory method returning the implementation of the Component.
protected  BeanFactory getBeanFactory()
          Provides the BeanFactory from the Environment.
protected  ConfigurationContext getConfiguration()
          Provides the ConfigurationContext from the Environment.
protected  ConfirmationContext getConfirmationCtx()
          Provides the ConfirmationContext from the Environment.
protected  FlowContext getFlowCtx()
          Provides the FlowContext from the Environment.
protected  LocalizationContext getL10nCtx()
          Provides the LocalizationContext from the Environment.
protected  MessageContext getMessageCtx()
          Provides the MessageContext from the Environment.
protected  MountContext getMountCtx()
          Provides the MountContext from the Environment.
protected  OverlayContext getOverlayCtx()
          Provides the OverlayContext from the Environment.
protected  PopupWindowContext getPopupCtx()
          Provides the PopupWindowContext from the Environment.
protected  boolean isRunningInOverlay()
          Specifies wether this widget is running in overlay mode.
protected  void render(OutputData output)
          Renders widget to output using the defined viewSelector.
protected  String resolveJspName(JspContext jspCtx, String viewSelector)
           
protected  void setViewSelector(String viewSelector)
          Sets the view selector for this widget, should be path to jsp file without jsp extension.
protected  String t(String key)
          Translates the message under the given key, with help from widget's current LocalizationContext.
 
Methods inherited from class org.araneaframework.core.BaseApplicationWidget
_getComposite, _getViewable, action, addActionListener, addEventListener, addWidget, addWidget, clearActionListeners, clearEventlisteners, clearGlobalEventListener, disableWidget, enableWidget, event, getActionId, getChildEnvironment, getChildren, getChildWidgetEnvironment, getEnvironment, getEventId, getViewModel, getWidget, handleAction, handleEvent, handleUpdate, propagate, putViewData, putViewDataOnce, removeActionListener, removeEventListener, removeViewData, removeWidget, setGlobalEventListener, update
 
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, _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
getScope, isAlive
 
Methods inherited from interface org.araneaframework.Service
_getService
 
Methods inherited from interface org.araneaframework.Widget
_getWidget
 

Field Detail

viewSelector

protected String viewSelector
Constructor Detail

BaseUIWidget

public BaseUIWidget()
Method Detail

setViewSelector

protected void setViewSelector(String viewSelector)
Sets the view selector for this widget, should be path to jsp file without jsp extension.

Parameters:
viewSelector - path to jsp file, without file extension

getConfiguration

protected ConfigurationContext getConfiguration()
Provides the ConfigurationContext from the Environment. It can be used to access configuration settings.

Returns:
The ConfigurationContext.

getFlowCtx

protected FlowContext getFlowCtx()
Provides the FlowContext from the Environment. It can be used to start, replace, or finish flows.

Returns:
The FlowContext.

getMessageCtx

protected MessageContext getMessageCtx()
Provides the MessageContext from the Environment. It can be used to display or hide messages from the user.

Returns:
The MessageContext.

getL10nCtx

protected LocalizationContext getL10nCtx()
Provides the LocalizationContext from the Environment. It can be used to handle localization changes, and translate (i.e. resolve) messages.

Returns:
The LocalizationContext.

getMountCtx

protected MountContext getMountCtx()
Provides the MountContext from the Environment. It can be used to provide fixed URLs that can be accessed by GET requests.

Returns:
The MountContext.

getBeanFactory

protected BeanFactory getBeanFactory()
Provides the BeanFactory from the Environment. It can be used to access Spring framework configuration.

Returns:
The BeanFactory.

getOverlayCtx

protected OverlayContext getOverlayCtx()
Provides the OverlayContext from the Environment. It can be used to start and handle flow in overlay mode.

Returns:
The OverlayContext.

getConfirmationCtx

protected ConfirmationContext getConfirmationCtx()
Provides the ConfirmationContext from the Environment. It can be used to present the user a question in a message box, and activate the code in the closure, if the user chooses yes.

Returns:
The ConfirmationContext.
Since:
1.1.3

getPopupCtx

protected PopupWindowContext getPopupCtx()
Provides the PopupWindowContext from the Environment. It can be used to open and manage popups.

Returns:
The PopupWindowContext.
Since:
1.1.3

isRunningInOverlay

protected boolean isRunningInOverlay()
Specifies wether this widget is running in overlay mode.

Returns:
true, if this widget is running in overlay mode.
Since:
1.1

t

protected String t(String key)
Translates the message under the given key, with help from widget's current LocalizationContext.

Parameters:
key - The key to translate.
Returns:
The found message found translated into language corresponding to current Locale.

render

protected void render(OutputData output)
               throws Exception
Renders widget to output using the defined viewSelector.

Overrides:
render in class BaseApplicationWidget
Throws:
Exception

resolveJspName

protected String resolveJspName(JspContext jspCtx,
                                String viewSelector)

_getComponent

public Component.Interface _getComponent()
Description copied from interface: Component
The factory method returning the implementation of the Component.

Specified by:
_getComponent in interface Component
Overrides:
_getComponent in class BaseComponent