public class HybrisUiVisualizer
extends java.lang.Object
| Constructor and Description |
|---|
HybrisUiVisualizer(Execution exec,
boolean asyncUpdate,
boolean recovering)
Creates a root execution (without parent).
|
HybrisUiVisualizer(HybrisUiVisualizer parent,
Execution exec)
Creates the following execution.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInvalidate(Component comp)
Adds an invalidated component.
|
void |
addInvalidate(Page page)
Invalidates the whole page.
|
void |
addMoved(Component comp,
Component oldparent,
Page oldpg,
Page newpg)
Called to update (redraw) a component, when a component is moved.
|
void |
addResponse(java.lang.String key,
AuResponse response)
Adds a response directly (which will be returned when
getResponses() is called). |
void |
addSmartUpdate(Component comp,
java.lang.String attr,
DeferredValue value)
Smart updates an attribute of a component with a deferred value.
|
void |
addSmartUpdate(Component comp,
java.lang.String attr,
java.lang.Object[] values)
Smart updates a component's attribute with an array of values.
|
void |
addSmartUpdate(Component comp,
java.lang.String attr,
java.lang.String value)
Smart updates a component's attribute.
|
boolean |
addToFirstAsyncUpdate(java.util.List responses) |
void |
addUuidChanged(Component comp,
boolean addOnlyMoved)
Called before changing the component's UUID.
|
void |
disable() |
boolean |
disableClientUpdate(Component comp,
boolean disable)
Sets whether to disable the update of the client widget.
|
AbortingReason |
getAbortingReason()
Returns the reason to aborting, or null if no aborting at all.
|
Execution |
getExecution() |
Component |
getOwner()
Returns the owner component for this execution, or null if this execution is not owned by any component.
|
java.util.List |
getResponses()
Returns a list of
AuResponse according to what components are invalidated and attached. |
boolean |
isAborting()
Returns whether it is aborting.
|
boolean |
isEverAsyncUpdate() |
boolean |
isInvalidated(Component comp)
Returns if this component needs to be redrawn.
|
boolean |
isRecovering() |
void |
popOwner()
Called after a component redraws itself if it ever calls
pushOwner(Component). |
void |
pushOwner(Component comp)
Called before a component redraws itself if the component might include another page.
|
void |
setAbortingReason(AbortingReason reason)
Sets the reason to abort the current execution.
|
public HybrisUiVisualizer(Execution exec,
boolean asyncUpdate,
boolean recovering)
asyncUpdate - whether this execution is for async-updaterecovering - whether this execution is in recovering, i.e., caused by
org.zkoss.zk.ui.sys.FailoverManager#recover.public HybrisUiVisualizer(HybrisUiVisualizer parent, Execution exec)
public final Execution getExecution()
public final boolean isEverAsyncUpdate()
public final boolean addToFirstAsyncUpdate(java.util.List responses)
public boolean isRecovering()
public void disable()
public boolean isInvalidated(Component comp)
Note:
addInvalidate(Component) was not called against this component.public void addInvalidate(Page page)
public void addInvalidate(Component comp)
addSmartUpdate(Component, java.lang.String, java.lang.String) are ignored in this
execution.public void addSmartUpdate(Component comp,
java.lang.String attr,
java.lang.String value)
addInvalidate(Component) is not called in this
executionpublic void addSmartUpdate(Component comp,
java.lang.String attr,
DeferredValue value)
public void addSmartUpdate(Component comp,
java.lang.String attr,
java.lang.Object[] values)
addInvalidate(Component) is not called in this executionpublic boolean disableClientUpdate(Component comp,
boolean disable)
public void addMoved(Component comp,
Component oldparent,
Page oldpg,
Page newpg)
oldparent - the parent before movedoldpg - the page before movednewpg - the page after movedpublic void addUuidChanged(Component comp,
boolean addOnlyMoved)
addOnlyMoved - if true, it is added only if it was moved before (see addMoved(Component, Component, Page, Page)).public void addResponse(java.lang.String key,
AuResponse response)
getResponses() is called).
If the response is component-dependent, AuResponse#getDepends must return a component. And, if the
component is removed, the response is removed, too.
key - could be anything. The second invocation of this method in the same execution with the same key will
override the previous one.public java.util.List getResponses()
throws java.io.IOException
AuResponse according to what components are invalidated and attached.java.io.IOExceptionpublic void pushOwner(Component comp)
public void popOwner()
pushOwner(Component).public Component getOwner()
pushOwner(Component).public void setAbortingReason(AbortingReason reason)
org.zkoss.zk.ui.sys.UiEngine.
Note: if setAbortingReason is ever set with non-null, you CANNOT set it back to null.
The aborting flag means no more processing, i.e., dropping pending requests, events, and rendering.
After call this method, you shall not keep processing the page because the rendering is dropped and the client is out-of-sync with the server.
This method doesn't really abort pending events and requests. It just set a flag, getAbortingReason(), and
it is org.zkoss.zk.ui.sys.UiEngine's job to detect this flag and handling it properly.
public AbortingReason getAbortingReason()
setAbortingReason(AbortingReason)public boolean isAborting()
The execution is aborting if getAbortingReason() returns not null and the returned reason's
AbortingReason#isAborting is true.
Note: Execution#isVoided() means the execution is voided and no output shall be generated. The request is
taken charged by other servlet. On the other hand, isAborting() means the execution is aborting and the
output shall still be generated (and sent). The request is still taken charged by this execution.
Copyright © 2018 SAP SE. All Rights Reserved.