0

view session parameters via timer

asked 2006-01-18 13:57:17 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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?

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2006-01-19 01:50:29 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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"...)

link publish delete flag offensive edit

answered 2006-01-19 10:09:14 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3530405

By: nobody

Thank you, it was very helpfull ;)

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2006-01-18 13:57:17 +0800

Seen: 607 times

Last updated: Jan 19 '06

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More