-
FEATURED COMPONENTS
First time here? Check out the FAQ!
i have tabs within tabs toolbar when i add buttons on these inner tabs it's giving me an error can you any help ? thats my .Zul code
<zk xmlns="http://www.zkoss.org/2005/zul" xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
<vlayout>
<div width="100%" height="100px"></div>
</vlayout>
<hlayout width="100%">
<div width="50px"></div>
<vlayout width="100%">
<vbox height="100%" width="100%" align="left">
<div height="100%" width="100%" align="center">
<style>
.nav_tabs .z-tabpanel { padding: 0; border-bottom: 0 none;}
.nav_tabs .z-tabpanels .z-toolbarbutton-cnt { padding: 4px;}
.nav_category { cursor:pointer; }
.nav_text { color: #696569;
font-size : 24px; font-weight: bold;}
</style>
<tabbox width="1250px" height="600px" sclass="nav_tabs">
<tabs id="tabs">
<tab label="Analysis" />
<tab label="Invoicing" />
</tabs>
<tabpanels>
<tabpanel>
<tabbox>
<tabs>
<tab label="Analysis" />
<tab label="Un-Invoiced" />
</tabs>
<toolbar width="90px">
<toolbarbutton target="_zkdemo"
image="/widgets/tabbox/scrollable/img/balloon-twitter-left.png"
href="http://twitter.com/zkoss"></toolbarbutton>
<toolbarbutton target="_zkdemo"
image="/widgets/tabbox/scrollable/img/balloon-twitter-left.png"
href="http://twitter.com/zkoss"></toolbarbutton>
</toolbar>
<tabpanels>
<tabpanel>
<toolbar hflex="true">
<toolbarbutton label="Product 1"
onClick="updateSubPage(self.label)" />
<toolbarbutton label="Product 2"
onClick="updateSubPage(self.label)" />
</toolbar>
</tabpanel>
<tabpanel>
<hbox align="center" pack="center" hflex="1" vflex="1">
<iframe height="300px" width="1250px"
src="/invoicing/analysis.zul"></iframe>
</hbox>
</tabpanel>
<tabpanel>The second nested panel</tabpanel>
</tabpanels>
</tabbox>
</tabpanel>
<tabpanel>
<tabbox>
<tabs>
<tab label="Generate" />
<tab label="Pending" />
<tab label="Complete" />
<tab label="Sent" />
<tab label="Canceled" />
<tab label="Invoicing Logs" />
<tab label="Payment Recieved" />
<tab label="Credit Note History" />
</tabs>
<tabpanels>
<tabpanel>
<hbox align="center" pack="center" hflex="1" vflex="1">
Generate
</hbox>
</tabpanel>
<tabpanel>Pending</tabpanel>
<tabpanel>Complete</tabpanel>
<tabpanel>Sent</tabpanel>
<tabpanel>Canceled</tabpanel>
<tabpanel>Invoicing Logs</tabpanel>
<tabpanel>Payment Recieved</tabpanel>
<tabpanel>Credit Note History</tabpanel>
</tabpanels>
</tabbox>
</tabpanel>
</tabpanels>
</tabbox>
</div>
</vbox>
</vlayout>
</hlayout>
</zk>
kazma,
Looks like your code is trying to run a method when you click a button that is not defined (at least not in your example). Add the following code after the initial <zk> tag to test it:
<zscript> void updateSubPage(val){ System.out.println(val); } </zscript>
Maybe that will help,
Todd
Asked: 2012-11-28 14:07:32 +0800
Seen: 64 times
Last updated: Nov 29 '12