0

no button state update after .doModal() call

asked 2006-02-28 18:29:22 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

By: nobody

This is a long one...

Ok, I have this window that has a listbox, an "Edit" button, and a "Refresh"
button. The listbox has a onSelect event to enable the "Edit" button when a selection is made. The "Refresh" button resets the list and disables the "Edit"
button.

pseudo gui:

------
apple
orange
pear
------
[Refresh] [Edit]


Simple, the page works ok by itself. I added code to the "Edit" button to popup a modal dialog .zul page (to edit) and it still works ok.

Now, I create another .zul containing a tabbox where one of the tabs includes the above listbox window. Now when I press "Refresh", the "Edit" button does not show to be "disabled" or grayed out even though it's state on the server is disabled.

pseudo gui:

[Tab 1] [Tab 2] [Tab 3]
------
apple
orange
pear
------
[Refresh] [Edit]


The refresh function does:

final Window win = (Window) Executions.createComponents( "edit.zul", null, null); win.doModal(); btnEdit.setDisabled( true );

The above leaves edit button styled as enabled. If I change the code to the following, then it works.

btnEdit.setDisabled( true );
final Window win = (Window) Executions.createComponents( "edit.zul", null, null); win.doModal();

I see is behaviour in other gui elements too where gui look changes are not pushed to browser/client after the ".doModal()" call.

hope that explains it,
rob


delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2006-03-01 04:33:48 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

By: tomyeh

Could you prepare a ZUML page that illustrated the problem, such that I could test it immediately with our demo site?

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-02-28 18:29:22 +0800

Seen: 875 times

Last updated: Mar 01 '06

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