com.wewebu.ow.server.ui
Class OwLayout

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
All Implemented Interfaces:
OwBaseView, OwUpdateTarget
Direct Known Subclasses:
OwAbstractDocumentImporterView, OwDialog, OwLoginView, OwMainLayout, OwObjectClassView, OwObjectHistoryView, OwObjectLinksView, OwObjectPropertyView, OwSplitObjectListView, OwSubLayout

public abstract class OwLayout
extends OwView

Layout Class, which can add further Views to regions and act as a container.

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
protected  class OwLayout.OwDispatchRegion
          dispatch region wrapper used by addRegion to dispatch to a region in the attached Renderable
 
Field Summary
protected  HashMap m_Regions
          map of the contained views, keyed by Region Name
 
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
OwLayout()
           
 
Method Summary
 void addRegion(OwBaseView view_p, int iRegion_p, int iDispatchRegion_p)
          adds a region out of the given view with a name key to the layout NOTE: Does not attach the view.
 void addView(OwView view_p, int iRegion_p, String strName_p)
          adds a view with a name key to the layout and attaches the view
 void addView(OwView view_p, String strName_p)
          add a view and initialize it
 void addViewReference(OwBaseView view_p, int iRegion_p)
          adds a OwBaseView with a name key to the layout, but does not attach it.
 Iterator getIterator()
          get a iterator object for the child views
 OwView getViewRegion(int iRegion_p)
          get the registered view reference
 boolean isRegion(int iRegion_p)
          determine if region exists
 boolean isRegionMaximized(int iRegion_p)
          checks if the region is shown maximized
 boolean isRegionMinimized(int iRegion_p)
          checks if the region is shown minimized
 boolean isRegionNormal(int iRegion_p)
          checks if the region is shown normal
 void renderNamedRegion(Writer w_p, String strRegion_p)
          render only a region in the view, used by derived classes
 void renderRegion(Writer w_p, int iRegion_p)
          render the views of the region
 
Methods inherited from class com.wewebu.ow.server.ui.OwView
activate, detach, getBreadcrumbPart, getDocument, getExternalFormEventTarget, getFormName, getFormTarget, getIcon, getMaximizeView, getParent, getRenderedNamedRegion, getRenderedRegion, getTitle, getViewList, init, isFormTargetExternal, isNamedRegion, isShowMaximized, isShowMinimized, isShowNormal, onActivate, onRender, onUpdate, render, renderHTMLFormular, serverSideDesignInclude, serverSideInclude, setDocument, setExternalFormTarget, setMaximizeView, 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

m_Regions

protected HashMap m_Regions
map of the contained views, keyed by Region Name

Constructor Detail

OwLayout

public OwLayout()
Method Detail

addRegion

public void addRegion(OwBaseView view_p,
                      int iRegion_p,
                      int iDispatchRegion_p)
               throws Exception
adds a region out of the given view with a name key to the layout NOTE: Does not attach the view. In order to attach a view use the addView method with the OwView parameter.

Parameters:
view_p - OwBaseView to add
iRegion_p - ID of the region
iDispatchRegion_p - ID of the sub region i.e. this will call renderRegion(iDispatchRegion_p) instead of render(...)
Throws:
Exception

addView

public void addView(OwView view_p,
                    int iRegion_p,
                    String strName_p)
             throws Exception
adds a view with a name key to the layout and attaches the view

Parameters:
view_p - the view to add
strName_p - Name / ID of the view, can be null
iRegion_p - ID of the region
Throws:
Exception

addView

public void addView(OwView view_p,
                    String strName_p)
             throws Exception
add a view and initialize it

Overrides:
addView in class OwView
Parameters:
view_p - View to add
strName_p - Name / ID of the view, can be null
Throws:
Exception

addViewReference

public void addViewReference(OwBaseView view_p,
                             int iRegion_p)
                      throws Exception
adds a OwBaseView with a name key to the layout, but does not attach it. The must have been attached already. NOTE: Does not attach the view. In order to attach a view use the addView method with the OwView parameter.

Parameters:
view_p - the view to add
iRegion_p - ID of the region
Throws:
Exception

getIterator

public Iterator getIterator()
get a iterator object for the child views

Overrides:
getIterator in class OwView
Returns:
iterator for the child OwBaseView objects

getViewRegion

public OwView getViewRegion(int iRegion_p)
                     throws OwObjectNotFoundException
get the registered view reference

Parameters:
iRegion_p - ID of the region to render
Returns:
OwView
Throws:
OwObjectNotFoundException

isRegion

public boolean isRegion(int iRegion_p)
determine if region exists

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

isRegionMaximized

public boolean isRegionMaximized(int iRegion_p)
checks if the region is shown maximized

Returns:
true, if region is maximized, false otherwise

isRegionMinimized

public boolean isRegionMinimized(int iRegion_p)
checks if the region is shown minimized

Returns:
true, if region is minimized, false otherwise

isRegionNormal

public boolean isRegionNormal(int iRegion_p)
checks if the region is shown normal

Returns:
true, if region is normal, false otherwise

renderNamedRegion

public void renderNamedRegion(Writer w_p,
                              String strRegion_p)
                       throws Exception
render only a region in the view, used by derived classes

Specified by:
renderNamedRegion in interface OwBaseView
Overrides:
renderNamedRegion in class OwView
Parameters:
w_p - Writer object to write HTML to
strRegion_p - named region to render
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 OwView
Parameters:
w_p - Writer object to write HTML to
iRegion_p - ID of the region to render
Throws:
Exception


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.