0

How to locate?

asked 2011-11-08 12:32:32 +0800

streamif gravatar image streamif
15

updated 2013-02-05 17:29:13 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

My example:

<borderlayout id="lay" width="100%" height="100%"> 
<north id="nor" size="100px" border="0px"> 
</north> 

<west width="120px" collapsible="true" title="west" splittable="true"> 
</west> 

<east width="120px" collapsible="true" title="east"> 
</east> 

<south size="40px" border="0px"> 
</south> 


<center id="cen" border="0px"> 
<vbox> 
<include src="win1.zul"/> ********** sub-window1 
<include src="win2.zul"/> ********** sub-window2 
</vbox> 
</center> 
</borderlayout>

----win1.zul-------------------------------

<window id="win1"> 
<testbox id="t1" value="t1"/> 
</winodw>

----win2.zul--------------------------------

<window id="win2" apply="my.win2"> 
<button label="clk" forward="onClick=onGO"/> 
</window>

--win2.java---------------------------

public class win2 extends GenericComposer{ 

public void onGO() 
{ 
******* sub-window2 get sub-window1's testbox t1************* 
******* try 
Textbox t=null; 
t=((Textbox)Path.getComponent("/win1/t1");//!!!!!!FAILED 
t=((Textbox)Path.getComponent("//win1/t1");//!!!!!!FAILED 
t=((Textbox)Path.getComponent("/lay/cen/win1/t1");//!!!!!!FAILED 

but , how to do? please tell me. 

} 
}
delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2011-11-08 16:15:18 +0800

DaniG gravatar image DaniG
78 1

Hi....

I am working with some includes in my application too. It is not the same that you example but... maybe you get it giving id's to your includes and using it in that way:

<include id="include_1" ... >
<include id="include_2" ... >

and then...

 Path.getComponent("/yourPageId/include_1/t1");
 Path.getComponent("/yourPageId/include_2/yourButtonId");

It worked in my case, hope for you too.

link publish delete flag offensive edit

answered 2013-02-05 17:23:09 +0800

limaricardo gravatar image limaricardo
0

Look that: http://books.zkoss.org/wiki/ZK_Developer's_Reference/UI_Composing/ID_Space (http://books.zkoss.org/wiki/ZKDeveloper'sReference/UIComposing/IDSpace)

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-11-08 12:32:32 +0800

Seen: 284 times

Last updated: Feb 05 '13

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