Class PagingDelegateController
- java.lang.Object
-
- com.hybris.cockpitng.widgets.collectionbrowser.mold.impl.PagingDelegateController
-
- All Implemented Interfaces:
CollectionBrowserDelegateController
public class PagingDelegateController extends java.lang.Object implements CollectionBrowserDelegateController
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMODEL_SINGLE_PAGEstatic java.lang.StringOPERATION_DONE_EVENTstatic java.lang.StringSETTING_ASYNC_LOADING
-
Constructor Summary
Constructors Constructor Description PagingDelegateController()PagingDelegateController(CollectionBrowserController controller)Deprecated, for removal: This API element is subject to removal in a future version.since 6.7 - not used anymore, please use @link{PagingDelegateController()}
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidadjustPageSize(int currentPageSize, int definedPageSize)voidbuildPaging(Pageable<?> pageable)Builds up the paging control.protected <E> voiddisplayFetchedData(Pageable<E> pageable, java.util.function.Consumer<Pageable<E>> callback)voidfetchPage(Pageable<?> pageable, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> operationDoneListener)protected CollectionBrowserControllergetController()PageablegetCurrentPageable()SinglePagegetCurrentSinglePage()SinglePagegetCurrentSinglePageWithTypeCode(java.lang.String typeCode)Gets current single page with type code.protected NotificationServicegetNotificationService()protected java.lang.StringgetNotificationSource()Deprecated, for removal: This API element is subject to removal in a future version.intgetPageableCurrentPageSize()protected voidhandleRuntimeException(java.lang.RuntimeException re)voidinitializeOnPagingListener()voidloadPage(Pageable<?> pageable)<E> voidloadPage(Pageable<E> pageable, java.util.function.Consumer<Pageable<E>> callback)protected voidnotifyPaging(Pageable<?> pageable)voidonPagingHandler(org.zkoss.zul.event.PagingEvent event)protected voidonTypeChanged()voidprocess(Pageable<?> pageable)<E> voidprocess(Pageable<E> pageable, java.util.function.Consumer<Pageable<E>> callback)voidrefreshBrowser(Pageable<?> pageable)<E> voidrefreshBrowser(Pageable<E> pageable, java.util.function.Consumer<Pageable<E>> callback)voidrenderAndProcessCurrentPageable()protected voidresetActionSlot()protected voidresetPaging()voidrestorePageNumberIfNecessary(Pageable pageable)voidsetController(CollectionBrowserController controller)Sets Collection Browser controllervoidsetNotificationService(NotificationService notificationService)
-
-
-
Field Detail
-
MODEL_SINGLE_PAGE
public static final java.lang.String MODEL_SINGLE_PAGE
- See Also:
- Constant Field Values
-
SETTING_ASYNC_LOADING
public static final java.lang.String SETTING_ASYNC_LOADING
- See Also:
- Constant Field Values
-
OPERATION_DONE_EVENT
public static final java.lang.String OPERATION_DONE_EVENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PagingDelegateController
public PagingDelegateController()
-
PagingDelegateController
@Deprecated(since="6.7", forRemoval=true) public PagingDelegateController(CollectionBrowserController controller)Deprecated, for removal: This API element is subject to removal in a future version.since 6.7 - not used anymore, please use @link{PagingDelegateController()}
-
-
Method Detail
-
initializeOnPagingListener
public void initializeOnPagingListener()
-
onPagingHandler
public void onPagingHandler(org.zkoss.zul.event.PagingEvent event)
-
loadPage
public void loadPage(Pageable<?> pageable)
-
loadPage
public <E> void loadPage(Pageable<E> pageable, java.util.function.Consumer<Pageable<E>> callback)
-
displayFetchedData
protected <E> void displayFetchedData(Pageable<E> pageable, java.util.function.Consumer<Pageable<E>> callback)
-
resetActionSlot
protected void resetActionSlot()
-
getPageableCurrentPageSize
public int getPageableCurrentPageSize()
-
fetchPage
public void fetchPage(Pageable<?> pageable, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> operationDoneListener)
-
getCurrentSinglePage
public SinglePage getCurrentSinglePage()
-
getCurrentSinglePageWithTypeCode
public SinglePage getCurrentSinglePageWithTypeCode(java.lang.String typeCode)
Gets current single page with type code. In case returned single page was empty then a new instance is being returned with type code passed as a parameter.- Parameters:
typeCode- to pass to a new instance of single page in case returned one was empty- Returns:
- single page initialized with type code
-
buildPaging
public void buildPaging(Pageable<?> pageable)
Builds up the paging control.- Parameters:
pageable- the pageable object containing paging info
-
resetPaging
protected void resetPaging()
-
notifyPaging
protected void notifyPaging(Pageable<?> pageable)
-
refreshBrowser
public void refreshBrowser(Pageable<?> pageable)
-
refreshBrowser
public <E> void refreshBrowser(Pageable<E> pageable, java.util.function.Consumer<Pageable<E>> callback)
-
renderAndProcessCurrentPageable
public void renderAndProcessCurrentPageable()
-
process
public void process(Pageable<?> pageable)
-
process
public <E> void process(Pageable<E> pageable, java.util.function.Consumer<Pageable<E>> callback)
-
handleRuntimeException
protected void handleRuntimeException(java.lang.RuntimeException re)
-
getNotificationSource
@Deprecated(since="6.7", forRemoval=true) protected java.lang.String getNotificationSource()Deprecated, for removal: This API element is subject to removal in a future version.
-
onTypeChanged
protected void onTypeChanged()
-
restorePageNumberIfNecessary
public void restorePageNumberIfNecessary(Pageable pageable)
-
adjustPageSize
protected void adjustPageSize(int currentPageSize, int definedPageSize)
-
getCurrentPageable
public Pageable getCurrentPageable()
-
getController
protected CollectionBrowserController getController()
-
setController
public void setController(CollectionBrowserController controller)
Description copied from interface:CollectionBrowserDelegateControllerSets Collection Browser controller- Specified by:
setControllerin interfaceCollectionBrowserDelegateController- Parameters:
controller- Collection Browser controller used in delegate
-
getNotificationService
protected NotificationService getNotificationService()
-
setNotificationService
public void setNotificationService(NotificationService notificationService)
-
-