public class ProductListingPanel<P extends Product> extends AdminPanel
DataTable
is made a listener to the TemplateSearchParams
SpringStaticConfiguration
: Class name . category name ; for any custom config(s). Within the SpringStaticConfiguration
, the value is a Map of key, values of the key matching whats in the admin config for default categoriesProductService
ProductSortableDataProvider
for the data-tableList
of FacetMeta
for Buttons on ListingFacetMeta
for Input fields that match Product
SearchJPAQueryBuilderTransformer
, that processes a Map of the productSearchParamsDef and its corresponding Input valueReporterMeta
typeAdminPanel#getConfigProperty(String)
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected AuthorizationModule<Void> |
authorizationModule |
protected List<String> |
fieldNamesForIcons
List of Strings, each representing the field to be included in list of Icons
|
protected ProductDetailsPanel<P> |
targetProductDetailsPanel
When selecting a Product the action will update the target ProductDetailsPanel
|
adminConfiguration
Constructor and Description |
---|
ProductListingPanel(String id,
org.apache.wicket.model.IModel<ProductReference> model) |
Modifier and Type | Method and Description |
---|---|
protected void |
addExportCapability() |
protected void |
addSearchPanel(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable<P> productList,
org.apache.wicket.Component postListDisplayScript) |
protected List<org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn<?>> |
defineColumns() |
protected ProductSortableDataProvider<P> |
getDataProvider() |
protected String |
getHtmlForField(P product,
PropertyDescriptor pd)
For a field show any additional icons etc for fields instead of Text.
|
protected org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable<P> |
getProductListing(String id) |
protected ProductService<P> |
getProductService() |
ProductDetailsPanel |
getTargetProductDetailsPanel() |
protected org.apache.wicket.ajax.markup.html.AjaxLink |
makePoppable(String id,
Long prodId,
Long parentProdId,
FlowStatus flowStatus)
Provide a Poppable Link that calls javascript:popup('dialog-container') to invoke the JQuery Dialog.
|
void |
onInitialize() |
protected void |
populateBulkButtonItem(org.apache.wicket.model.IModel<Collection<Long>> selectedList,
org.apache.wicket.markup.html.list.ListItem<FacetMeta> item)
Bulk buttons override option for more cool buttons.
|
protected void |
setDataService(ProductService<P> service) |
void |
setTargetProductDetailsPanel(ProductDetailsPanel targetProductDetailsPanel) |
protected void |
setupSearhListCriteria(ProductReference parentRef)
Setup the
SortableDataProvider query |
getConfigProperty, getModuleForPage, headerMeta, renderHead
onComponentTag, onComponentTagBody, renderHead
newHeaderPartContainer, renderHeadFromAssociatedMarkupFile
getMarkupType, getWebPage, getWebRequest
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getApplication, getBehaviors, getBehaviors, getBehaviorsRawList, getClassRelativePath, getComponentBorder, getConverter, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdImpl, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalAttach, internalDetach, internalOnAttach, internalOnDetach, internalOnModelChanged, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, onAfterRender, onAttach, onBeforeRender, onBeginRequest, onConfigure, onDetach, onEndRequest, onModelChanged, onModelChanging, onRemove, prepareForRender, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrap
protected AuthorizationModule<Void> authorizationModule
protected ProductDetailsPanel<P extends Product> targetProductDetailsPanel
public ProductListingPanel(String id, org.apache.wicket.model.IModel<ProductReference> model)
id
- as Component Idmodel
- as IModel
of Product
; the product represents the root contextprotected ProductSortableDataProvider<P> getDataProvider()
protected ProductService<P> getProductService()
protected void setDataService(ProductService<P> service)
protected org.apache.wicket.ajax.markup.html.AjaxLink makePoppable(String id, Long prodId, Long parentProdId, FlowStatus flowStatus)
ProductDetailsPanel
before the PopUp is invoked.id
- of componentprodId
- - Id of the product to be popped up (@nullable true - For new product)parentProdId
- - Id of its parent category (@nullable true)flowStatus
- as FlowStatus
public void onInitialize()
onInitialize
in class org.apache.wicket.Component
protected void addSearchPanel(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable<P> productList, org.apache.wicket.Component postListDisplayScript)
protected void addExportCapability()
protected void populateBulkButtonItem(org.apache.wicket.model.IModel<Collection<Long>> selectedList, org.apache.wicket.markup.html.list.ListItem<FacetMeta> item)
FacetMeta.getSubmitTransformer()
and the result is synchronously returned/added as String in the listing FeedbackPanel
.protected List<org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn<?>> defineColumns()
protected String getHtmlForField(P product, PropertyDescriptor pd) throws Exception
fieldNamesForIcons
is null (& strictly null), all boolean and Integer types are included to generate span elements with class : bool_Exception
protected org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable<P> getProductListing(String id)
protected void setupSearhListCriteria(ProductReference parentRef)
SortableDataProvider
queryparentRef
- public ProductDetailsPanel getTargetProductDetailsPanel()
public void setTargetProductDetailsPanel(ProductDetailsPanel targetProductDetailsPanel)
Copyright © 2018. All rights reserved.