org.olat.core.gui.components
Class Window

java.lang.Object
  extended by org.olat.core.gui.components.Component
      extended by org.olat.core.gui.components.Container
          extended by org.olat.core.gui.components.Window

public class Window
extends Container

Description:

Author:
Felix Jost

Field Summary
static Event ABOUT_TO_DISPATCH
          fired just before the targetcomponent.dispatch takes places
static Event AFTER_INLINE_RENDERING
          fired after the response has been rendered into a string (but not delivered to the client yet)
static Event AFTER_VALIDATING
           
static Event BEFORE_INLINE_RENDERING
          fired before inline (text/html computed response) takes place
static Event COMPONENTNOTFOUND
          while dispatching: component with id not found COMPONENTNOTFOUND
static Event END_OF_DISPATCH_CYCLE
          fired when the dispatch cycle (dispatch to a component) is finished
static Event OLDTIMESTAMPCALL
          old time stamp call, but no asyncmediaresponsible OLDTIMESTAMPCALL
 
Constructor Summary
Window(java.lang.String name, WindowBackOfficeImpl wbackoffice)
           
 
Method Summary
 void dispatchRequest(UserRequest ureq, boolean renderOnly)
           
 Component getAndClearLatestDispatchedComponent()
          to be used for exception reporting only!
 java.lang.Object getAttribute(java.lang.String key)
          Get a window-scope variable
 Component getComponent(java.lang.String name)
          use only rarely!
 Container getContentPane()
           
 Theme getGuiTheme()
           
 ComponentRenderer getHTMLRendererSingleton()
           
 java.lang.String getInstanceId()
           
 Component getJsCssRawHtmlHeader()
           
 java.lang.String getLatestDispatchComponentInfo()
           
 Command handleDirties()
          to be called by Window.java or the AjaxController only! this method is synchronized on the Window instance
 java.lang.Object removeAttribute(java.lang.String key)
          Remove a windo-scope variable
 void setAttribute(java.lang.String key, java.lang.Object value)
          Set a window-scope variable
 void setContentPane(Container contentPane)
          Sets the contentPane.
 void setGuiTheme(Theme guiTheme)
           
 void setInstanceId(java.lang.String instanceId)
          Sets the instanceId.
 void setUriPrefix(java.lang.String uriPrefix)
          Sets the uriPrefix.
 
Methods inherited from class org.olat.core.gui.components.Container
getComponents, getExtendedDebugInfo, put, put, remove
 
Methods inherited from class org.olat.core.gui.components.Component
addListener, debuginfoGetListeners, dispatchRequest, getAndClearLatestFiredEvent, getComponentName, getDispatchID, getLatestDispatchedController, getListenerInfo, getParent, getSpanAsDomReplaceable, getTimestamp, getTranslator, isDirty, isDirtyForUser, isDomReplaceable, isEnabled, isVisible, setDirty, setDomReplaceable, setEnabled, setSpanAsDomReplaceable, setVisible, toString, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OLDTIMESTAMPCALL

public static final Event OLDTIMESTAMPCALL
old time stamp call, but no asyncmediaresponsible OLDTIMESTAMPCALL


COMPONENTNOTFOUND

public static final Event COMPONENTNOTFOUND
while dispatching: component with id not found COMPONENTNOTFOUND


END_OF_DISPATCH_CYCLE

public static final Event END_OF_DISPATCH_CYCLE
fired when the dispatch cycle (dispatch to a component) is finished


BEFORE_INLINE_RENDERING

public static final Event BEFORE_INLINE_RENDERING
fired before inline (text/html computed response) takes place


AFTER_INLINE_RENDERING

public static final Event AFTER_INLINE_RENDERING
fired after the response has been rendered into a string (but not delivered to the client yet)


AFTER_VALIDATING

public static final Event AFTER_VALIDATING

ABOUT_TO_DISPATCH

public static final Event ABOUT_TO_DISPATCH
fired just before the targetcomponent.dispatch takes places

Constructor Detail

Window

public Window(java.lang.String name,
              WindowBackOfficeImpl wbackoffice)
Parameters:
name -
chiefController -
Method Detail

getJsCssRawHtmlHeader

public Component getJsCssRawHtmlHeader()

setGuiTheme

public void setGuiTheme(Theme guiTheme)
Parameters:
guiThemeBaseUri - the URI of the base folder of the current Gui theme, r.g. 'http://www.myserver.com/olat/raw/themes/default/'

getGuiTheme

public Theme getGuiTheme()
Returns:
the current GUI theme

getContentPane

public Container getContentPane()
Returns:
Container

setContentPane

public void setContentPane(Container contentPane)
Sets the contentPane.

Parameters:
contentPane - The contentPane to set

getComponent

public Component getComponent(java.lang.String name)
Description copied from class: Container
use only rarely!

Overrides:
getComponent in class Container
Returns:
See Also:
Container.getComponent(java.lang.String)

dispatchRequest

public void dispatchRequest(UserRequest ureq,
                            boolean renderOnly)
Parameters:
ureq -
renderOnly -

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object value)
Set a window-scope variable

Parameters:
key - the identifier, must not be NULL
value - the value, must not be NULL. Use removeAttribute() to remove a key

getAttribute

public java.lang.Object getAttribute(java.lang.String key)
Get a window-scope variable

Parameters:
key - the identifier, must not be NULL
Returns:
The object or NULL if no object exists for this key

removeAttribute

public java.lang.Object removeAttribute(java.lang.String key)
Remove a windo-scope variable

Parameters:
key - the identifier, must not be NULL
the - previously attribute that was set for this key or NULL when the key was not set at all

handleDirties

public Command handleDirties()
to be called by Window.java or the AjaxController only! this method is synchronized on the Window instance

Returns:
a updateUI-Command or null if there are no dirty components (normally not the case for sync (user-click) request, but often the case for pull request, since nothing has changed yet on the screen.

getInstanceId

public java.lang.String getInstanceId()
Returns:
String

setInstanceId

public void setInstanceId(java.lang.String instanceId)
Sets the instanceId.

Parameters:
instanceId - The instanceId to set

setUriPrefix

public void setUriPrefix(java.lang.String uriPrefix)
Sets the uriPrefix.

Parameters:
uriPrefix - The uriPrefix to set

getLatestDispatchComponentInfo

public java.lang.String getLatestDispatchComponentInfo()
Returns:
LatestDispatchComponentInfo

getHTMLRendererSingleton

public ComponentRenderer getHTMLRendererSingleton()
Specified by:
getHTMLRendererSingleton in class Component
Returns:
the chiefcontroller that owns this window

getAndClearLatestDispatchedComponent

public Component getAndClearLatestDispatchedComponent()
to be used for exception reporting only!

Returns: