Package com.saperion.ngc.resultset
Class ResultListImpl
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.resultset.ResultListImpl
- All Implemented Interfaces:
ResultList,Serializable,Cloneable,org.zkoss.zk.ui.Component,org.zkoss.zk.ui.ext.Scope,org.zkoss.zk.ui.sys.ComponentCtrl,org.zkoss.zul.ext.Paginated
Default-implementation of
ResultList. This implementation extends Listbox.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.zkoss.zul.Listbox
org.zkoss.zul.Listbox.Children, org.zkoss.zul.Listbox.ExtraCtrlNested classes/interfaces inherited from class org.zkoss.zul.impl.MeshElement
org.zkoss.zul.impl.MeshElement.InternalPaging -
Field Summary
Fields inherited from class org.zkoss.zul.Listbox
LOADING_MODEL, SYNCING_MODELFields inherited from class org.zkoss.zul.impl.MeshElement
CSS_FLEX_AUTO_DISABLED_COUNTFields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclassFields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPEFields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddetach()Returns information about the headers representing the columns of this ResultList.intintvoidinit(ResultSetViewImpl parent, ResultSetPresenter presenter) Gets called directly after the new instance was created.voidrenderQueryResult(List<ResultProperties> resultList) Renders the list of properties that represents the result of the previous query.voidsetContextMenu(org.zkoss.zul.Menupopup popup) Sets aMenupopupto be used as context-menu of this ResultList.voidsetSelectedListIndex(int index) Selects the item with the specified index in the list.voidupdateRow(ResultProperties properties, boolean selected) Updates the row identified by the provided properties.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, toggleItemSelectionMethods inherited from class org.zkoss.zul.impl.MeshElement
checkBeforeSetRows, evalCSSFlex, getActivePage, getPageCount, getPageSize, getPagingPosition, getSpan, isAutopaging, isPagingDisabled, isSizedByContent, isSpan, setAutopaging, setPagingDisabled, setPagingPosition, setSizedByContent, setSpan, setSpanMethods inherited from class org.zkoss.zul.impl.XulElement
getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributesMethods 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, setZIndexDirectlyMethods 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, 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, invalidatePartial, isChildable, isInitialized, 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, willSerializeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.zkoss.zk.ui.Component
addEventListener, addEventListener, addForward, addForward, addForward, addForward, appendChild, applyProperties, clone, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientAttribute, getClientDataAttribute, getDefinition, getDesktop, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getShadowVariable, getShadowVariable, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, query, queryAll, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisible, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverrideMethods inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
invalidatePartialMethods inherited from interface org.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
-
Constructor Details
-
ResultListImpl
public ResultListImpl()
-
-
Method Details
-
init
Description copied from interface:ResultListGets called directly after the new instance was created. This method is meant to be used to perform any necessary initialization-tasks.- Specified by:
initin interfaceResultList- Parameters:
parent- theResultSetViewImplinstance using this ResultListpresenter- theResultSetPresenterused by the parent
-
detach
public void detach()- Specified by:
detachin interfaceorg.zkoss.zk.ui.Component- Overrides:
detachin classorg.zkoss.zk.ui.AbstractComponent
-
getListItemCount
public int getListItemCount()- Specified by:
getListItemCountin interfaceResultList- Returns:
- the number of items contained in this ResultList
-
setSelectedListIndex
public void setSelectedListIndex(int index) Description copied from interface:ResultListSelects the item with the specified index in the list. All other items will be deselected.- Specified by:
setSelectedListIndexin interfaceResultList- Parameters:
index- index of the item to select
-
getSelectedListIndex
public int getSelectedListIndex()- Specified by:
getSelectedListIndexin interfaceResultList- Returns:
- the index of the currently selected item in the list or -1 if no item is selected
-
getAllListItems
- Specified by:
getAllListItemsin interfaceResultList- Returns:
- a list of all items contained in this ResultList. Never null. Modifications on this list will not take effect on the ResultList.
-
getSelectedListItems
- Specified by:
getSelectedListItemsin interfaceResultList- Returns:
- a list of all selected items of this ResultList. Never null. Modifications on this list will not take effect on the ResultList.
-
getSelectedListItem
- Specified by:
getSelectedListItemin interfaceResultList- Returns:
- the item currently selected in the list or null if no item is selected
-
renderQueryResult
Description copied from interface:ResultListRenders the list of properties that represents the result of the previous query. The list will never be null or empty, because empty results are handled by the parent-view.- Specified by:
renderQueryResultin interfaceResultList- Parameters:
resultList- list of properties to render
-
updateRow
Description copied from interface:ResultListUpdates the row identified by the provided properties. The properties will contain the same original index as the old row that is to be updated. Whether the updated row will be marked as unread or not is up to the implementation. Also, the implementation must decide if a viewer or an embedded index-form will be updated automatically.- Specified by:
updateRowin interfaceResultList- Parameters:
properties- the metadata for the updated rowselected- if true, the updated row must be set selected
-
setContextMenu
public void setContextMenu(org.zkoss.zul.Menupopup popup) Description copied from interface:ResultListSets aMenupopupto be used as context-menu of this ResultList. Implementations can either use the given context-menu or use this method as a notification to create or update their own context menu. This method gets called when- the parent view is cleared
- the parent view is initialized
- a query result was rendered
- Specified by:
setContextMenuin interfaceResultList- Parameters:
popup- default context-menu-popup
-
getHeaderInformation
Description copied from interface:ResultListReturns information about the headers representing the columns of this ResultList. If no columns are used, this method returns an empty list.- Specified by:
getHeaderInformationin interfaceResultList- Returns:
- header-information or an empty list. Never null.
-