public class OwObjectListViewThumbnails extends OwPageableListView implements OwFieldProvider
Object list 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
Modifier and Type | Class and Description |
---|---|
protected static class |
OwObjectListViewThumbnails.ThumbnailTypeConfig
configdata of thumbnail type
|
OwObjectListView.OwFilter, OwObjectListView.OwFilterEntry, OwObjectListView.OwHtmlAlignmentMap, OwObjectListView.OwIcon, OwObjectListView.OwObjectListViewEventListner, OwObjectListView.OwPluginEntry
Modifier and Type | Field and Description |
---|---|
static int |
CONTEXT_MENU |
static int |
DEFAULT_THUMBS_PER_ROW |
protected Collection<?> |
m_ColumnInfoList
Deprecated.
since 4.2.0.0 use set-/
OwPageableListView.getColumnInfo() instead |
protected int |
m_iCurrentPage
Deprecated.
since 4.2.0.0 use
OwPageableListView.getCurrentPage() |
protected OwMainAppContext |
m_MainContext
reference to the cast AppContext
|
protected OwMimeManager |
m_MimeManager
instance of the MIME manager used to open the objects
|
protected OwClientRefreshContext |
m_RefreshContext
Deprecated.
since 4.2.0.0 use set-/
OwPageableListView.getRefreshContext() instead |
protected OwSort |
m_Sort
Deprecated.
since 4.2.0.0 use set-/
OwPageableListView.getSort() instead |
protected OwFieldManager |
m_theFieldManager
Deprecated.
since 4.2.0.0 use set-/
OwPageableListView.getFieldManager() instead |
protected ArrayList<OwObjectListViewThumbnails.ThumbnailTypeConfig> |
m_ThumbnailTypes
list of thumbnail types
|
protected boolean |
m_useContextMenu
flag indicating if context menu should be shown
|
protected int |
MAX_THUMBNAIL_PER_ROW
how many thumbnails should be display per row
|
static int |
PAGE_BUTTONS |
static int |
THUMBNAIL_LIST |
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 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_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
|
m_HtmlAlignments, m_isStickyFooterInUse, m_pageSelectorComponent, m_pagingNode, MULTISELECT_COMOBO_MENU_NAME, OBJECT_INDEX_KEY, PLUG_INDEX_KEY, QUERY_KEY_PAGE, SELECT_DESELECT_NONCONSECUTIVE_OBJECTS_ACTION_ID, 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
CURRENT_MODULE_KEY, FORMULAR_PLACEHOLDER_END_DELIMITER, FORMULAR_PLACEHOLDER_START_DELIMITER, m_externalFormEventTarget
TYPE_AJAX, TYPE_CHECKIN_OBJECT, TYPE_CREATE_OBJECT, TYPE_META_OBJECT, TYPE_RESULT_LIST, TYPE_SEARCH, TYPE_SMALL
EMPTY_STRING
Constructor and Description |
---|
OwObjectListViewThumbnails()
construct a object list view
|
OwObjectListViewThumbnails(int iViewMask_p)
construct a object list view
|
Modifier and Type | Method and Description |
---|---|
void |
detach()
remove view and all subviews from context
|
OwField |
getField(String strFieldClassName_p)
get a field with the given field definition class name
|
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
|
protected String |
getHtmlAlignment(int iAlignment_p)
method to retrieve HTML alignment attributes out of OwFieldColumnInfo alignment
|
String |
getIcon()
get the icon URL for this view to be displayed
|
boolean |
getIsList()
Check if list is valid and there are available items to render.
|
boolean |
getIsListValid()
Check if there are all needed information available for successful rendering.
|
Collection |
getRetrievalPropertyNames()
get a collection of property names that are needed to display the Objects in the list
i.e.
|
Object |
getSafeFieldValue(String sName_p,
Object defaultvalue_p)
retrieve the value of a Field
|
protected String |
getThumbnailRowId(int idx_p,
int line_p)
Get Thumbnail RowId
|
int |
getThumbnailTypeCount() |
String |
getThumbnailTypeDisplayName(int i_p) |
String |
getThumbnailTypeUrl(int i_p) |
String |
getTitle()
overridable title of the view
|
protected void |
init()
init the view after the context is set.
|
protected void |
insertDocumentFunctionPlugins(Writer w_p,
OwObject obj_p,
int iIndex_p,
Collection<OwObjectListView.OwPluginEntry> instancePluginsList_p)
insert the document function plugins for the requested row index and object
|
protected void |
insertStatus(Writer w_p,
OwObject obj_p,
int iIndex_p)
Inserts status HTML part of the thumbnail bar.
|
protected void |
insertThumbnailBar(Writer w_p,
OwObject obj_p,
int iIndex_p,
Collection<OwObjectListView.OwPluginEntry> instancePluginsList_p)
Inserts the thumbnail action bar (document function plugins and status notifications).
|
protected boolean |
isPagingEnabled()
Extended check for page selector functionality.
|
boolean |
isRegion(int iRegion_p)
determine if region exists
|
void |
onAjaxPersistSelection(javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p)
Called upon AJAX request "PersistSelection"
|
void |
onColumnClickEvent(javax.servlet.http.HttpServletRequest request_p)
event called when user clicked on a plugin column
|
void |
onContextMenuEvent(javax.servlet.http.HttpServletRequest request_p)
event called when user clicked on a plugin link on the context menu
|
void |
onMultiSelectEvent(javax.servlet.http.HttpServletRequest request_p)
event called when user submitted the multi select form
|
void |
onPluginEvent(javax.servlet.http.HttpServletRequest request_p)
event called when user clicked on a plugin link of an object entry in the list
|
protected void |
onRender(Writer w_p)
render the view
|
void |
onSelect(javax.servlet.http.HttpServletRequest request_p)
event called when user selected an item
|
void |
onSort(javax.servlet.http.HttpServletRequest request_p)
event called when user clicked a sort header
|
protected void |
renderBlockBegin(int startIndexPosition_p,
int currentPosition_p,
StringWriter w_p)
Render block begin.
|
protected void |
renderBlockEnd(int startIndexPosition_p,
int endIndexPosition_p,
int currentPosition_p,
StringWriter w_p)
Render block end
|
protected void |
renderPageButtons(Writer w_p)
render the paging buttons
|
void |
renderRegion(Writer w_p,
int iRegion_p)
render only a region in the view, used by derived classes
|
protected Set<Integer> |
renderThumbnails(Writer w_p,
Collection<OwObjectListView.OwPluginEntry> instancePluginsList_p)
render the header portion of the object list
|
protected static String |
replaceProperties(OwMainAppContext context_p,
String strIn_p,
OwObjectReference obj_p)
replace a object property placeholder
|
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 |
setObjectIterable(OwIterable<OwObject> iterable,
OwObject parentObject_p)
set a pageable interface for retrieval of items to display.
|
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 event listener with this view to receive notifications
|
boolean |
updateExternalFormTarget(javax.servlet.http.HttpServletRequest request_p,
boolean fSave_p)
update the target after a form event, so it can set its form fields
|
protected String |
usesFormWithAttributes()
to get additional form attributes used for the form
override if your view needs a form.
|
canPageNext, canPagePrev, getColumnInfo, getCurrentPage, getDisplayedPage, getFieldManager, getObjectIterable, getObjectList, getPageAbsolutEventURL, getPageCount, getPageNextEventURL, getPagePrevEventURL, getPageSize, getRefreshContext, getSort, isCollectionComplete, onClientRefreshContextUpdate, onPageAbsolut, onPageNext, onPagePrev, pageAbsolut, setColumnInfo, setFieldManager, setSort
addAjaxPersistenceService, addViewMask, clearViewMask, copy, createFilter, createFilter, createFilter, createPageSelector, getContextMenuFunction, getCount, getDocumentFunction, getDocumentFunctionPluginList, getEventListner, getFilter, getFilterOperators, getFilterSearch, getListViewID, getObjectByIndex, getParentObject, getPluginEntries, hasPaging, hasViewMask, isEmptyPluginColumnRendered, isObjectSelectionPersisted, isObjectTypeSupportedByPlugin, isShowMaximized, isStickyFooterInUse, persistAjaxTriggeredSelection, persistAjaxTriggeredSelection, persistObjectSelectionState, renderContextMenu, resetPersistedSelectionState, setCurrentPage, setDocumentFunctionPluginList, setEventListner, setFilter, setParentObject, setRenderEmptyPluginColumn, setStickyFooterInUse, setViewMask
activate, addView, getBreadcrumbPart, getDocument, getExternalFormEventTarget, getFormName, getFormTarget, getIterator, getMaximizeView, getParent, getRenderedNamedRegion, getRenderedRegion, getViewList, isFormTargetExternal, isNamedRegion, isShowMinimized, isShowNormal, onActivate, onUpdate, render, renderHTMLFormular, renderNamedRegion, serverSideDesignInclude, serverSideInclude, setDocument, setExternalFormTarget, setMaximizeView, setParent, showMaximized, showMinimized, showNormal
attach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getID, onExternalRequest, onFormEvent, onRequest
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContext
getBreadcrumbPart, isNamedRegion, render, renderNamedRegion
public static final int DEFAULT_THUMBS_PER_ROW
protected OwMainAppContext m_MainContext
protected int m_iCurrentPage
OwPageableListView.getCurrentPage()
protected int MAX_THUMBNAIL_PER_ROW
public static final String VIEWER_SERVLET_REPLACE_TOKEN_DMSID
public static final String VIEWER_SERVLET_REPLACE_TOKEN_SERVERURL
public static final String VIEWER_SERVLET_REPLACE_TOKEN_BASEURL
public static final String VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_START
public static final char VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_ENCODE_CHAR
public static final char VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_NOENCODE_CHAR
public static final String VIEWER_SERVLET_REPLACE_TOKEN_PROPERTY_END
protected OwSort m_Sort
OwPageableListView.getSort()
insteadprotected boolean m_useContextMenu
protected OwMimeManager m_MimeManager
protected Collection<?> m_ColumnInfoList
OwPageableListView.getColumnInfo()
insteadprotected OwFieldManager m_theFieldManager
OwPageableListView.getFieldManager()
insteadprotected OwClientRefreshContext m_RefreshContext
OwPageableListView.getRefreshContext()
insteadpublic static final int THUMBNAIL_LIST
public static final int CONTEXT_MENU
public static final int PAGE_BUTTONS
protected ArrayList<OwObjectListViewThumbnails.ThumbnailTypeConfig> m_ThumbnailTypes
public OwObjectListViewThumbnails(int iViewMask_p)
iViewMask_p
- int combination of VIEW_MASK_... defined flagspublic OwObjectListViewThumbnails()
public boolean getIsList()
getIsListValid()
public boolean getIsListValid()
public void setConfigNode(Node node_p) throws Exception
setConfigNode
in class OwObjectListView
node_p
- XML node with configuration informationException
protected static String replaceProperties(OwMainAppContext context_p, String strIn_p, OwObjectReference obj_p) throws Exception
strIn_p
- String to search and replaceobj_p
- OwObjectReferenceException
protected String getHtmlAlignment(int iAlignment_p)
iAlignment_p
- int alignment as defined in OwFieldColumnInfopublic void setObjectList(OwObjectCollection objectList_p, OwObject parentObject_p) throws Exception
OwObjectListView
setObjectList
in class OwPageableListView
objectList_p
- OwObjectCollectionparentObject_p
- OwObject parent which created the object list, can be null if no parent is specifiedException
public void setObjectIterable(OwIterable<OwObject> iterable, OwObject parentObject_p) throws Exception
OwObjectListView
setObjectIterable
in class OwPageableListView
iterable
- OwIterable returning OwObjectsparentObject_p
- OwObjectException
protected String usesFormWithAttributes()
OwView
usesFormWithAttributes
in class OwView
protected boolean isPagingEnabled()
OwObjectListView
isPagingEnabled
in class OwPageableListView
OwObjectListView.hasPaging()
public void setRefreshContext(OwClientRefreshContext eventlister_p)
OwObjectListView
setRefreshContext
in class OwPageableListView
eventlister_p
- OwClientRefreshContext interfaceprotected void init() throws Exception
OwObjectListView
init
in class OwObjectListView
Exception
public void detach()
OwView
detach
in class OwPageableListView
protected String getThumbnailRowId(int idx_p, int line_p)
idx_p
- intline_p
- intString
protected Set<Integer> renderThumbnails(Writer w_p, Collection<OwObjectListView.OwPluginEntry> instancePluginsList_p) throws Exception
w_p
- Writer object to write HTML toinstancePluginsList_p
- Collection of plugins that are displayed for each instanceException
protected void renderBlockBegin(int startIndexPosition_p, int currentPosition_p, StringWriter w_p)
startIndexPosition_p
- - starting position in object list.currentPosition_p
- - current position in object list.w_p
- - the writer objectprotected void renderBlockEnd(int startIndexPosition_p, int endIndexPosition_p, int currentPosition_p, StringWriter w_p)
startIndexPosition_p
- - the starting position in object list.endIndexPosition_p
- - the ending position in object listcurrentPosition_p
- - the current position in object listw_p
- - the writer objectpublic boolean isRegion(int iRegion_p) throws Exception
isRegion
in interface OwBaseView
isRegion
in class OwView
iRegion_p
- ID of the region to renderException
public void renderRegion(Writer w_p, int iRegion_p) throws Exception
renderRegion
in interface OwBaseView
renderRegion
in class OwView
w_p
- Writer object to write HTML toiRegion_p
- ID of the region to renderException
public String getThumbnailTypeDisplayName(int i_p)
public int getThumbnailTypeCount()
public String getThumbnailTypeUrl(int i_p)
public void onAjaxPersistSelection(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p) throws Exception
request_p
- response_p
- Exception
protected void renderPageButtons(Writer w_p) throws Exception
w_p
- Writer object to write HTML toException
protected void insertThumbnailBar(Writer w_p, OwObject obj_p, int iIndex_p, Collection<OwObjectListView.OwPluginEntry> instancePluginsList_p) throws Exception
w_p
- obj_p
- iIndex_p
- instancePluginsList_p
- Exception
insertStatus(Writer, OwObject, int)
,
insertDocumentFunctionPlugins(Writer, OwObject, int, Collection)
protected void insertStatus(Writer w_p, OwObject obj_p, int iIndex_p) throws Exception
w_p
- obj_p
- iIndex_p
- Exception
protected void insertDocumentFunctionPlugins(Writer w_p, OwObject obj_p, int iIndex_p, Collection<OwObjectListView.OwPluginEntry> instancePluginsList_p) throws Exception
w_p
- writer object for HTML outputobj_p
- OwObject to create Function plugin foriIndex_p
- the row / object indexinstancePluginsList_p
- Collection of plugins that are visible (have there own column) together with the global indexException
public void onSort(javax.servlet.http.HttpServletRequest request_p) throws Exception
request_p
- HttpServletRequestException
public void onContextMenuEvent(javax.servlet.http.HttpServletRequest request_p) throws Exception
request_p
- HttpServletRequestException
public void onColumnClickEvent(javax.servlet.http.HttpServletRequest request_p) throws Exception
request_p
- HttpServletRequestException
public void onMultiSelectEvent(javax.servlet.http.HttpServletRequest request_p) throws Exception
request_p
- HttpServletRequestException
public void onPluginEvent(javax.servlet.http.HttpServletRequest request_p) throws Exception
request_p
- HttpServletRequestException
public void onSelect(javax.servlet.http.HttpServletRequest request_p) throws Exception
request_p
- HttpServletRequestException
public boolean updateExternalFormTarget(javax.servlet.http.HttpServletRequest request_p, boolean fSave_p) throws Exception
updateExternalFormTarget
in class OwEventTarget
request_p
- HttpServletRequestfSave_p
- boolean true = save the changes of the form data, false = just update the form data, but do not saveException
public Collection getRetrievalPropertyNames() throws Exception
getRetrievalPropertyNames
in class OwPageableListView
Exception
public OwField getField(String strFieldClassName_p) throws Exception, OwObjectNotFoundException
OwFieldProvider
getField
in interface OwFieldProvider
strFieldClassName_p
- String class name of requested fieldsException
OwObjectNotFoundException
public int getFieldProviderType()
OwFieldProvider
getFieldProviderType
in interface OwFieldProvider
public Object getFieldProviderSource()
OwFieldProvider
getFieldProviderSource
in interface OwFieldProvider
public String getFieldProviderName()
OwFieldProvider
getFieldProviderName
in interface OwFieldProvider
public void setField(String sName_p, Object value_p) throws Exception, OwObjectNotFoundException
setField
in interface OwFieldProvider
sName_p
- value_p
- Exception
OwObjectNotFoundException
public Object getSafeFieldValue(String sName_p, Object defaultvalue_p)
getSafeFieldValue
in interface OwFieldProvider
sName_p
- defaultvalue_p
- public Collection getFields() throws Exception
getFields
in interface OwFieldProvider
Exception
public String getTitle()
getTitle
in interface OwBaseView
getTitle
in class OwView
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.