public final class HideableDataDiffSection<T> extends Section
HideableDataDiffSectionSpec that wraps a DataDiffSectionSpec. It provides the
ability to remove an item from the DataDiffSection via the HideItemEvent. This Section emits the following events:
RenderWithHideItemHandlerEvent whenever it needs a Component to render a model
T from the list of data. A HideItemEvent handler is a param of this event. Providing an
handler for this OnEvent is mandatory.
GetUniqueIdentifierEvent is fired when a single unique identifier is needed for a
model object.
| Modifier and Type | Class and Description |
|---|---|
static class |
HideableDataDiffSection.Builder<T> |
generateUniqueGlobalKeyForChild, getChildren, getEventDispatcher, getGlobalKey, getHandle, getKey, getLogTag, getParent, getScopedContext, getSimpleName, makeShallowCopy, recordEventTrigger, setChildren, setCount, setGlobalKey, setKey, setScopedContextacceptTriggerEvent, bindService, createService, dataBound, dataRendered, dispatchLoadingEvent, generateChangeSet, getEventTrigger, getEventTrigger, getLoadingEventHandler, getService, getTreePropsForChildren, isDiffSectionSpec, isSectionIndexValid, newEventHandler, newEventHandler, newEventTrigger, populateTreeProps, refresh, requestFocus, requestFocus, requestFocus, requestFocusWithOffset, requestFocusWithOffset, requestFocusWithOffset, requestSmoothFocus, requestSmoothFocus, requestSmoothFocus, shouldUpdate, transferService, unbindService, viewportChangedprotected StateContainer getStateContainer()
getStateContainer in class Sectionpublic boolean isEquivalentTo(Section other)
SectionThis is used to be able to skip rendering a section again. We avoid using the Object.equals(Object) so we can optimize the code better over time since we don't have to
adhere to the contract required for a equals method.
isEquivalentTo in interface Equivalence<Section>isEquivalentTo in class Sectionother - the component to compare topublic HideableDataDiffSection makeShallowCopy(boolean deepCopy)
makeShallowCopy in class SectionSection. if deepCopy is false the clone won't contain any
children or count as it will be returned in a pre - ChangeSet generation state.public static <T> HideableDataDiffSection.Builder<T> create(SectionContext context)
protected void transferState(StateContainer _prevStateContainer, StateContainer _nextStateContainer)
SectionLifecycletransferState in class SectionLifecycleprotected static void onBlacklistUpdate(SectionContext c, Object modelObject, EventHandler<GetUniqueIdentifierEvent> getUniqueIdentifierHandlerParam)
protected static void onBlacklistUpdateAsync(SectionContext c, Object modelObject, EventHandler<GetUniqueIdentifierEvent> getUniqueIdentifierHandlerParam)
protected static void onBlacklistUpdateSync(SectionContext c, Object modelObject, EventHandler<GetUniqueIdentifierEvent> getUniqueIdentifierHandlerParam)
public static EventHandler getRenderWithHideItemHandlerEventHandler(SectionContext context)
public static EventHandler getGetUniqueIdentifierEventHandler(SectionContext context)
public static EventHandler<RenderEvent> onRenderEvent(SectionContext c)
public static EventHandler<HideItemEvent> onHideItem(SectionContext c)
public Object dispatchOnEvent(EventHandler eventHandler, Object eventState)
dispatchOnEvent in interface EventDispatcherdispatchOnEvent in class SectionLifecycleprotected void createInitialState(SectionContext c)
createInitialState in class SectionLifecycleprotected Children createChildren(SectionContext c)
SectionLifecycleGroupSectionSpec method annotated with OnCreateChildrencreateChildren in class SectionLifecycle