How to update view of a single zul which is included in five tabs.

asked 2018-08-20 15:04:02 +0800

tisaksen gravatar image tisaksen
44 5

updated 2018-08-20 15:04:46 +0800

I have a main zul with a group of five tabs, these tabs all include the same zul file to display some information that has to be visible at all times. For reasons out of my hands this information cannot be placed outside the tabs which would clear the problem.

My problem is that when I update the view using BindUtils.postNotifyChange only the instance in the current view will be updated and the other four instances won't be updated.

How can I work around this?

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-08-20 16:50:18 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9

There are a lot of possibilities.

First of all, each tab has it's own viewmodel, otherwise you wouldn't have this problem.

Some solutions :

  • Making 1 viewmodel what covers the 5 tabs, would solve the issue.
  • Each tab can't be visible in the same time, refresh your info when you select a tab.
  • Make a global-command and implement it in all viewmodels. From there you can do a notify change. To make it more specific you could pass the string for what property need's to be updated so the method is a little more generic.


link publish delete flag offensive edit


Thanks a lot for a fast and good reply. I will check out the global-command suggestion as it seems to be the cleanest solution for me.

tisaksen ( 2018-08-20 17:04:54 +0800 )edit
Your answer
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




Asked: 2018-08-20 15:04:02 +0800

Seen: 9 times

Last updated: Aug 20 '18

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