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

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.dmsdialogs.views.OwObjectListView
              extended by com.wewebu.ow.server.dmsdialogs.views.OwObjectListViewPluginCache
                  extended by com.wewebu.ow.server.dmsdialogs.views.OwObjectListViewEXTJSGrid
All Implemented Interfaces:
OwPageableView, OwFieldProvider, OwBaseView, OwUpdateTarget
Direct Known Subclasses:
OwObjectListViewFilterEXTJSGrid

public class OwObjectListViewEXTJSGrid
extends OwObjectListViewPluginCache
implements OwFieldProvider

Object list view based on YUI-EXT Grid view. Displays the results of searches.
Use setObjectList and setColumnInfo to set the objects and columns to display.

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 static class OwObjectListViewEXTJSGrid.OwAjaxColumnEntry
          Helper class for column handling.
static class OwObjectListViewEXTJSGrid.OwColumnInfoBagValue
           String-bag-value encoder/decoder for header based column information.
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.dmsdialogs.views.OwObjectListViewPluginCache
OwObjectListViewPluginCache.OwPluginStatus, OwObjectListViewPluginCache.OwPluginStatusCachingUtility
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.dmsdialogs.views.OwObjectListView
OwObjectListView.OwFilter, OwObjectListView.OwFilterEntry, OwObjectListView.OwHtmlAlignmentMap, OwObjectListView.OwIcon, OwObjectListView.OwObjectListViewEventListner, OwObjectListView.OwPluginEntry
 
Field Summary
protected static String AJAX_PARAM_COLUMN
          URL/HTTP parameter for column
protected static String AJAX_PARAM_ROW
          URL/HTTP parameter for row
protected static String COLUMNS_ID_ATTR_BAG
          the attribute bag id.
static int DATATYPE_BOOLEAN
          Data type for Boolean values
static int DATATYPE_DATE
          Data type for Date values
static int DATATYPE_DOUBLE
          Data type for Double values
static int DATATYPE_ENUM
          Data type for String enumeration types
static int DATATYPE_INTEGER
          Data type for Integer values
static int DATATYPE_NOTE
          Helper Data type to associate as Note property
static int DATATYPE_STRING
          Data type for String values
static int DATATYPE_UNKNOWN
          Data type for unknown/unsupported types
protected static int DEFAULT_COLUMN_WIDTH
          Default column width
static String END_ACTION_ID
           
static String FIRST_PAGE_ACTION_ID
           
protected static int ICON_WIDTH
          Icon width constant
static String LAST_PAGE_ACTION_ID
           
protected  HashMap m_AjaxColnameToPropertyMap
          maps AJAX column names to property names.
protected  OwFieldManager m_FieldManager
          instance of the property field class
protected  boolean m_isNoteEditable
          flag that allow to edit notes
protected  OwObjectCollection m_ObjectList
          list of objects to display
protected  boolean m_useTransparentIcon
          use transparent icon for not present icons
protected static int MAX_COLUMN_WIDTH
          Max column width
protected static int MIN_COLUMN_WIDTH
          Min column width
protected static String OBJECT_INDEX_KEY
          This definition overrides the OwObjectListView.OBJECT_INDEX_KEY constant because of AJAX framework integration.
protected  HashSet occuringObjectTypes
          occurring object types in list
protected static String PLUG_INDEX_KEY
          query string key for the plugin index.
protected  boolean pluginCacheCreated
          flag regarding the plugin cache creation
static String POS1_ACTION_ID
           
static String READ_ONLY_COLUMNS_NODE_NAME
          XML node name for the list of columns, which should be read-only in INLINE editing mode.
protected static char[] SPECIAL_CHARS
           
static String TOOLTIP_BLOCK_TOKEN_PROPERTY_END
           
static char TOOLTIP_BLOCK_TOKEN_PROPERTY_END_CHAR
          tooltip block (property dependent HLTL sequence) end token
static String TOOLTIP_BLOCK_TOKEN_PROPERTY_START
          tooltip block (property dependent HLTL sequence) start token
static String VIEWER_SERVLET_REPLACE_TOKEN_BASEURL
          token in the viewer servlet to be replaced by the base URL of the server with application context
static String VIEWER_SERVLET_REPLACE_TOKEN_DMSID
          token in the viewer servlet to be replaced by the DMSID
static char VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_ENCODE_CHAR
          char to indicate HTML encoding of given property
static String VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_END
          token in the viewer servlet to be replaced by the property end delimiter
static char VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_JSENCODE_CHAR
          char to indicate JavaScript encoding of given property
static char VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_NOENCODE_CHAR
          char to indicate NO encoding of given property
