com.wewebu.ow.server.dmsdialogs.views
Class OwObjectLinksView

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.dmsdialogs.views.OwObjectLinksView
All Implemented Interfaces:
OwBaseView, OwUpdateTarget
Direct Known Subclasses:
OwAllLinksView, OwTypedLinksView

public abstract class OwObjectLinksView
extends OwLayout

Displays OwObjectLinks using OwSplitObjectListView. For each relation specified by the corresponding OwObjectLinksDocument a separate object list is displayed as a split (see OwSplitObjectListView) in the LINKS_REGION. A filter is displayed using the LINKS_FILTER_REGION handling in sub classes.

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:
4.1.1.0

Nested Class Summary
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.ui.OwLayout
OwLayout.OwDispatchRegion
 
Field Summary
static int LINKS_FILTER_REGION
           
static int LINKS_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
OwObjectLinksView(OwObjectLinksDocument document)
           
 
Method Summary
protected  Collection<OwFieldColumnInfo> createColumnInfo(Collection<String> propertyList_p)
           
protected  Collection<OwFieldColumnInfo> createRelationColumnInfo(OwObjectLinkRelation relation)
          (overridable) Create relation dependent columns to display.
protected  OwSplitObjectListDocument createSplitObjectListDocument(String[] splitNames, Collection<OwFieldColumnInfo>[] propertyColumnInfos, List<OwDocumentFunction> documentFunctions)
          (overridable) Factory to create OwSplitObjectListDocument for internal OwSplitObjectListView .
protected  OwSplitObjectListView createSplitView()
           
 OwObjectLinksDocument getDocument()
          gets the reference to the document
protected  List<OwDocumentFunction> getDocumentFunctions()
           
 String getFilterDisplayName()
           
protected  void init()
          init the target after the context is set.
 boolean isEmpty()
           
protected  void onRender(Writer w_p)
          called when the view should create its HTML content to be displayed
 void onUpdate(OwEventTarget caller_p, int iCode_p, Object param_p)
          called by the framework to update the view when OwDocument.Update was called NOTE: We can not use the onRender method to update, because we do not know the call order of onRender.
protected  void refresh(OwObjectCollection[] splitLinks)
          Refreshes the contents of this view for the give object link collection array.
 void renderRegion(Writer w_p, int iRegion_p)
          render the views of the region
 
Methods inherited from class com.wewebu.ow.server.ui.OwLayout
addRegion, addView, addView, addViewReference, getIterator, getViewRegion, isRegion, isRegionMaximized, isRegionMinimized, isRegionNormal, renderNamedRegion
 
Methods inherited from class com.wewebu.ow.server.ui.OwView
activate, detach, getBreadcrumbPart, getExternalFormEventTarget, getFormName, getFormTarget, getIcon, getMaximizeView, getParent, getRenderedNamedRegion, getRenderedRegion, getTitle, getViewList, isFormTargetExternal, isNamedRegion, isShowMaximized, isShowMinimized, isShowNormal, onActivate, 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

LINKS_REGION

public static final int LINKS_REGION
See Also:
Constant Field Values

LINKS_FILTER_REGION

public static final int LINKS_FILTER_REGION
See Also:
Constant Field Values
Constructor Detail

OwObjectLinksView

public OwObjectLinksView(OwObjectLinksDocument document)
Method Detail

getDocument

public OwObjectLinksDocument getDocument()
Description copied from class: OwView
gets the reference to the document

Overrides:
getDocument in class OwView
Returns:
document instance

createColumnInfo

protected Collection<OwFieldColumnInfo> createColumnInfo(Collection<String> propertyList_p)
                                                  throws Exception
Throws:
Exception

init

protected void init()
             throws Exception
Description copied from class: OwView
init the target after the context is set.

Overrides:
init in class OwView
Throws:
Exception

isEmpty

public boolean isEmpty()
Returns:
true if no object links are to be displayed by this view. false otherwise.

refresh

protected void refresh(OwObjectCollection[] splitLinks)
                throws Exception
Refreshes the contents of this view for the give object link collection array. Each element in the array contains the collection of objects for the relation split at the same index defined in the document of this view

Parameters:
splitLinks -
Throws:
Exception

renderRegion

public void renderRegion(Writer w_p,
                         int iRegion_p)
                  throws Exception
Description copied from class: OwLayout
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

onUpdate

public void onUpdate(OwEventTarget caller_p,
                     int iCode_p,
                     Object param_p)
              throws Exception
Description copied from interface: OwUpdateTarget
called by the framework to update the view when OwDocument.Update was called NOTE: We can not use the onRender method to update, because we do not know the call order of onRender. onUpdate is always called before all onRender methods.

Specified by:
onUpdate in interface OwUpdateTarget
Overrides:
onUpdate in class OwView
Parameters:
caller_p - OwEventTarget target that called update
iCode_p - int optional reason code
param_p - Object optional parameter representing the refresh, depends on the value of iCode_p, can be null
Throws:
Exception

onRender

protected void onRender(Writer w_p)
                 throws Exception
Description copied from class: OwView
called when the view should create its HTML content to be displayed

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

getDocumentFunctions

protected List<OwDocumentFunction> getDocumentFunctions()
                                                 throws OwException
Throws:
OwException

createSplitView

protected OwSplitObjectListView createSplitView()
                                         throws Exception
Returns:
an OwSplitObjectListView with the document defined splits and corresponding property column header information.
Throws:
Exception

createSplitObjectListDocument

protected OwSplitObjectListDocument createSplitObjectListDocument(String[] splitNames,
                                                                  Collection<OwFieldColumnInfo>[] propertyColumnInfos,
                                                                  List<OwDocumentFunction> documentFunctions)
(overridable) Factory to create OwSplitObjectListDocument for internal OwSplitObjectListView .

Parameters:
splitNames - String array of Labels (display names) for the list view(s)
propertyColumnInfos - Collection of FieldColumnInfo objects
documentFunctions - List of document functions (can be null)
Returns:
OwSplitObjectListDocument

createRelationColumnInfo

protected Collection<OwFieldColumnInfo> createRelationColumnInfo(OwObjectLinkRelation relation)
                                                          throws Exception
(overridable) Create relation dependent columns to display.

Attention: If columns are defined for any relation kind, the same columns will be displayed.

Parameters:
relation - OwObjectLinkRelation objects which will be rendered.
Returns:
Collection of OwFieldColumnInfo
Throws:
Exception

getFilterDisplayName

public String getFilterDisplayName()
Returns:
filter region display name


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.