0

load page with tabbox

asked 2013-09-27 17:58:38 +0800

daovallec gravatar image daovallec
11 2

I have this code in ZK, with a menu to navigate:

<zk apply="org.zkoss.bind.BindComposer"
    viewModel="@id('vm') @init('menu')">
    <tabbox width="100%" sclass="nav_tabs">
        <tabs id="tabs">
            <tab label="Admin" onSelect="updateCategory(self.label)"/>
            <tab label="User" onSelect="updateCategory(self.label)"/>
        </tabs>
        <tabpanels>
            <tabpanel>
                <toolbar hflex="true">
                    <toolbarbutton label="CreateUser" onClick="@Command('load',label=self.label)" />
                    <toolbarbutton label="CreateMno" onClick="@Command('load',label=self.label)" />
                </toolbar>
            </tabpanel>
            <tabpanel>
                <toolbar hflex="true">
                    <toolbarbutton label="LoadData" onClick="@Command('load',label=self.label)" />
                    <toolbarbutton label="DownloadData" onClick="@Command('load',label=self.label)" />
                </toolbar>
            </tabpanel>
        </tabpanels>
    </tabbox>
    <separator height="30px"></separator>
    <zscript><![CDATA[
    void updateCategory(String category) {
        current_category.setValue(category);
        current_subpage.setValue("Index");
    }
]]></zscript>
    <hlayout>
        <label id="current_category" sclass="nav_text nav_category" onClick="@command('submit')">Our Product</label>
        <label sclass="nav_text">-</label>
        <label id="current_subpage" sclass="nav_text">Index</label>
    </hlayout>

</zk>

Then i have two roles Admin, and User, and i need load the pages of each user, and i am trying that when a user click in the toolbarbutton, for example CreateUser, then call a method that load in the space of my toolbar button the page, but i do not how can i do it.

Something like:

www. zkoss.org /zkdemo/tabbox/navigation_tabs

but i not need a string in Our product -> Product 1 - > Our Product-Product 1, i need load a page, and i am calling the page with the same name to the label.

And a page from a java class

Somebody can help me?

delete flag offensive retag edit
Be the first one to answer this question!
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
1 follower

RSS

Stats

Asked: 2013-09-27 17:58:38 +0800

Seen: 12 times

Last updated: Sep 27 '13

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