Package com.saperion.ngc.navigation
Class FastAccessList
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractComponent
-
- org.zkoss.zk.ui.HtmlBasedComponent
-
- org.zkoss.zul.impl.XulElement
-
- org.zkoss.zul.impl.MeshElement
-
- org.zkoss.zul.Listbox
-
- com.saperion.ngc.navigation.FastAccessList
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,org.zkoss.zk.ui.Component
,org.zkoss.zk.ui.ext.Scope
,org.zkoss.zk.ui.sys.ComponentCtrl
,org.zkoss.zul.ext.Paginated
public class FastAccessList extends org.zkoss.zul.Listbox
An extendedListbox
that displays the fast access buttons.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FastAccessList(NavigationView navigationView, NavigationPresenter presenter)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FastAccessItem
addFastAccess(java.lang.String ddc, java.lang.String path, java.lang.String name, boolean temporary)
Creates a new fast access entry.java.util.Map<java.lang.String,FastAccessItem>
getFastAccessItems()
void
loadSavedItems()
Loads the default or the stored fast access items.void
onCreate(org.zkoss.zk.ui.event.Event event)
OnCreate event handler.void
onFastAccessInvalid(org.zkoss.zk.ui.event.Event event)
Is called if an invalid fast access item was clicked (i.e.void
removeFastAccessAndWrite(FastAccessItem item)
Removes a fast access entry and saves the reduced fast access list.void
selectItemByPath(java.lang.String path)
Selects the fast access item with the given path.-
Methods inherited from class org.zkoss.zul.Listbox
addItemToSelection, afterInsert, appendItem, beforeChildAdded, beforeRemove, clearSelection, clone, getChildren, getEmptyMessage, getExtraCtrl, getFrozen, getGroupCount, getGroups, getGroupsModel, getHeads, getIndexOfItem, getInnerWidth, getItemAtIndex, getItemCount, getItemRenderer, getItems, getListfoot, getListhead, getListModel, getMaxlength, getModel, getName, getNonselectableTags, getOddRowSclass, getPaginal, getPagingChild, getPreloadSize, getRows, getSelectedCount, getSelectedIndex, getSelectedItem, getSelectedItems, getSeltype, getVisibleItemCount, getZclass, hasGroup, insertBefore, isAutohidePaging, isCheckmark, isDisabled, isFixedLayout, isMultiple, isSelectOnHighlightDisabled, isVflex, onAfterRender, onInitRender, onPageAttached, onPageDetached, onPagingInitRender, pgi, removeChild, removeItemAt, removeItemFromSelection, renderAll, renderItem, renderItems, renderProperties, scrollToIndex, selectAll, selectItem, service, sessionDidActivate, sessionWillPassivate, setActivePage, setActivePage, setCheckmark, setDisabled, setEmptyMessage, setFixedLayout, setHeight, setInnerWidth, setItemRenderer, setItemRenderer, setMaxlength, setModel, setModel, setMold, setMultiple, setName, setNonselectableTags, setOddRowSclass, setPageSize, setPaginal, setPreloadSize, setRows, setSelectedIndex, setSelectedItem, setSelectedItems, setSeltype, setVflex, setVflex, shallUpdateScrollPos, toggleItemSelection
-
Methods inherited from class org.zkoss.zul.impl.MeshElement
checkBeforeSetRows, getActivePage, getPageCount, getPageSize, getPagingPosition, getSpan, isAutopaging, isPagingDisabled, isSizedByContent, isSpan, setAutopaging, setPagingDisabled, setPagingPosition, setSizedByContent, setSpan, setSpan
-
Methods inherited from class org.zkoss.zul.impl.XulElement
getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
-
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, focus, getAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
-
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, invalidate, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
-
-
-
Constructor Detail
-
FastAccessList
public FastAccessList(NavigationView navigationView, NavigationPresenter presenter)
Constructor.- Parameters:
navigationView
- navigation viewpresenter
- navigation presenter
-
-
Method Detail
-
loadSavedItems
public void loadSavedItems() throws AuthenticationException, NgcUiException
Loads the default or the stored fast access items. Removes the current items if existing.- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getFastAccessItems
public java.util.Map<java.lang.String,FastAccessItem> getFastAccessItems()
- Returns:
- fast access items
-
onCreate
public void onCreate(org.zkoss.zk.ui.event.Event event)
OnCreate event handler.- Parameters:
event
- event
-
addFastAccess
public FastAccessItem addFastAccess(java.lang.String ddc, java.lang.String path, java.lang.String name, boolean temporary) throws AuthenticationException, NgcUiException
Creates a new fast access entry.- Parameters:
ddc
- folder ddcpath
- path for the new rootname
- name of the entrytemporary
- temporary items are not stored in user settings- Returns:
- the new fast access item
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
removeFastAccessAndWrite
public void removeFastAccessAndWrite(FastAccessItem item) throws AuthenticationException, NgcUiException
Removes a fast access entry and saves the reduced fast access list.- Parameters:
item
- item to remove- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
onFastAccessInvalid
public void onFastAccessInvalid(org.zkoss.zk.ui.event.Event event)
Is called if an invalid fast access item was clicked (i.e. a fast access item pointing to a non existing folder.)- Parameters:
event
- The event to notify the FastAccessList.
-
selectItemByPath
public void selectItemByPath(java.lang.String path)
Selects the fast access item with the given path. If the path is not found, the current selection will be removed- Parameters:
path
- path to select
-
-