Revision history [back]

click to hide/show revision 1
initial version

asked 2013-10-15 20:28:48 +0800

robertkaren gravatar image robertkaren

how to find path of component in nested includes

I have several nested <include> , each with its own page-id, but am having trouble finding the Path() for this window. Can someone tell me what I am doing wrong? This java line is in the controller of a Tree in 'Home' tab and am looking for path of the window under tabs 'Selections'|'Code Book'. The window I seek (codebookCategoriesWinOuter) is found in the bottom zul page pasted below):

Window codebookCategWin = (Window) new Path("//codebookCategoriesTreePage/codebookCategoriesWinOuter").getComponent();

Here are the zul files. Thanks for any help!

<?page id="mainPage"?>
<zk>
<window id="mainWindow" title="EzTAB" height="100%" width="100%" >
<borderlayout>
    <center border="0">
                <tabbox id="mainTabBox" vflex="1">
                    <tabs id="mainTabs">
                       <tab id="homeTab" label="Home" />
                      <tab id="codebookTab" label="Selections" />
                      <tab id="runReportTab" label="Run Report" />
                      <tab id="logoutTab" label="Logout" />
                    </tabs>
                     <tabpanels>
                       <tabpanel style="background:#111bab">
                            <include id="homeTabPanel" src="/homePanel2.zul"/>
                       </tabpanel>
                       <tabpanel id="codebookTabPanel">
                            <include src="/selectionsPanel.zul"/>
                       </tabpanel>
                      <tabpanel>run report</tabpanel>
                      <tabpanel>
                           <include id="logoutTabPanel" src="/logoutPanel.zul"/>
                      </tabpanel>
                    </tabpanels>
                </tabbox>
    </center>
</borderlayout>
<zscript>
    codebookTab.setVisible(false);
    runReportTab.setVisible(false);
</zscript>
</window>
</zk>

<?page id="selectionsPage"?>
<zk>
<borderlayout>
    <north size="100%">
        <tabbox id="codebookPanelLeftTabBox" vflex="1">
            <tabs id="codebookPanelLeftTabBoxTabs">
               <tab id="codebook2Tab" label="Code Book" />
               <tab id="searchTab" label="Search" />
            </tabs>
            <tabpanels>
                  <tabpanel id="codebookTabpanel">
                    <include src="/codebookCategoriesPanel.zul"/>
                  </tabpanel>
                  <tabpanel id="searchTabpanel">
                    This is search
                  </tabpanel>
            </tabpanels>
        </tabbox>
    </north>
</borderlayout>
</zk>

<zk>
<borderlayout>
    <center border="0">
                <tabbox id="codebookTabBox" vflex="1">
                    <tabs id="codebookTabs">
                      <tab id="codebookCategoriesTab" label="Categories" />
                    <!--  add the result pages here -->
                    </tabs>
                     <tabpanels>
                       <tabpanel id="codebookCategoriesTreeTabPanel">
                            <include src="/codebookCategoriesTreePanel.zul"/>
                       </tabpanel>
                    </tabpanels>
                </tabbox>
    </center>
</borderlayout>
<!-- </window> -->
</zk>

<?page id="codebookCategoriesTreePage"?>
<zk>
    <window id="codebookCategoriesWinOuter" style="background:#ababab" height="100%" apply="com.namsi.eztab.services.CodebookCategoriesTreeController">
        <borderlayout>
            <center>
                <window id="codebookCategoriesWin" vflex="true" hflex="true">
                    <tree id="codebookCategoriesTree" style="height:18px;"
                        width="100%" vflex="true">
                        <treecols sizable="true">
                           <!--<treecol label="Item" hflex="min" /> -->
                            <treecol width="100%"/>
                            </treecols>
                    </tree>
                </window>
            </center>
          </borderlayout>
    </window>
</zk>

how to find path of component in nested includes

I have several nested <include> , each with its own page-id, but am having trouble finding the Path() for this window. Can someone tell me what I am doing wrong? This java line is in the controller of a Tree in 'Home' tab and I am looking for path of the window under tabs 'Selections'|'Code Book'. The window I seek (codebookCategoriesWinOuter) is found in the bottom zul page pasted below):

Window codebookCategWin = (Window) new Path("//codebookCategoriesTreePage/codebookCategoriesWinOuter").getComponent();

Here are the zul files. Thanks for any help!

<?page id="mainPage"?>
<zk>
<window id="mainWindow" title="EzTAB" height="100%" width="100%" >
<borderlayout>
    <center border="0">
                <tabbox id="mainTabBox" vflex="1">
                    <tabs id="mainTabs">
                       <tab id="homeTab" label="Home" />
                      <tab id="codebookTab" label="Selections" />
                      <tab id="runReportTab" label="Run Report" />
                      <tab id="logoutTab" label="Logout" />
                    </tabs>
                     <tabpanels>
                       <tabpanel style="background:#111bab">
                            <include id="homeTabPanel" src="/homePanel2.zul"/>
                       </tabpanel>
                       <tabpanel id="codebookTabPanel">
                            <include src="/selectionsPanel.zul"/>
                       </tabpanel>
                      <tabpanel>run report</tabpanel>
                      <tabpanel>
                           <include id="logoutTabPanel" src="/logoutPanel.zul"/>
                      </tabpanel>
                    </tabpanels>
                </tabbox>
    </center>
</borderlayout>
<zscript>
    codebookTab.setVisible(false);
    runReportTab.setVisible(false);
</zscript>
</window>
</zk>

