Class BindUiLifeCycle
- java.lang.Object
-
- org.zkoss.bind.tracker.impl.BindUiLifeCycle
-
- All Implemented Interfaces:
UiLifeCycle
public class BindUiLifeCycle extends java.lang.Object implements UiLifeCycle
Track Binding CRUD and dependent tracking management.- Since:
- 6.0.0
- Author:
- henrichen, jumperchen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
BindUiLifeCycle.Extension
An interface used to extend theBindUiLifeCycle
.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ON_ZKBIND_LATER
static java.lang.String
REMOVE_MARK
static java.lang.String
SKIP_BIND_INIT
-
Constructor Summary
Constructors Constructor Description BindUiLifeCycle()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterComponentAttached(Component comp, Page page)
Called after a component is attached to a page.void
afterComponentDetached(Component comp, Page prevpage)
Called after a component is detached from a page.void
afterComponentMoved(Component parent, Component child, Component prevparent)
Called after the parent/children relation is changed.void
afterPageAttached(Page page, Desktop desktop)
Called after a page is attached to a desktop.void
afterPageDetached(Page page, Desktop prevdesktop)
Called after a page is detached to a desktop.void
afterShadowAttached(ShadowElement shadow, Component host)
Called after a shadow is attached to a host.void
afterShadowDetached(ShadowElement shadow, Component prevhost)
Called after a shadow is detached from a host.protected void
handleComponentAttached(Component comp)
protected void
handleComponentDetached(Component comp)
static void
markLifeCycleHandling(Component comp)
Internal use only.
-
-
-
Field Detail
-
ON_ZKBIND_LATER
public static final java.lang.String ON_ZKBIND_LATER
- See Also:
- Constant Field Values
-
REMOVE_MARK
public static final java.lang.String REMOVE_MARK
- See Also:
- Constant Field Values
-
SKIP_BIND_INIT
public static final java.lang.String SKIP_BIND_INIT
- See Also:
- Constant Field Values
-
-
Method Detail
-
afterComponentAttached
public void afterComponentAttached(Component comp, Page page)
Description copied from interface:UiLifeCycle
Called after a component is attached to a page.If a tree of components are attached to a page, this method called only against the root one. For example, if component A has a child B and A is attached to page P, then afterComponentAttached(A, P) is called.
Note: exception thrown by this method is ignored (but logged).
- Specified by:
afterComponentAttached
in interfaceUiLifeCycle
-
handleComponentAttached
protected void handleComponentAttached(Component comp)
-
afterComponentDetached
public void afterComponentDetached(Component comp, Page prevpage)
Description copied from interface:UiLifeCycle
Called after a component is detached from a page.If a tree of components are detached to a page, this method called only against the root one. For example, if component A has a child B and A is detached from page P, then afterComponentDetached(A, P) is called.
Note: exception thrown by this method is ignored (but logged).
- Specified by:
afterComponentDetached
in interfaceUiLifeCycle
prevpage
- the previous page that comp belongs to.
-
handleComponentDetached
protected void handleComponentDetached(Component comp)
-
afterComponentMoved
public void afterComponentMoved(Component parent, Component child, Component prevparent)
Description copied from interface:UiLifeCycle
Called after the parent/children relation is changed.If a tree of components has become children of the other component, this method called only against the root one. For example, if component A has a child B and A becomes a child of component C, then aferComponentAttached(C, A, null) is called.
Note: exception thrown by this method is ignored (but logged).
- Specified by:
afterComponentMoved
in interfaceUiLifeCycle
prevparent
- the previous parent. If it is the same as parent, comp is moved in the same parent.
-
afterPageAttached
public void afterPageAttached(Page page, Desktop desktop)
Description copied from interface:UiLifeCycle
Called after a page is attached to a desktop.Note: exception thrown by this method is ignored (but logged).
- Specified by:
afterPageAttached
in interfaceUiLifeCycle
-
afterPageDetached
public void afterPageDetached(Page page, Desktop prevdesktop)
Description copied from interface:UiLifeCycle
Called after a page is detached to a desktop.- Specified by:
afterPageDetached
in interfaceUiLifeCycle
-
afterShadowAttached
public void afterShadowAttached(ShadowElement shadow, Component host)
Description copied from interface:UiLifeCycle
Called after a shadow is attached to a host.If a tree of shadows are attached to a host, this method called only against the root one. For example, if shadow A has a child B and A is attached to host P, then afterShadowAttached(A, P) is called.
Note: exception thrown by this method is ignored (but logged).
- Specified by:
afterShadowAttached
in interfaceUiLifeCycle
-
afterShadowDetached
public void afterShadowDetached(ShadowElement shadow, Component prevhost)
Description copied from interface:UiLifeCycle
Called after a shadow is detached from a host.If a tree of shadows are detached to a host, this method called only against the root one. For example, if shadow A has a child B and A is detached from host P, then afterShadowDetached(A, P) is called.
Note: exception thrown by this method is ignored (but logged).
- Specified by:
afterShadowDetached
in interfaceUiLifeCycle
prevhost
- the previous host that shadow belongs to.
-
markLifeCycleHandling
public static void markLifeCycleHandling(Component comp)
Internal use only. Mark a component and it's children are handling already in current execution. So, if the component attach to component tree(cause#afterComponentAttached(Component, Page)
, BindUiLifeCycle will not process it again.
-
-