com.wewebu.ow.server.ui
Class OwLayout.OwDispatchRegion

java.lang.Object
  extended by com.wewebu.ow.server.ui.OwLayout.OwDispatchRegion
All Implemented Interfaces:
OwBaseView
Enclosing class:
OwLayout

protected class OwLayout.OwDispatchRegion
extends Object
implements OwBaseView

dispatch region wrapper used by addRegion to dispatch to a region in the attached Renderable


Field Summary
 
Fields inherited from interface com.wewebu.ow.server.ui.OwBaseView
EMPTY_STRING
 
Constructor Summary
OwLayout.OwDispatchRegion(OwBaseView view_p, int iDispatchRegion_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
 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 object
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwLayout.OwDispatchRegion

public OwLayout.OwDispatchRegion(OwBaseView view_p,
                                 int iDispatchRegion_p)
Method Detail

isNamedRegion

public boolean isNamedRegion(String strRegion_p)
                      throws Exception
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
Description copied from interface: OwBaseView
render the object

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

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

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
Description copied from interface: OwBaseView
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

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.