-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3528770
By: nobody
I have html page, that must show values from hashtable, which is in session.
I write a test file which show a different random values. I have created .zul file like this:
<window id="view" use="e2edm.ui.xul.StatusWindow"
onRefresh="e2edm.ui.xul.StatusWindow.onRefresh(view)">
<label id="now"/>
<label id="text"/>
<timer id="timer" delay="1000" repeats="true"
onTimer="view.onRefresh(view)"/>
and override class with my StatusWindow:
public class StatusWindow extends Window { public static void onRefresh(Window window) throws UiException {
List list = window.getChildren();
if (list != null) {
for (int i = 0; i < list.size(); i++) {
window.removeChild((Component) list.get(i));
}
}
Label label = new Label("label1" + new Long(new Date().getTime()).toString());
label.setVisible(true);
window.appendChild(label);
}
}
but I see the result only one time. Could you help me?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3530019
By: tomyeh
In your example, timer is also a child of the window, so you kill it when the first onRefresh is called.
You might use
((Label)view.getFellow("now")).setValue("lable"...)
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3530405
By: nobody
Thank you, it was very helpfull ;)
Asked: 2006-01-18 13:57:17 +0800
Seen: 607 times
Last updated: Jan 19 '06