Controller comunication

asked 2017-06-01 18:28:48 +0800

caiofilipemr gravatar image caiofilipemr
5 2

Hello everybody.

I am having trouble to find the best approach to maintain a communication beetwen two controllers which are running at the same time.

I have two controllers (A and B).

The A.zul file:

  //Other components
        <include src="/views/B.zul"/>

The B.zul file:

<div id="divB" apply="pkg.B">
  <button onClick="divB$composer.doSomething();"/>


class A extends GenericForwardComposer {
  public void doSomethigOnButtonInBControllerClicked() {
    // Do something when the button in the B controller was clicked.


class B extends GenericForwardComposer {
  public void doSomething() {
    // Call doSomethigOnButtonInBControllerClicked of A

B is included by others controllers, which means it has to warn his "parent" without know who is it.

What is the best approach in this case?

Thanks in advance.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-06-19 08:37:48 +0800

Darksu gravatar image Darksu
1991 1 4

Hello caiofilipemr,

In order to communicate between parent-child i usually use global command:


For the second case scenario that is a little tricky, and will have to give some thoughts.



link publish delete flag offensive 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

1 follower



Asked: 2017-06-01 18:28:48 +0800

Seen: 26 times

Last updated: Jun 19 '17

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