-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi All,
Please read the below data carefully .
I have tried the below code, but on clicking on each toolbarbutton it should open the zul page on the below(Note: it should not be in the new page)
Ex: on clicking on product1 button it should open index.zul page.
<zk xmlns:x="xhtml">
<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="800px" sclass="nav_tabs">
<tabs id="tabs">
<tab label="Our Product" />
<tab label="Live Demo" />
<tab label="Online Documentation" />
</tabs>
<tabpanels>
<tabpanel>
<toolbar width="794px">
<toolbarbutton label="Product 1" onClick="index.zul" />
<toolbarbutton label="Product 2" onClick="index2.zul" />
<toolbarbutton label="Product 3" onClick="index3.zul" />
</toolbar>
</tabpanel>
<tabpanel>
<toolbar width="794px">
<toolbarbutton label="Documentation 1" onClick="index4.zul" />
<toolbarbutton label="Documentation 2" onClick="index5.zul" />
<toolbarbutton label="Documentation 3" onClick="index6.zul" />
<toolbarbutton label="Documentation 4" onClick="index7.zul" />
<toolbarbutton label="Documentation 5" onClick="index8.zul" />
</toolbar>
</tabpanel>
</tabpanels>
</tabbox>
<separator height="30px"></separator>
</zk>
The above code is giving the error after clicking on Product 1 Product 2 Product 3 .
How to solve above problm.
Example here
Hi Senthilchettyin,
<button label="Next" href="next.zul"/>
insted of the code which u have provided , can i use above one (<button label="Next" href="next.zul"/>
) .... it looks simple but problm is that i am not able to see the zul page exactly below the tabpanal. Its going to open an new window .
can u plz help me to modify the above code?????? by simple way
Thanks in advance
<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<window title="new page title" border="normal">
New Content Here!
<button label="click me" href="../main/Practice.zul"/>
</window>
</zk>
HI Senthilchettyin,
Its opening again new window , which i dont want .
Please see the below example
1) Click on this link -> http://www.zkoss.org/
2)click on products ----> here we are getting the details of product exactly below , its not going to open new window. I am able to see toolbar(which contains product ,demo, download ,whyzk , community, documentation and support ) and its details parallaly .
Please tell me the code like that . And help me to modify the code which one i have posted earlier.
Hi All,
Need help plz
I don´t know if it´s that you wanna, but there is
This is my main Window. Every page on my project is created inside this zul file. Inside <div id="mdiApplication" />. As you can imagine I use createComponents.
<?xml version = '1.0' encoding = 'UTF-8'?> <?page id="main" title="Sistema - Página Principal" language="xul/html" contentType="text/html;charset=UTF-8"?> <zk xmlns="http://www.zkoss.org/2005/zul" 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 "> <script type="text/javascript" src="/js/meiomask/jquery.meio.mask.js" charset="utf-8" /> <window width="100%" height="100%" apply="br.com.mcampos.web.controller.logged.IndexController" id="indexMainWnd" > <borderlayout height="100%" width="100%"> <north id="divMenu" fulfill="=/private/menu.zul" /> <south style="background-color:#B1CBD5" fulfill="=/private/south.zul" /> <center id="centerMdi" flex="true" autoscroll="true"> <div id="mdiApplication" /> </center> </borderlayout> </window> </zk>
When an user choose a menu...
This code is inside br.com.mcampos.web.controller.logged.IndexController - Which is the page controller shown above.
public void onClick( MouseEvent evt ) { Menuitem menuItem; if ( evt.getTarget( ) instanceof Menuitem ) { menuItem = (Menuitem) evt.getTarget( ); Object obj; obj = menuItem.getAttribute( MenuController.attrMenu ); if ( obj != null ) { /* * TODO: add menu routine */ } else { if ( SysUtils.isEmpty( menuItem.getValue( ) ) == false ) { loadPage( menuItem.getValue( ), true ); } } } } protected void loadPage( String page, boolean mustClear ) { gotoPage( page, getMdiApplication(), null, mustClear ); BookmarkSession session = getBookmarkSession(); Integer nIndex = session.set( new Bookmark( page, null ) ); Executions.getCurrent().getDesktop().setBookmark( nIndex.toString() ); } protected void gotoPage( String uri, Component parent, Map<?, ?> parameters, boolean mustClear ) { if ( parent == null && getMainWindow( ) != null ) { parent = getMainWindow( ).getParent( ); } if ( parent != null ) { if ( mustClear ) { if ( SysUtils.isEmpty( parent.getChildren( ) ) == false ) { parent.getChildren( ).clear( ); } } Component c = Executions.getCurrent( ).createComponents( uri, parent, parameters ); if ( c != null ) { c.setAttribute( "zulPage", uri ); } } else { redirect( uri ); } }
That´s it!!!!
TYA
Asked: 2012-06-05 06:49:02 +0800
Seen: 427 times
Last updated: Jun 08 '12