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
,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 ResultListImpl extends org.zkoss.zul.Listbox implements ResultList
Default-implementation ofResultList
. This implementation extendsListbox
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ResultListImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
detach()
java.util.List<ResultListItem>
getAllListItems()
java.util.List<HeaderInformation>
getHeaderInformation()
Returns information about the headers representing the columns of this ResultList.int
getListItemCount()
int
getSelectedListIndex()
DraggableListItem
getSelectedListItem()
java.util.List<ResultListItem>
getSelectedListItems()
void
init(ResultSetViewImpl parent, ResultSetPresenter presenter)
Gets called directly after the new instance was created.void
renderQueryResult(java.util.List<ResultProperties> resultList)
Renders the list of properties that represents the result of the previous query.void
setContextMenu(org.zkoss.zul.Menupopup popup)
Sets aMenupopup
to be used as context-menu of this ResultList.void
setSelectedListIndex(int index)
Selects the item with the specified index in the list.void
updateRow(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, 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, 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
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods 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, setWidgetOverride
-
-
-
-
Method Detail
-
init
public void init(ResultSetViewImpl parent, ResultSetPresenter presenter)
Description copied from interface:ResultList
Gets called directly after the new instance was created. This method is meant to be used to perform any necessary initialization-tasks.- Specified by:
init
in interfaceResultList
- Parameters:
parent
- theResultSetViewImpl
instance using this ResultListpresenter
- theResultSetPresenter
used by the parent
-
detach
public void detach()
- Specified by:
detach
in interfaceorg.zkoss.zk.ui.Component
- Overrides:
detach
in classorg.zkoss.zk.ui.AbstractComponent
-
getListItemCount
public int getListItemCount()
- Specified by:
getListItemCount
in interfaceResultList
- Returns:
- the number of items contained in this ResultList
-
setSelectedListIndex
public void setSelectedListIndex(int index)
Description copied from interface:ResultList
Selects the item with the specified index in the list. All other items will be deselected.- Specified by:
setSelectedListIndex
in interfaceResultList
- Parameters:
index
- index of the item to select
-
getSelectedListIndex
public int getSelectedListIndex()
- Specified by:
getSelectedListIndex
in interfaceResultList
- Returns:
- the index of the currently selected item in the list or -1 if no item is selected
-
getAllListItems
public java.util.List<ResultListItem> getAllListItems()
- Specified by:
getAllListItems
in 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
public java.util.List<ResultListItem> getSelectedListItems()
- Specified by:
getSelectedListItems
in 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
public DraggableListItem getSelectedListItem()
- Specified by:
getSelectedListItem
in interfaceResultList
- Returns:
- the item currently selected in the list or null if no item is selected
-
renderQueryResult
public void renderQueryResult(java.util.List<ResultProperties> resultList)
Description copied from interface:ResultList
Renders 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:
renderQueryResult
in interfaceResultList
- Parameters:
resultList
- list of properties to render
-
updateRow
public void updateRow(ResultProperties properties, boolean selected)
Description copied from interface:ResultList
Updates 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:
updateRow
in 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:ResultList
Sets aMenupopup
to 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:
setContextMenu
in interfaceResultList
- Parameters:
popup
- default context-menu-popup
-
getHeaderInformation
public java.util.List<HeaderInformation> getHeaderInformation()
Description copied from interface:ResultList
Returns information about the headers representing the columns of this ResultList. If no columns are used, this method returns an empty list.- Specified by:
getHeaderInformation
in interfaceResultList
- Returns:
- header-information or an empty list. Never null.
-
-