T
- public abstract class GridView<T> extends DataViewBase<T>
Example
<tbody> <tr wicket:id="rows" class"even"> <td wicket:id="cols"> <span wicket:id="id">Test ID</span> </td> </tr> </tbody>and in java:
add(new GridView("rows", dataProvider).setColumns(3));
Modifier and Type | Class and Description |
---|---|
static class |
GridView.ItemsIterator<T>
Iterator that iterates over all items in the cells
|
ENABLE, FLAG_AFTER_RENDERING, FLAG_INITIALIZED, FLAG_PREPARED_FOR_RENDER, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RENDERING, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING
Constructor and Description |
---|
GridView(String id,
IDataProvider<T> dataProvider) |
Modifier and Type | Method and Description |
---|---|
protected void |
addItems(Iterator<Item<T>> items)
Add items to the view.
|
int |
getColumns() |
IDataProvider<T> |
getDataProvider() |
Iterator<Item<T>> |
getItems() |
int |
getRows() |
protected Item<T> |
newEmptyItem(String id,
int index)
Create a Item which represents an empty cell (there is no model for it in the DataProvider)
|
protected Item<?> |
newRowItem(String id,
int index)
Create a new Item which will hold a row.
|
protected abstract void |
populateEmptyItem(Item<T> item)
Add component to an Item for which there is no model anymore and is shown in a cell
|
GridView<T> |
setColumns(int cols)
Sets number of columns
|
GridView<T> |
setRows(int rows)
Sets number of rows per page
|
getItemModels, internalGetDataProvider, internalGetItemCount, onDetach
getCurrentPage, getFirstItemOffset, getItemCount, getItemModels, getItemsPerPage, getPageCount, getRowCount, getViewSize, onBeforeRender, setCurrentPage, setItemsPerPage
getItemReuseStrategy, newItem, newItemFactory, onPopulate, populateItem, setItemReuseStrategy
newChildId, renderIterator
dequeue, getMarkup, onRender, renderChild
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkupType, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onAfterRenderChildren, onComponentTagBody, onInitialize, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterfaceAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrap
public GridView(String id, IDataProvider<T> dataProvider)
id
- component iddataProvider
- data providerpublic int getColumns()
public GridView<T> setColumns(int cols)
cols
- number of columnspublic int getRows()
public GridView<T> setRows(int rows)
rows
- number of rowsprotected void addItems(Iterator<Item<T>> items)
RefreshingView
addItems
in class RefreshingView<T>
items
- item instances to be added to this viewpublic IDataProvider<T> getDataProvider()
public Iterator<Item<T>> getItems()
getItems
in class RefreshingView<T>
RefreshingView.getItems()
protected abstract void populateEmptyItem(Item<T> item)
item
- Item objectprotected Item<T> newEmptyItem(String id, int index)
id
- index
- Copyright © 2006–2019 Apache Software Foundation. All rights reserved.