Class OpenData
- All Implemented Interfaces:
Serializable,ActionData
Note: it is a bit confusing but Events.ON_CLOSE is sent when
user clicks a close button. It is a request to ask the server
to close a window, a tab or others. If the server ignores the action,
nothing will happen at the client.
On the other hand, Events.ON_OPEN (with OpenData) is
a notification. It is sent to notify the server that the client has
opened or closed something.
And, the server cannot prevent the client from opening or closing.
- Author:
- jumperchen
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
OpenData
public OpenData()
-
-
Method Details
-
isOpen
public boolean isOpen()Returns whether it causes open. -
getReferencePath
public int[] getReferencePath()Returns the reference path if any. This method is used forITreeitemto open or close a treeitem to get its tree path.- Returns:
-
getReference
Returns the reference that causesSelfto be opened.It is
null, if the open event is not caused by opening a context menu, a tooltip or a popup.
Note: theonOpenaction is also sent when closing the context menu (tooltip and popup), and this method returns null in this case. Thus, it is better to testisOpen()orgetReference()before accessing the returned value.if (event.isOpen()) doSome(event.getReference()); -
getValue
Returns the value of the target component, when the onOpen event is sent, or null if not applicable.Note:
ICombobox,IBandboxand othercombo-typeinput don't send theonChangeaction when the dropdown is opened (onOpen). Thus, if you want to do something depends on the value, use the value returned by this method. Furthermore, forIComboboxandIBandbox, the returned value is a non-null String instance.
-