static String VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_START
          token in the viewer servlet to be replaced by the property following the :
static String VIEWER_SERVLET_REPLACE_TOKEN_SERVERURL
          token in the viewer servlet to be replaced by the base URL of the server
 
Fields inherited from class com.wewebu.ow.server.dmsdialogs.views.OwObjectListView
m_HtmlAlignments, m_isStickyFooterInUse, m_pageSelectorComponent, m_pagingNode, MULTISELECT_COMOBO_MENU_NAME, QUERY_KEY_PAGE, SORT_PROPERTY_KEY, VIEW_MASK_INLINE_EDITING, VIEW_MASK_INSTANCE_PLUGINS, VIEW_MASK_MULTI_SELECTION, VIEW_MASK_NO_PAGE_BUTTONS, VIEW_MASK_SINGLE_SELECTION, VIEW_MASK_USE_DOCUMENT_PLUGINS, VIEW_MASK_USE_SELECT_BUTTON
 
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.field.OwFieldProvider
TYPE_AJAX, TYPE_CHECKIN_OBJECT, TYPE_CREATE_OBJECT, TYPE_META_OBJECT, TYPE_RESULT_LIST, TYPE_SEARCH, TYPE_SMALL
 
Fields inherited from interface com.wewebu.ow.server.ui.OwBaseView
EMPTY_STRING
 
Constructor Summary
OwObjectListViewEXTJSGrid()
          construct a object list view with default view mask (0).
OwObjectListViewEXTJSGrid(int iViewMask_p)
          construct a object list view
 
Method Summary
protected  int computeEndIndex()
          Compute the end index, the index for the last displayed object, when paging is used.
static String convertDateFormat(String javaSimpleDateFormat_p)
          Java and ExtJS use different date format markup strings.
protected  OwMimeManager createMimeManager()
          (overridable) factory method the instantiate the MimeManager
 void detach()
          remove view and all subviews from context
protected  String encodeJsonString(String in_p)
          replace all JavaScript Special characters with their escape sequence
protected  ArrayList getAjaxColumns()
           
protected  int getColumnDataType(OwPropertyClass propertyClass_p)
          Returning an int representing the data type of the property.
 Collection getColumnInfo()
          get the list of column info to be used by this list view
 int getCount()
          get number of items in the list
 int getCurrentPage()
          get current zero based page number in multiples of getPageSize()
protected  String getDateInTransportFormat(Date dateVal_p)
          Transform a Date into the defined transport format.
protected  String getDocumentInstanceFunctionPluginLinks(OwObject obj_p, int iIndex_p, Collection instancePluginsList_p)
          insert the document function plugins for the requested row index and object
protected  String getEncodedPropertyValue(OwObjectListViewEXTJSGrid.OwAjaxColumnEntry ace_p, OwProperty prop_p)
          Encode the value of the given property depending on data type of the property.
 OwField getField(String strFieldClassName_p)
          Methods for OwFieldProvider interface **
 OwFieldManager getFieldManager()
          get the internal fieldmanager
 String getFieldProviderName()
          get a name that identifies the field provider, e.g.
 Object getFieldProviderSource()
          get the source object that originally provided the fields.
 int getFieldProviderType()
          get the type of field provider can be one or more of TYPE_...
 Collection getFields()
          get all the properties in the form
 String getIcon()
          get the icon URL for this view to be displayed
 String getLoadingMessage()
          Returns the localized loading message.
protected  OwMimeManager getMimeManager()
          Get the instance of the MIME manager used to open the objects
 Collection getObjectInstancePluginList()
          Returns a list of all supported plugins shown next to object instance.
 OwObjectCollection getObjectList()
          get the current object list
 int getPageCount()
          retrieve number of available pages
protected  List getReadOnlyColumns()
          Returns the definitions of read only columns, List of String's which represent the ID/symbolic name of properties which should be read-only marked.
protected  OwClientRefreshContext getRefreshContext()
          get an eventlistener with this view to receive notifications
 Collection getRetrievalPropertyNames()
          get a collection of property names that are needed to display the Objects in the list i.e.
protected  String getRowClassName(int iIndex_p, OwObject obj_p)
          overridable get the style class name for the row
 Object getSafeFieldValue(String sName_p, Object defaultvalue_p)
          retrieve the value of a Field
 boolean getShowPaging()
          Check if paging component should be shown.
 OwSort getSort()
          get the current selected sort instance
 int getStartRow()
          Returns the current start row.
 String getTitle()
          overridable title of the view
protected  String getToolTipPattern()
          Return the configured tool tip pattern, or null if no pattern was defined.
