com.wewebu.ow.server.app
Class OwMainLayout

java.lang.Object
  extended by com.wewebu.ow.server.ui.OwEventTarget
      extended by com.wewebu.ow.server.ui.OwView
          extended by com.wewebu.ow.server.ui.OwLayout
              extended by com.wewebu.ow.server.app.OwMainLayout
All Implemented Interfaces:
OwBaseView, OwUpdateTarget

public class OwMainLayout
extends OwLayout

Main Layout for Workdesk. Instance stays active during session.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Nested Class Summary
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.ui.OwLayout
OwLayout.OwDispatchRegion
 
Field Summary
static int CLIPBOARD_REGION
          name of the maximized region.
static int CURRENT_DATE_REGION
          name of the date region.
static int DIALOG_REGION
          name of the dialog region.
static String ERROR_CONTAINER_ID
          the HTML error container ID
static int ERROR_REGION
          name of the login info region.
static String KEY_INFO_CONTAINER_ID
          the HTML key info container ID
static int KEYBOARD_REGION
          name of the region that describes the registered keyboard keys
static int LOGOUT_BUTTON_REGION
          name of the logout button region.
static String LOGOUT_DISABLED
           
static String LOGOUT_STATUS
           
protected  OwConfiguration m_Configuration
          application m_Configuration reference
protected  OwMainAppContext m_MainContext
          reference to the cast AppContext
protected  OwView m_MaximizedView
          currently maximized view if set
static int MAIN_REGION
          name of the main region shared with DIALOG_REGION
static int MANDATOR_REGION
          name of the mandator region.
static int MAXIMIZED_REGION
          name of the maximized region.
static String MESSAGE_CONTAINER_ID
          the HTML message container ID
static int MESSAGE_REGION
          name of the login info region.
static int NAVIGATION_REGION
          name of the navigation region
static String REGISTERED_KEYS_SCRIPTS_CONTAINER_ID
          the registerd scripts container ID
static int ROLE_SELECT_REGION
          name of the region that displays the available roles
static int USERNAME_REGION
          name of the user name region.
 
Fields inherited from class com.wewebu.ow.server.ui.OwLayout
m_Regions
 
Fields inherited from class com.wewebu.ow.server.ui.OwView
CURRENT_MODULE_KEY, FORMULAR_PLACEHOLDER_END_DELIMITER, FORMULAR_PLACEHOLDER_START_DELIMITER, m_externalFormEventTarget
 
Fields inherited from interface com.wewebu.ow.server.ui.OwBaseView
EMPTY_STRING
 
Constructor Summary
OwMainLayout()
           
 
Method Summary
 String getBreadcrumbPart()
          This method is used to create a "Breadcrumb" navigation view.
protected  OwView getMaximizeView()
          overridable function to retrieve the view that is shown maximized if any
 String getTitle()
          overridable title of the view
 boolean hasError()
          Check if the context has an error set.
 boolean hasMessages()
          Check if the context has messages set.