<?page id="selectionsPage"?>
<zk>
<borderlayout>
    <north size="100%">
        <tabbox id="codebookPanelLeftTabBox" vflex="1">
            <tabs id="codebookPanelLeftTabBoxTabs">
               <tab id="codebook2Tab" label="Code Book" />
               <tab id="searchTab" label="Search" />
            </tabs>
            <tabpanels>
                  <tabpanel id="codebookTabpanel">
                    <include src="/codebookCategoriesPanel.zul"/>
                  </tabpanel>
                  <tabpanel id="searchTabpanel">
                    This is search
                  </tabpanel>
            </tabpanels>
        </tabbox>
    </north>
</borderlayout>
</zk>

<zk>
<borderlayout>
    <center border="0">
                <tabbox id="codebookTabBox" vflex="1">
                    <tabs id="codebookTabs">
                      <tab id="codebookCategoriesTab" label="Categories" />
                    <!--  add the result pages here -->
                    </tabs>
                     <tabpanels>
                       <tabpanel id="codebookCategoriesTreeTabPanel">
                            <include mode="defer" src="/codebookCategoriesTreePanel.zul"/>
                       </tabpanel>
                    </tabpanels>
                </tabbox>
    </center>
</borderlayout>
<!-- </window> -->
</zk>

<?page id="codebookCategoriesTreePage"?>
<zk>
    <window id="codebookCategoriesWinOuter" style="background:#ababab" height="100%" apply="com.namsi.eztab.services.CodebookCategoriesTreeController">
        <borderlayout>
            <center>
                <window id="codebookCategoriesWin" vflex="true" hflex="true">
                    <tree id="codebookCategoriesTree" style="height:18px;"
                        width="100%" vflex="true">
                        <treecols sizable="true">
                           <!--<treecol label="Item" hflex="min" /> -->
                            <treecol width="100%"/>
                            </treecols>
                    </tree>
                </window>
            </center>
          </borderlayout>
    </window>
</zk>

how to find path of component path/page-id in nested includes

I have several nested <include> , each with its own page-id, but am having trouble finding the Path() for this window. Can someone tell me what I am doing wrong? This java line is in the controller of a Tree in 'Home' a tab ('Home') and I am looking for path of the window under tabs 'Selections'|'Code Book'. another tab ('Selections'|'Code Book'). I used 'defer' mode to create a page w/ id on the component's page but I can't find it w/ this java line. The window I seek component (codebookCategoriesWinOuter) is found in the bottom zul page pasted below): below).

Window codebookCategWin = (Window) new Path("//codebookCategoriesTreePage/codebookCategoriesWinOuter").getComponent();

Here are the zul files. Thanks for any help!

<?page id="mainPage"?>
<zk>
<window id="mainWindow" title="EzTAB" height="100%" width="100%" >
<borderlayout>
    <center border="0">
                <tabbox id="mainTabBox" vflex="1">
                    <tabs id="mainTabs">
                       <tab id="homeTab" label="Home" />
                      <tab id="codebookTab" label="Selections" />
                      <tab id="runReportTab" label="Run Report" />
                      <tab id="logoutTab" label="Logout" />
                    </tabs>
                     <tabpanels>
                       <tabpanel style="background:#111bab">
                            <include id="homeTabPanel" src="/homePanel2.zul"/>
                       </tabpanel>
                       <tabpanel id="codebookTabPanel">
                            <include src="/selectionsPanel.zul"/>
                       </tabpanel>
                      <tabpanel>run report</tabpanel>
                      <tabpanel>
                           <include id="logoutTabPanel" src="/logoutPanel.zul"/>
                      </tabpanel>
                    </tabpanels>
                </tabbox>
    </center>
</borderlayout>
<zscript>
    codebookTab.setVisible(false);
    runReportTab.setVisible(false);
</zscript>
</window>
</zk>

    <!-- <?page id="selectionsPage"?>
-->
    <zk>
 <borderlayout>
     <north size="100%">
         <tabbox id="codebookPanelLeftTabBox" vflex="1">
             <tabs id="codebookPanelLeftTabBoxTabs">
                <tab id="codebook2Tab" label="Code Book" />
                <tab id="searchTab" label="Search" />
             </tabs>
             <tabpanels>
                   <tabpanel id="codebookTabpanel">
                     <include src="/codebookCategoriesPanel.zul"/>
                   </tabpanel>
                   <tabpanel id="searchTabpanel">
                     This is search
                   </tabpanel>
             </tabpanels>
         </tabbox>
     </north>
 </borderlayout>
 </zk>

<!--<?page id="codebookCategoriesPanelPage"?>
-->
    <zk>
 <borderlayout>
     <center border="0">
                 <tabbox id="codebookTabBox" vflex="1">
                     <tabs id="codebookTabs">
                       <tab id="codebookCategoriesTab" label="Categories" />
                     <!--  add the result pages here -->
                     </tabs>
                      <tabpanels>
                        <tabpanel id="codebookCategoriesTreeTabPanel">
                             <include mode="defer" src="/codebookCategoriesTreePanel.zul"/>
                        </tabpanel>
                     </tabpanels>
                 </tabbox>
     </center>
 </borderlayout>
 <!-- </window> -->
 </zk>

<?page id="codebookCategoriesTreePage"?>
<zk>
    <window id="codebookCategoriesWinOuter" style="background:#ababab" height="100%" apply="com.namsi.eztab.services.CodebookCategoriesTreeController">
        <borderlayout>
            <center>
                <window id="codebookCategoriesWin" vflex="true" hflex="true">
                    <tree id="codebookCategoriesTree" style="height:18px;"
                        width="100%" vflex="true">
                        <treecols sizable="true">
                           <!--<treecol label="Item" hflex="min" /> -->
                            <treecol width="100%"/>
                            </treecols>
                    </tree>
                </window>
            </center>
          </borderlayout>
    </window>
</zk>
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More