-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4395845
By: tommasofin
I want to get the the value of a textbox at the onChanging event. I've extended the textbox component in this way:
public class TextChange extends Textbox {
public void onChanging(Event event) {
}
}
After some debug I've saw that in the "event" object there is the private variable _val that contains the value entered, but there isn't the getter for this variable.
How can I do?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4395855
By: jumperchen
Use the getTarget method to get the component.
For example,
((Textbox)event.getTarget()).getValue;
/Jumper
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4395891
By: tommasofin
I've just try this but doesn't work. If I call:
((Textbox)event.getTarget()).getValue;
is the same thing of:
this.getValue();
The value of the textbox is the old value at the onChanging event (page 92 of zkdevguide). The fresh value is only inside the event object.
Any other suggestion?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4395933
By: tommasofin
I've found.
The problem was because I used the Event class an not InputEvent class. In this way it works:
public class TextChange extends Textbox {
public void onChanging(InputEvent event) {
System.out.println((String)event.getValue());
}
}
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4832648
By: erickmelo
I'm having the same problem reported in this Thread.
I want implements a suggestion combobox: I tried this code:
combo.addEventListener("onChanging", new EventListener() {
public void onEvent(Event event) throws Exception {
System.out.println("value"+combo.getValue());
}
});
But I dont' get the Combobox typed value... It returns :" value, value, value".
For each letter typed I get a printed line, but combo.getValue() doesn't return any value.
Is it a bug or am I using some thing wrong?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4833555
By: waterbottle
Hi,
Did you read above discussion already?
public void onChanging(InputEvent event) {
System.out.println((String)event.getValue());
}
/Dennis
Asked: 2007-07-04 12:12:00 +0800
Seen: 380 times
Last updated: Jul 18 '12