protected  void init()
          init the view after the context is set.
 boolean isRegion(int iRegion_p)
          determine if region contains a view or must be rendered
 void onAjaxUpdate(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
          AJAX handler for update the error message.
 void onLogOut(javax.servlet.http.HttpServletRequest request_p)
          event called when user clicked LogOut
protected  void onRender(Writer w_p)
          render the view
 void onSelectRole(javax.servlet.http.HttpServletRequest request_p)
          called when user selects a role in the combobox
 void renderRegion(Writer w_p, int iRegion_p)
          render the views of the region
protected  void setMaximizeView(OwView view_p)
          overridable function to set a view as a maximized view, i.e.
 
Methods inherited from class com.wewebu.ow.server.ui.OwLayout
addRegion, addView, addView, addViewReference, getIterator, getViewRegion, isRegionMaximized, isRegionMinimized, isRegionNormal, renderNamedRegion
 
Methods inherited from class com.wewebu.ow.server.ui.OwView
activate, detach, getDocument, getExternalFormEventTarget, getFormName, getFormTarget, getIcon, getParent, getRenderedNamedRegion, getRenderedRegion, getViewList, isFormTargetExternal, isNamedRegion, isShowMaximized, isShowMinimized, isShowNormal, onActivate, onUpdate, render, renderHTMLFormular, serverSideDesignInclude, serverSideInclude, setDocument, setExternalFormTarget, setParent, showMaximized, showMinimized, showNormal, usesFormWithAttributes
 
Methods inherited from class com.wewebu.ow.server.ui.OwEventTarget
attach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getID, onExternalRequest, onFormEvent, onRequest, updateExternalFormTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAVIGATION_REGION

public static final int NAVIGATION_REGION
name of the navigation region

See Also:
Constant Field Values

MAIN_REGION

public static final int MAIN_REGION
name of the main region shared with DIALOG_REGION

See Also:
Constant Field Values

DIALOG_REGION

public static final int DIALOG_REGION
name of the dialog region. shared with MAIN_REGION

See Also:
Constant Field Values

ERROR_REGION

public static final int ERROR_REGION
name of the login info region.

See Also:
Constant Field Values

MAXIMIZED_REGION

public static final int MAXIMIZED_REGION
name of the maximized region. I.e. used if a view requests to be displayed maximized

See Also:
Constant Field Values

CLIPBOARD_REGION

public static final int CLIPBOARD_REGION
name of the maximized region. I.e. used if a view requests to be displayed maximized

See Also:
Constant Field Values

KEYBOARD_REGION

public static final int KEYBOARD_REGION
name of the region that describes the registered keyboard keys

See Also:
Constant Field Values

ROLE_SELECT_REGION

public static final int ROLE_SELECT_REGION
name of the region that displays the available roles

See Also:
Constant Field Values

LOGOUT_BUTTON_REGION

public static final int LOGOUT_BUTTON_REGION
name of the logout button region.

See Also:
Constant Field Values

USERNAME_REGION

public static final int USERNAME_REGION
name of the user name region.

See Also:
Constant Field Values

CURRENT_DATE_REGION

public static final int CURRENT_DATE_REGION
name of the date region.

See Also:
Constant Field Values

MESSAGE_REGION

public static final int MESSAGE_REGION
name of the login info region.

See Also:
Constant Field Values

MANDATOR_REGION

public static final int MANDATOR_REGION
name of the mandator region.

See Also:
Constant Field Values

ERROR_CONTAINER_ID

public static final String ERROR_CONTAINER_ID
the HTML error container ID

See Also:
Constant Field Values

MESSAGE_CONTAINER_ID

public static final String MESSAGE_CONTAINER_ID
the HTML message container ID

See Also:
Constant Field Values

KEY_INFO_CONTAINER_ID

public static final String KEY_INFO_CONTAINER_ID
the HTML key info container ID

See Also:
Constant Field Values

REGISTERED_KEYS_SCRIPTS_CONTAINER_ID

public static final String REGISTERED_KEYS_SCRIPTS_CONTAINER_ID
the registerd scripts container ID

See Also:
Constant Field Values

LOGOUT_STATUS

public static final String LOGOUT_STATUS
See Also:
Constant Field Values

LOGOUT_DISABLED

public static final String LOGOUT_DISABLED
See Also:
Constant Field Values

m_Configuration

protected OwConfiguration m_Configuration
application m_Configuration reference


m_MainContext

protected OwMainAppContext m_MainContext
reference to the cast AppContext


m_MaximizedView

protected OwView m_MaximizedView
currently maximized view if set

Constructor Detail

OwMainLayout

public OwMainLayout()
Method Detail

getMaximizeView

protected OwView getMaximizeView()
overridable function to retrieve the view that is shown maximized if any

Overrides:
getMaximizeView in class OwView
Returns:
view_p OwView that is shown maximized, null otherwise

init

protected void init()
             throws Exception
init the view after the context is set.

Overrides:
init in class OwView
Throws:
Exception

isRegion

public boolean isRegion(int iRegion_p)
determine if region contains a view or must be rendered

Specified by:
isRegion in interface OwBaseView
Overrides:
isRegion in class OwLayout
Parameters:
iRegion_p - ID of the region
Returns:
true if region contains anything and should be rendered

onLogOut

public void onLogOut(javax.servlet.http.HttpServletRequest request_p)
              throws Exception
event called when user clicked LogOut

Parameters:
request_p - HttpServletRequest
Throws:
Exception

onRender

protected void onRender(Writer w_p)
                 throws Exception
render the view

Overrides:
onRender in class OwView
Parameters:
w_p - Writer object to write HTML to
Throws:
Exception

onSelectRole

public void onSelectRole(javax.servlet.http.HttpServletRequest request_p)
                  throws Exception
called when user selects a role in the combobox

Throws:
Exception

renderRegion

public void renderRegion(Writer w_p,
                         int iRegion_p)
                  throws Exception
render the views of the region

Specified by:
renderRegion in interface OwBaseView
Overrides:
renderRegion in class OwLayout
Parameters:
w_p - Writer object to write HTML to
iRegion_p - ID of the region to render
Throws:
Exception

setMaximizeView

protected void setMaximizeView(OwView view_p)
overridable function to set a view as a maximized view, i.e. the submitted view should be drawn maximized.

Overrides:
setMaximizeView in class OwView
Parameters:
view_p - OwView that requests to be shown maximized

getTitle

public String getTitle()
Description copied from class: OwView
overridable title of the view

Specified by:
getTitle in interface OwBaseView
Overrides:
getTitle in class OwView
Returns:
String localized display name for the view

getBreadcrumbPart

public String getBreadcrumbPart()
Description copied from interface: OwBaseView
This method is used to create a "Breadcrumb" navigation view. The view is just attaching it's known title/name to the part which is returned from it child.

Example: We have a View A which contains a View B which has a many views contained.

      A.getBreadcrumbPart()
      {
          return this.getTitle() + " - " + B.getBreadcrumbPart();
      }
      B.getBreadcrumbPart()
      {
          return this.getName() + " - " + getMainView().getBreadcrumbPart();
      }
 

So every view is just returning the part of the navigation which is known in it's context. This method should not return null at least the OwBaseView.EMPTY_STRING should be returned.

Specified by:
getBreadcrumbPart in interface OwBaseView
Overrides:
getBreadcrumbPart in class OwView
Returns:
String representing the current bread crumb part

onAjaxUpdate

public void onAjaxUpdate(javax.servlet.http.HttpServletRequest request_p,
                         javax.servlet.http.HttpServletResponse response_p)
                  throws Exception
AJAX handler for update the error message.

Parameters:
request_p - - the HttpServletRequest request object.
response_p - - the HttpServletResponse response object.
Throws:
Exception
Since:
3.1.0.0

hasError

public boolean hasError()
Check if the context has an error set.

Returns:
- true, if the context has an error associated with it.
Since:
3.1.0.0

hasMessages

public boolean hasMessages()
Check if the context has messages set.

Returns:
- true, if the context has an messages associated with it.
Since:
3.1.0.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.