com.wewebu.ow.server.ui.helper
Class OwInnerViewWrapper

java.lang.Object
  extended by com.wewebu.ow.server.ui.helper.OwInnerViewWrapper
All Implemented Interfaces:
OwBaseView

public class OwInnerViewWrapper
extends Object
implements OwBaseView

Helper for wrapping different OwView. This class delegates to the wrapped OwView, or returns default values if not set.

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

Since:
3.0.0.0

Field Summary
 
Fields inherited from interface com.wewebu.ow.server.ui.OwBaseView
EMPTY_STRING
 
Constructor Summary
OwInnerViewWrapper()
           
OwInnerViewWrapper(OwView wrappedView_p)
           
 
Method Summary
 String getBreadcrumbPart()
          This method is used to create a "Breadcrumb" navigation view.
 String getTitle()
          Returns a title for this view or an empty String
 OwView getView()
          Get the view which is wrapped into this class.
 boolean isNamedRegion(String strRegion_p)
          determine if region exists
 boolean isRegion(int iRegion_p)
          determine if region exists
 void render(Writer w_p)
          render the view
 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 only a region in the view, used by derived classes
 void setView(OwView view_p)
          set inner view
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwInnerViewWrapper

public OwInnerViewWrapper()

OwInnerViewWrapper

public OwInnerViewWrapper(OwView wrappedView_p)
Method Detail

getTitle

public String getTitle()
Description copied from interface: OwBaseView
Returns a title for this view or an empty String

Specified by:
getTitle in interface OwBaseView
Returns:
String representing the title of this view

getView

public OwView getView()
Get the view which is wrapped into this class.

Returns:
OwView or null if no view is set.

isNamedRegion

public boolean isNamedRegion(String strRegion_p)
                      throws Exception
Description copied from interface: OwBaseView
determine if region exists

Specified by:
isNamedRegion in interface OwBaseView
Parameters:
strRegion_p - name of the region to render
Returns:
true if region contains anything and should be rendered
Throws:
Exception

isRegion

public boolean isRegion(int iRegion_p)
                 throws Exception
determine if region exists

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

render

public void render(Writer w_p)
            throws Exception
render the view

Specified by:
render in interface OwBaseView
Parameters:
w_p - Writer object to write HTML to
Throws:
Exception

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
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 only a region in the view, used by derived classes

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

setView

public void setView(OwView view_p)
set inner 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
Returns:
String representing the current bread crumb part


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.