-
FEATURED COMPONENTS
First time here? Check out the FAQ!
<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].
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
Asked: 2011-08-16 01:41:53 +0800
Seen: 227 times
Last updated: Aug 16 '11