public abstract class OwNavigationView extends OwView
Base Class for all Navigation Views / Menus / Multiple View Navigations.
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 |
---|---|
static class |
OwNavigationView.OwAbstractTabInfo
Simple part implemenation of OwTabInfo.
|
static class |
OwNavigationView.OwDelimiterTabInfo
info class for the tabulator view and name and optional data
|
static interface |
OwNavigationView.OwTabInfo
Info class for the tabulator view and name and optional data
to be overloaded by the implementing menu.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
m_fValidatePanels
flag indicating if panels should be validated
|
protected int |
m_iCurrentTabIndex
currently selected tab view index
|
protected ArrayList |
m_TabList
list of OwTabInfos
|
CURRENT_MODULE_KEY, FORMULAR_PLACEHOLDER_END_DELIMITER, FORMULAR_PLACEHOLDER_START_DELIMITER, m_externalFormEventTarget
EMPTY_STRING
Constructor and Description |
---|
OwNavigationView() |
Modifier and Type | Method and Description |
---|---|
int |
addDelimiter()
add a delimiter without function and without text
|
protected int |
addMenuItem(OwNavigationView.OwTabInfo info_p)
add a menu Item to the navigation module.
|
protected int |
addView(OwNavigationView.OwTabInfo info_p,
String strViewName_p)
add a View to the navigation module.
|
void |
clear()
clears all the added views in which this navigation view is navigating.
|
void |
enable(int iIndex_p,
boolean fEnable_p)
enable specified menu items
|
void |
enableAll(boolean fEnable_p)
enables all menu items
|
String |
getNavigateEventURL(int iIndex_p)
event URL to navigate through the tabs
NOTE: If a form is used, the EventURL contains '' primes.
|
String |
getNavigationFormAction(int iIndex_p)
get the action string to be inserted into a form, which will then submit a request equal to the button index
|
int |
getNavigationIndex()
get the currently selected navigation index, form multiple views panel
|
OwNavigationView.OwTabInfo |
getTab(int index) |
List |
getTabList()
get the tab information for each navigation / menu element
|
String |
getTitle()
overridable title of the view
|
OwBaseView |
getViewReference()
get the reference to the active view
|
boolean |
isLastTabIndex(int i_p)
check if the given index is the last one
|
boolean |
isPreviousPanelValid(int iIndex_p)
check if previous panel is valid
|
void |
navigate(int iIndex_p)
navigate to the selected view index.
|
protected void |
navigate(int iIndex_p,
javax.servlet.http.HttpServletRequest request_p)
navigate to the selected view index
|
void |
navigate(String strTargetID_p)
navigate to the selected view with the given target ID.
|
void |
navigateFirst()
navigate to the first error free view
|
void |
onFormEvent(javax.servlet.http.HttpServletRequest request_p)
called before a form event is caught.
|
void |
onNavigate(javax.servlet.http.HttpServletRequest request_p)
event called when user clicked a tab
|
protected void |
onRender(Writer w_p)
render the navigation bar
|
protected void |
registerView(OwView view_p,
String strViewName_p) |
void |
renderCurrentView(Writer w_p)
render the currently selected view
|
void |
renderNavigationLink(Writer w_p,
OwNavigationView.OwTabInfo tabInfo_p,
int index_p,
int last_p,
int selected_p)
render a single navigation tab
|
void |
setValidatePanels(boolean fValidatePanels_p)
flag indicating if panels should be validated
|
void |
setVisible(int i,
boolean b)
Mekes this item vizbile or not.
|
int |
size()
get the number of views to navigate
|
activate, addView, detach, getBreadcrumbPart, getDocument, getExternalFormEventTarget, getFormName, getFormTarget, getIcon, getIterator, getMaximizeView, getParent, getRenderedNamedRegion, getRenderedRegion, getViewList, init, isFormTargetExternal, isNamedRegion, isRegion, isShowMaximized, isShowMinimized, isShowNormal, onActivate, onUpdate, render, renderHTMLFormular, renderNamedRegion, renderRegion, serverSideDesignInclude, serverSideInclude, setDocument, setExternalFormTarget, setMaximizeView, setParent, showMaximized, showMinimized, showNormal, usesFormWithAttributes
attach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getID, onExternalRequest, onRequest, updateExternalFormTarget
protected boolean m_fValidatePanels
protected int m_iCurrentTabIndex
protected ArrayList m_TabList
public int addDelimiter()
protected int addMenuItem(OwNavigationView.OwTabInfo info_p) throws Exception
info_p
- item to addException
protected int addView(OwNavigationView.OwTabInfo info_p, String strViewName_p) throws Exception
strViewName_p
- optional Name / ID of the view, can be null.info_p
- item to add, getView must return a valid viewException
protected void registerView(OwView view_p, String strViewName_p) throws Exception
Exception
public void clear()
public void enable(int iIndex_p, boolean fEnable_p)
iIndex_p
- index of menu item to enable / disablefEnable_p
- true enables menu item, false disables menu itempublic void setVisible(int i, boolean b)
i
- index of menu item to enable / disableb
- true renders menu item, false disables rendering for this menu itempublic void enableAll(boolean fEnable_p)
fEnable_p
- true enables menu item, false disables menu itempublic String getNavigateEventURL(int iIndex_p)
iIndex_p
- index of the requested tab.public String getNavigationFormAction(int iIndex_p)
iIndex_p
- int button index of the button to be activated upon form submitpublic int getNavigationIndex()
public List getTabList()
public OwNavigationView.OwTabInfo getTab(int index)
public OwBaseView getViewReference()
public boolean isLastTabIndex(int i_p)
public boolean isPreviousPanelValid(int iIndex_p)
iIndex_p
- index of the current panelpublic void navigate(int iIndex_p) throws Exception
iIndex_p
- the index of the view to be navigated toException
protected void navigate(int iIndex_p, javax.servlet.http.HttpServletRequest request_p) throws Exception
iIndex_p
- the index of the view to be navigated torequest_p
- HttpServletRequest, can be null if Navigation is used for view navigation (multiple views)Exception
public void navigate(String strTargetID_p) throws Exception
strTargetID_p
- the target ID of the view to navigate toException
public void navigateFirst() throws Exception
Exception
public void onFormEvent(javax.servlet.http.HttpServletRequest request_p) throws Exception
onFormEvent
in class OwEventTarget
request_p
- HttpServletRequestException
- if OwEventTarget.getFormTarget()
update call failspublic void onNavigate(javax.servlet.http.HttpServletRequest request_p) throws Exception
request_p
- HttpServletRequestException
public void renderCurrentView(Writer w_p) throws Exception
w_p
- Writer object to write HTML toException
public void renderNavigationLink(Writer w_p, OwNavigationView.OwTabInfo tabInfo_p, int index_p, int last_p, int selected_p) throws Exception
w_p
- Writer object to write HTML totabInfo_p
- info to the tab (view...)index_p
- zerobased index of the tablast_p
- last indexselected_p
- selected indexException
public void setValidatePanels(boolean fValidatePanels_p)
public int size()
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.