0

How to refer to a component in parent IDSpace in Zul file

asked 2011-08-16 01:41:53 +0800

GGW gravatar image GGW
84 1

<window id="win1">
    <label id="lab1" value="myValue" />
    1:${lab1.value}
    <window id="win2">      
       <label id="lab1" value="yourValue" />      
        2:${win1.lab1.value}
    </window>
</window>

Please help. After a couple of hours googling I still cannot find out the way to make reference to a component in the parent idspace in a zul file. For example, in the above code, what is the way to access lab1.value in win1 from win2? ${win1.lab1.value} doesn't work. It seems easy in java by using "getFellow()" or Path.getComponent("x/y"). [direct access to components in the parent IDSpace with unique ids is no problem].

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2011-08-16 08:14:50 +0800

cyiannoulis gravatar image cyiannoulis
1201 10

Is there any special reason you are using the same id for both labels? The following should work:

<window id="win1">
    <label id="lab1" value="myValue" />
    1:${lab1.value}
    <window id="win2">      
       <label id="lab2" value="yourValue" />      
        2:${lab1.value}
    </window>
</window>

/costas

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: 2011-08-16 01:41:53 +0800

Seen: 227 times

Last updated: Aug 16 '11

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