|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zk.ui.event.Event
org.zkoss.zk.ui.event.InputEvent
public class InputEvent
Represents an event cause by user's input something at the client.
InputableX,
Inputable| Constructor Summary | |
|---|---|
InputEvent(java.lang.String name,
Component target,
java.lang.String val)
Constructs a input-relevant event. |
|
InputEvent(java.lang.String name,
Component target,
java.lang.String val,
boolean selbk,
int start)
Constructs an event for onChanging. |
|
| Method Summary | |
|---|---|
int |
getStart()
Returns the start position of the cursor from the input element. |
java.lang.String |
getValue()
Returns the value that user input. |
boolean |
isChangingBySelectBack()
Returns whether this event is onChanging, and caused by
user's selecting a list of items. |
| Methods inherited from class org.zkoss.zk.ui.event.Event |
|---|
getData, getName, getPage, getTarget, isPropagatable, stopPropagation, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public InputEvent(java.lang.String name,
Component target,
java.lang.String val)
val - the new value
public InputEvent(java.lang.String name,
Component target,
java.lang.String val,
boolean selbk,
int start)
onChanging.
selbk - whether this event is caused by user's selecting a list
of items. Currently, only combobox might set it to true for the onChanging
event. See isChangingBySelectBack() for details.| Method Detail |
|---|
public final java.lang.String getValue()
public final boolean isChangingBySelectBack()
onChanging, and caused by
user's selecting a list of items.
It is always false if it is caused by the onChange event.
Currently, only combobox might set it to true for the onChanging
event. It is useful when you implement autocomplete.
To have better response, you usually don't filter out unmatched items
if this method returns true. In other words, you simply ignore
the onChanging event if this method return true, when
implementing autocomplete.
public int getStart()
Note: In IE browser, we cannot get the position of cursor because onblur
event of Javascript is always fired before onChange is fired.
To get the position of cursor, onChanging event is suggested
since onblur event of Javascript will not be fired.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||