protected  String getTooltipUrl(OwObject obj_p)
          Returns the Tooltip URL
 boolean hasToolTipPattern()
          Method returning boolean value, depending on the existence of a tool tip pattern.
protected  void init()
          init this view after the context has been set
protected  boolean isConfiguredAsReadOnly(String property_p)
          Check if the given property name was configured as read only.
 boolean isNoteEditable()
          Check if the note can be edited.
 boolean isNoteProperty(String propName_p)
          Return flag, which indicates if the given property is defined as Note property.
static boolean isPhpSpecialChar(char testChar_p)
          Check if the character has a meaning as a PHP date format pattern.
protected  boolean isPropertyEditable(OwPropertyClass propertyClass_p)
          Check if the given property is editable, for inline editing in the UI.
 void onAjaxgetColumnInfo(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
          called upon AJAX request "getColumnInfo"
 void onAjaxgetContextmenu(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
          called upon AJAX request "getColumnInfo"
 void onAjaxgetEnumInfo(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
          called upon getEnumInfo AJAX call.
encodes the enumeration entries with the following format :
[[value,display_text],display_text]
 void onAjaxPersistSelection(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
          Called upon AJAX request "PersistSelection"
 void onAjaxReadList(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
          called upon AJAX request "ReadList"
 void onAjaxsetCellData(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
          called upon AJAX request "getColumnInfo"
 void onAjaxsetColumnInfo(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
          called upon AJAX request "setColumnInfo"
 void onPluginEvent(javax.servlet.http.HttpServletRequest request_p)
          event called when user clicked on a plugin link of an object entry in the list
 void onRender(Writer w_p)
          render the view
protected  void pageAbsolut(int page_p)
          Move to the given zero based absolute page
protected  void processOccurred(OwObject obj)
          Process occurred object types, for quicker handling of document functions.
protected  void renderMainRegion(Writer w_p)
          (overridable) render the JSP page
 void setColumnInfo(Collection columnInfo_p)
          set the list of column info to be used by this list view
 void setConfigNode(Node node_p)
          optional use the default constructor and set a config node to configure the view with XML This may override the settings in the ViewMaks, see setViewMask
 void setField(String sName_p, Object value_p)
          modify a Field value, but does not save the value right away
 void setFieldManager(OwFieldManager fielmanager_p)
          set the internal fieldmanager in case you want a specific fieldmanager
 void setNoteEditable(boolean isNoteEditable_p)
          Set the editable note property.
 void setObjectList(OwObjectCollection objectList_p, OwObject parentObject_p)
          set the list of objects to be displayed by this list view
 void setRefreshContext(OwClientRefreshContext eventlister_p)
          register an eventlistener with this view to receive notifications
 void setSort(OwSort sort_p)
          set / overwrite current sort to given sort
protected  boolean showsContextMenuPlugin(OwDocumentFunction docFunction_p)
           
 
Methods inherited from class com.wewebu.ow.server.dmsdialogs.views.OwObjectListViewPluginCache
createPluginStatusCacheUtility, createPluginStatusCacheUtility, getPluginCache, setPluginCache
 
Methods inherited from class com.wewebu.ow.server.dmsdialogs.views.OwObjectListView
addAjaxPersistenceService, addViewMask, canPageNext, canPagePrev, clearViewMask, copy, createFilter, createFilter, createFilter, createPageSelector, getContextMenuFunction, getDocumentFunction, getDocumentFunctionPluginList, getEventListner, getFilter, getFilterOperators, getFilterSearch, getListViewID, getPageAbsolutEventURL, getPageNextEventURL, getPagePrevEventURL, getParentObject, getPluginEntries, hasPaging, hasViewMask, isEmptyPluginColumnRendered, isObjectSelectionPersisted, isObjectTypeSupportedByPlugin, isPagingEnabled, isStickyFooterInUse, onPageAbsolut, onPageNext, onPagePrev, persistAjaxTriggeredSelection, persistObjectSelectionState, renderContextMenu, resetPersistedSelectionState, setCurrentPage, setDocumentFunctionPluginList, setEventListner, setFilter, setParentObject, setRenderEmptyPluginColumn, setStickyFooterInUse, setViewMask
 
Methods inherited from class com.wewebu.ow.server.ui.OwView
activate, addView, getBreadcrumbPart, getDocument, getExternalFormEventTarget, getFormName, getFormTarget, getIterator, getMaximizeView, getParent, getRenderedNamedRegion, getRenderedRegion, getViewList, isFormTargetExternal, isNamedRegion, isRegion, isShowMaximized, isShowMinimized, isShowNormal, onActivate, onUpdate, render, renderHTMLFormular, renderNamedRegion, renderRegion, 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
 
Methods inherited from interface com.wewebu.ow.server.dmsdialogs.views.OwPageableView
getContext
 
Methods inherited from interface com.wewebu.ow.server.ui.OwBaseView
getBreadcrumbPart, isNamedRegion, isRegion, render, renderNamedRegion, renderRegion
 

Field Detail

SPECIAL_CHARS

protected static final char[] SPECIAL_CHARS

ICON_WIDTH

protected static final int ICON_WIDTH
Icon width constant

Since:
4.0.0.0
See Also:
Constant Field Values

DEFAULT_COLUMN_WIDTH

protected static final int DEFAULT_COLUMN_WIDTH
Default column width

Since:
4.0.0.0
See Also:
Constant Field Values

MAX_COLUMN_WIDTH

protected static final int MAX_COLUMN_WIDTH
Max column width

Since:
4.0.0.0
See Also:
Constant Field Values

MIN_COLUMN_WIDTH

protected static final int MIN_COLUMN_WIDTH
Min column width

Since:
4.0.0.0
See Also:
Constant Field Values

COLUMNS_ID_ATTR_BAG

protected static final String COLUMNS_ID_ATTR_BAG
the attribute bag id.

Since:
3.2.0.0
See Also:
Constant Field Values

OBJECT_INDEX_KEY

protected static final String OBJECT_INDEX_KEY
This definition overrides the OwObjectListView.OBJECT_INDEX_KEY constant because of AJAX framework integration. query string key for the object list index to find the selected object upon onMimeOpenObject.

See Also:
Constant Field Values

PLUG_INDEX_KEY

protected static final String PLUG_INDEX_KEY
query string key for the plugin index.

See Also:
Constant Field Values

READ_ONLY_COLUMNS_NODE_NAME

public static final String READ_ONLY_COLUMNS_NODE_NAME
XML node name for the list of columns, which should be read-only in INLINE editing mode.

Since:
3.1.0.0
See Also:
Constant Field Values

VIEWER_SERVLET_REPLACE_TOKEN_DMSID

public static final String VIEWER_SERVLET_REPLACE_TOKEN_DMSID
token in the viewer servlet to be replaced by the DMSID

See Also:
Constant Field Values

VIEWER_SERVLET_REPLACE_TOKEN_SERVERURL

public static final String VIEWER_SERVLET_REPLACE_TOKEN_SERVERURL
token in the viewer servlet to be replaced by the base URL of the server

See Also:
Constant Field Values

VIEWER_SERVLET_REPLACE_TOKEN_BASEURL

public static final String VIEWER_SERVLET_REPLACE_TOKEN_BASEURL
token in the viewer servlet to be replaced by the base URL of the server with application context

See Also:
Constant Field Values

VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_START

public static final String VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_START
token in the viewer servlet to be replaced by the property following the :

See Also:
Constant Field Values

VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_ENCODE_CHAR

public static final char VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_ENCODE_CHAR
char to indicate HTML encoding of given property

See Also:
Constant Field Values

VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_JSENCODE_CHAR

public static final char VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_JSENCODE_CHAR
char to indicate JavaScript encoding of given property

See Also:
Constant Field Values

VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_NOENCODE_CHAR

public static final char VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_NOENCODE_CHAR
char to indicate NO encoding of given property

See Also:
Constant Field Values

VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_END

public static final String VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_END
token in the viewer servlet to be replaced by the property end delimiter

See Also:
Constant Field Values

TOOLTIP_BLOCK_TOKEN_PROPERTY_END_CHAR

public static final char TOOLTIP_BLOCK_TOKEN_PROPERTY_END_CHAR
tooltip block (property dependent HLTL sequence) end token

See Also:
Constant Field Values

TOOLTIP_BLOCK_TOKEN_PROPERTY_END

public static final String TOOLTIP_BLOCK_TOKEN_PROPERTY_END
See Also:
Constant Field Values

TOOLTIP_BLOCK_TOKEN_PROPERTY_START

public static final String TOOLTIP_BLOCK_TOKEN_PROPERTY_START
tooltip block (property dependent HLTL sequence) start token

See Also:
Constant Field Values

DATATYPE_UNKNOWN

public static final int DATATYPE_UNKNOWN
Data type for unknown/unsupported types

See Also:
Constant Field Values

DATATYPE_STRING

public static final int DATATYPE_STRING
Data type for String values

See Also:
Constant Field Values

DATATYPE_INTEGER

public static final int DATATYPE_INTEGER
Data type for Integer values

See Also:
Constant Field Values

DATATYPE_BOOLEAN

public static final int DATATYPE_BOOLEAN
Data type for Boolean values

See Also:
Constant Field Values

DATATYPE_DATE

public static final int DATATYPE_DATE
Data type for Date values

See Also:
Constant Field Values

DATATYPE_DOUBLE

public static final int DATATYPE_DOUBLE
Data type for Double values

See Also:
Constant Field Values

DATATYPE_ENUM

public static final int DATATYPE_ENUM
Data type for String enumeration types

See Also:
Constant Field Values

DATATYPE_NOTE

public static final int DATATYPE_NOTE
Helper Data type to associate as Note property

See Also:
Constant Field Values

AJAX_PARAM_COLUMN

protected static final String AJAX_PARAM_COLUMN
URL/HTTP parameter for column

See Also:
Constant Field Values

AJAX_PARAM_ROW

protected static final String AJAX_PARAM_ROW
URL/HTTP parameter for row

See Also:
Constant Field Values

FIRST_PAGE_ACTION_ID

public static String FIRST_PAGE_ACTION_ID

LAST_PAGE_ACTION_ID

public static String LAST_PAGE_ACTION_ID

POS1_ACTION_ID

public static String POS1_ACTION_ID

END_ACTION_ID

public static String END_ACTION_ID

m_ObjectList

protected OwObjectCollection m_ObjectList
list of objects to display


pluginCacheCreated

protected boolean pluginCacheCreated
flag regarding the plugin cache creation

Since:
3.1.0.4

m_FieldManager

protected OwFieldManager m_FieldManager
instance of the property field class


m_AjaxColnameToPropertyMap

protected HashMap m_AjaxColnameToPropertyMap
maps AJAX column names to property names. Needed since AJAX columns may be reordered on client side.


occuringObjectTypes

protected HashSet occuringObjectTypes
occurring object types in list


m_useTransparentIcon

protected boolean m_useTransparentIcon
use transparent icon for not present icons


m_isNoteEditable

protected boolean m_isNoteEditable
flag that allow to edit notes

Constructor Detail

OwObjectListViewEXTJSGrid

public OwObjectListViewEXTJSGrid(int iViewMask_p)
construct a object list view

Parameters:
iViewMask_p - int combination of VIEW_MASK_... defined flags

OwObjectListViewEXTJSGrid

public OwObjectListViewEXTJSGrid()
construct a object list view with default view mask (0).

Method Detail

init

protected void init()
             throws Exception
init this view after the context has been set

Overrides:
init in class OwObjectListView
Throws:
Exception

createMimeManager

protected OwMimeManager createMimeManager()
(overridable) factory method the instantiate the MimeManager

Since:
2.5.2.0

getAjaxColumns

protected ArrayList getAjaxColumns()
Returns:
ArrayList
Since:
2.5.2.0

detach

public void detach()
remove view and all subviews from context

Overrides:
detach in class OwView

setConfigNode

public void setConfigNode(Node node_p)
                   throws Exception
optional use the default constructor and set a config node to configure the view with XML This may override the settings in the ViewMaks, see setViewMask

Overrides:
setConfigNode in class OwObjectListView
Parameters:
node_p - XML node with configuration information
Throws:
Exception

getDocumentInstanceFunctionPluginLinks

protected String getDocumentInstanceFunctionPluginLinks(OwObject obj_p,
                                                        int iIndex_p,
                                                        Collection instancePluginsList_p)
                                                 throws Exception
insert the document function plugins for the requested row index and object

Parameters:
obj_p - OwObject to create Function plugin for
iIndex_p - the row / object index
instancePluginsList_p - Collection of plugins that are visible (have there own column) together with the global index
Throws:
Exception

onRender

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

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

renderMainRegion

protected void renderMainRegion(Writer w_p)
                         throws Exception
(overridable) render the JSP page

Parameters:
w_p - Writer to write to
Throws:
Exception

getStartRow

public int getStartRow()
Returns the current start row. Called by the JSP page to configure the initial state of the Ajax grid. Used to initiate the Grid on the last displayed page after a page reload.

Returns:
The last starting row queried by the Ajax grid

onAjaxReadList

public void onAjaxReadList(javax.servlet.http.HttpServletRequest request_p,
                           javax.servlet.http.HttpServletResponse response_p)
                    throws Exception
called upon AJAX request "ReadList"

Parameters:
request_p -
response_p -
Throws:
Exception

getTooltipUrl

protected String getTooltipUrl(OwObject obj_p)
Returns the Tooltip URL

Parameters:
obj_p -
Returns:
String
Since:
2.5.3.1

onAjaxPersistSelection

public void onAjaxPersistSelection(javax.servlet.http.HttpServletRequest request_p,
                                   javax.servlet.http.HttpServletResponse response_p)
                            throws Exception
Called upon AJAX request "PersistSelection"

Parameters:
request_p -
response_p -
Throws:
Exception

onAjaxgetEnumInfo

public void onAjaxgetEnumInfo(javax.servlet.http.HttpServletRequest request_p,
                              javax.servlet.http.HttpServletResponse response_p)
                       throws Exception
called upon getEnumInfo AJAX call.
encodes the enumeration entries with the following format :
[[value,display_text],display_text]

Parameters:
request_p -
response_p -
Throws:
Exception

onAjaxgetColumnInfo

public void onAjaxgetColumnInfo(javax.servlet.http.HttpServletRequest request_p,
                                javax.servlet.http.HttpServletResponse response_p)
                         throws Exception
called upon AJAX request "getColumnInfo"

Parameters:
request_p -
response_p -
Throws:
Exception

onAjaxsetColumnInfo

public void onAjaxsetColumnInfo(javax.servlet.http.HttpServletRequest request_p,
                                javax.servlet.http.HttpServletResponse response_p)
                         throws Exception
called upon AJAX request "setColumnInfo"

Parameters:
request_p -
response_p -
Throws:
Exception

showsContextMenuPlugin

protected boolean showsContextMenuPlugin(OwDocumentFunction docFunction_p)
Parameters:
docFunction_p -
Returns:
true if this AJAX grid list view should display the given document function
Since:
2.5.2.0

onAjaxgetContextmenu

public void onAjaxgetContextmenu(javax.servlet.http.HttpServletRequest request_p,
                                 javax.servlet.http.HttpServletResponse response_p)
                          throws Exception
called upon AJAX request "getColumnInfo"

Parameters:
request_p -
response_p -
Throws:
Exception

onAjaxsetCellData

public void onAjaxsetCellData(javax.servlet.http.HttpServletRequest request_p,
                              javax.servlet.http.HttpServletResponse response_p)
                       throws Exception
called upon AJAX request "getColumnInfo"

Parameters:
request_p -
response_p -
Throws:
Exception

onPluginEvent

public void onPluginEvent(javax.servlet.http.HttpServletRequest request_p)
                   throws Exception
event called when user clicked on a plugin link of an object entry in the list

Parameters:
request_p - HttpServletRequest
Throws:
Exception

encodeJsonString

protected String encodeJsonString(String in_p)
replace all JavaScript Special characters with their escape sequence

Parameters:
in_p - String input to be encoded
Returns:
String encoded string

convertDateFormat

public static String convertDateFormat(String javaSimpleDateFormat_p)
Java and ExtJS use different date format markup strings. This method converts the Java date format into the date format used by ExtJS (PHP). ExtJS uses the PHP date format. See source/util/Date.js.

Parameters:
javaSimpleDateFormat_p - String to search and replace
Returns:
String

isPhpSpecialChar

public static boolean isPhpSpecialChar(char testChar_p)
Check if the character has a meaning as a PHP date format pattern. If so, it must be escaped in the PHP date format string.

Parameters:
testChar_p - char character to test
Returns:
boolean

getTitle

public String getTitle()
overridable title of the view

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

getIcon

public String getIcon()
               throws Exception
get the icon URL for this view to be displayed

Overrides:
getIcon in class OwView
Returns:
String icon URL, or null if not defined
Throws:
Exception

getColumnInfo

public Collection getColumnInfo()
get the list of column info to be used by this list view

Specified by:
getColumnInfo in class OwObjectListView
Returns:
Collection of OwFieldColumnInfo's

getCount

public int getCount()
get number of items in the list

Specified by:
getCount in interface OwPageableView
Specified by:
getCount in class OwObjectListView
Returns:
int

getFieldManager

public OwFieldManager getFieldManager()
get the internal fieldmanager

Specified by:
getFieldManager in class OwObjectListView

setFieldManager

public void setFieldManager(OwFieldManager fielmanager_p)
set the internal fieldmanager in case you want a specific fieldmanager

Specified by:
setFieldManager in class OwObjectListView

getObjectList

public OwObjectCollection getObjectList()
get the current object list

Specified by:
getObjectList in class OwObjectListView

getRefreshContext

protected OwClientRefreshContext getRefreshContext()
get an eventlistener with this view to receive notifications

Specified by:
getRefreshContext in class OwObjectListView
Returns:
OwClientRefreshContext

getRetrievalPropertyNames

public Collection getRetrievalPropertyNames()
                                     throws Exception
get a collection of property names that are needed to display the Objects in the list i.e. these properties should be requested in advance to save server roundtrips.

Specified by:
getRetrievalPropertyNames in class OwObjectListView
Returns:
Collection of String
Throws:
Exception

getSort

public OwSort getSort()
get the current selected sort instance

Specified by:
getSort in class OwObjectListView
Returns:
OwSort object

getRowClassName

protected String getRowClassName(int iIndex_p,
                                 OwObject obj_p)
overridable get the style class name for the row

Parameters:
iIndex_p - int row index
obj_p - current OwObject
Returns:
String with style class name

setColumnInfo

public void setColumnInfo(Collection columnInfo_p)
set the list of column info to be used by this list view

Specified by:
setColumnInfo in class OwObjectListView
Parameters:
columnInfo_p - List of OwFieldColumnInfo's

setObjectList

public void setObjectList(OwObjectCollection objectList_p,
                          OwObject parentObject_p)
                   throws Exception
set the list of objects to be displayed by this list view

Specified by:
setObjectList in class OwObjectListView
Parameters:
objectList_p - OwObjectCollection, can be null
parentObject_p - OwObject parent which created the object list, can be null if no parent is specified
Throws:
Exception

pageAbsolut

protected void pageAbsolut(int page_p)
                    throws Exception
Move to the given zero based absolute page

Overrides:
pageAbsolut in class OwObjectListView
Parameters:
page_p - int zero based page number in multiples of page size
Throws:
Exception
Since:
2.5.2.0

getPageCount

public int getPageCount()
                 throws Exception
Description copied from class: OwObjectListView
retrieve number of available pages

Specified by:
getPageCount in interface OwPageableView
Overrides:
getPageCount in class OwObjectListView
Returns:
int number of pages for paging in multiples of page size
Throws:
Exception
Since:
2.5.2.0

getCurrentPage

public int getCurrentPage()
Description copied from class: OwObjectListView
get current zero based page number in multiples of getPageSize()

Specified by:
getCurrentPage in interface OwPageableView
Overrides:
getCurrentPage in class OwObjectListView
Returns:
current zero based page number in multiples of page sizes calculated based on m_startrow
Since:
2.5.2.0

getShowPaging

public boolean getShowPaging()
                      throws Exception
Check if paging component should be shown.

Returns:
true if paging component should be displayed.
Throws:
Exception
Since:
3.0.0.0

setRefreshContext

public void setRefreshContext(OwClientRefreshContext eventlister_p)
register an eventlistener with this view to receive notifications

Specified by:
setRefreshContext in class OwObjectListView
Parameters:
eventlister_p - OwClientRefreshContext interface

setSort

public void setSort(OwSort sort_p)
set / overwrite current sort to given sort

Specified by:
setSort in class OwObjectListView
Parameters:
sort_p - new OwSort

getField

public OwField getField(String strFieldClassName_p)
                 throws Exception,
                        OwObjectNotFoundException
Methods for OwFieldProvider interface **

Specified by:
getField in interface OwFieldProvider
Parameters:
strFieldClassName_p - String class name of requested fields
Returns:
OwField or throws OwObjectNotFoundException
Throws:
Exception
OwObjectNotFoundException

getFieldProviderName

public String getFieldProviderName()
Description copied from interface: OwFieldProvider
get a name that identifies the field provider, e.g. the name of the underlying JSP page

Specified by:
getFieldProviderName in interface OwFieldProvider
Returns:
String unique ID / Name of fieldprovider, or null

getFieldProviderSource

public Object getFieldProviderSource()
Description copied from interface: OwFieldProvider
get the source object that originally provided the fields. e.g. the fieldprovider might be a template pattern implementation like a view, where the original provider would still be an OwObject

Specified by:
getFieldProviderSource in interface OwFieldProvider
Returns:
Object the original source object where the fields have been taken, can be a this pointer or null

getFieldProviderType

public int getFieldProviderType()
Description copied from interface: OwFieldProvider
get the type of field provider can be one or more of TYPE_...

Specified by:
getFieldProviderType in interface OwFieldProvider

getFields

public Collection getFields()
                     throws Exception
get all the properties in the form

Specified by:
getFields in interface OwFieldProvider
Returns:
Collection of OwField
Throws:
Exception

getSafeFieldValue

public Object getSafeFieldValue(String sName_p,
                                Object defaultvalue_p)
retrieve the value of a Field

Specified by:
getSafeFieldValue in interface OwFieldProvider
Parameters:
sName_p -
defaultvalue_p -
Returns:
Object the value of the Field of defaultvalue_p

setField

public void setField(String sName_p,
                     Object value_p)
              throws Exception,
                     OwObjectNotFoundException
modify a Field value, but does not save the value right away

Specified by:
setField in interface OwFieldProvider
Parameters:
sName_p -
value_p -
Throws:
Exception
OwObjectNotFoundException

getObjectInstancePluginList

public Collection getObjectInstancePluginList()
Returns a list of all supported plugins shown next to object instance. If list is null the list will be created first.

Returns:
m_ObjectInstancePluginList

processOccurred

protected void processOccurred(OwObject obj)
Process occurred object types, for quicker handling of document functions.

Parameters:
obj - OwObject

isNoteEditable

public boolean isNoteEditable()
Check if the note can be edited.

Returns:
true if the notes are editable
Since:
2.5.2.0

setNoteEditable

public void setNoteEditable(boolean isNoteEditable_p)
Set the editable note property.

Parameters:
isNoteEditable_p -
Since:
2.5.2.0

computeEndIndex

protected int computeEndIndex()
Compute the end index, the index for the last displayed object, when paging is used.

Returns:
- the end index
Since:
3.0.0.0

getMimeManager

protected OwMimeManager getMimeManager()
Get the instance of the MIME manager used to open the objects

Since:
3.0.0.0

getColumnDataType

protected int getColumnDataType(OwPropertyClass propertyClass_p)
                         throws Exception
Returning an int representing the data type of the property. Will return -1 if the property have an unknown/unsupported type.
  -1 = unknown/unsupported (DATATYPE_UNKNOWN)
  0 = String (DATATYPE_STRING)
  1 = Integer (DATATYPE_INTEGER)
  2 = Boolean (DATATYPE_BOOLEAN)
  3 = Date (DATATYPE_DATE)
  4 = Double (DATATYPE_DOUBLE)
  5 = Enumeration (any kind of) (DATATYPE_ENUM)
  6 = Note property handling (DATATYPE_NOTE)
 

Parameters:
propertyClass_p - OwPropertyClass from which to retrieve the data type
Returns:
int representing the data type, -1 for unknown/unsupported type
Throws:
Exception - if cannot retrieve information from property class
Since:
2.5.3.1

isNoteProperty

public boolean isNoteProperty(String propName_p)
Return flag, which indicates if the given property is defined as Note property.

Parameters:
propName_p - String representing the property symbolic or unique name
Returns:
boolean true if it is a note property, else false
Since:
2.5.3.1

isPropertyEditable

protected boolean isPropertyEditable(OwPropertyClass propertyClass_p)
                              throws Exception
Check if the given property is editable, for inline editing in the UI.

Parameters:
propertyClass_p - OwPropertyClass to check for editing (non-null)
Returns:
boolean true if editing is allowed
Throws:
Exception - if can not request information from given property class
Since:
2.5.3.1

hasToolTipPattern

public boolean hasToolTipPattern()
Method returning boolean value, depending on the existence of a tool tip pattern.

Returns:
true if pattern exist, else false
Since:
2.5.3.1

getToolTipPattern

protected String getToolTipPattern()
Return the configured tool tip pattern, or null if no pattern was defined.

Returns:
String representing the pattern or null
Since:
2.5.3.1

getDateInTransportFormat

protected String getDateInTransportFormat(Date dateVal_p)
Transform a Date into the defined transport format.

Parameters:
dateVal_p - Date (non-null)
Returns:
String representing the transport date format
Since:
2.5.3.1

getEncodedPropertyValue

protected String getEncodedPropertyValue(OwObjectListViewEXTJSGrid.OwAjaxColumnEntry ace_p,
                                         OwProperty prop_p)
                                  throws Exception
Encode the value of the given property depending on data type of the property.

ATTENTION: Neither the given property nor the property value should be null, otherwise it will lead to a NullpointerException.

Parameters:
ace_p - OwAjaxColumnEntry represents the column for which to render the column
prop_p - OwProperty to be used for value retrieving
Returns:
String representation of the property value
Throws:
Exception
Since:
2.5.3.1

getReadOnlyColumns

protected List getReadOnlyColumns()
Returns the definitions of read only columns, List of String's which represent the ID/symbolic name of properties which should be read-only marked.

Returns:
List of String's, or empty List
Since:
3.1.0.0

isConfiguredAsReadOnly

protected boolean isConfiguredAsReadOnly(String property_p)
Check if the given property name was configured as read only.

Parameters:
property_p - String ID/symbolic name of property
Returns:
boolean true if contained in getReadOnlyColumns()
Since:
3.1.0.0
See Also:
getReadOnlyColumns()

getLoadingMessage

public String getLoadingMessage()
Returns the localized loading message.

Returns:
- the localized loading message
Since:
3.1.0.3


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.