0

Include ZUL

asked 2011-05-02 16:04:58 +0800

kikeskate gravatar image kikeskate
261 2
HI... I want to include 3 .ZUL(inte.zul, ccpampanys.zul, pre.zul ) pages to into one .ZUL (administration.zul). The problem is that in my 3. ZUL Page i have <menubars>. That i put it to not loose it when i'm searching in other pages. I can use <include> only for a part of the zul page?? How can find a solution ... thanks..
<?page title="Previous Executed Jobs" contentType="text/html;charset=UTF-8"?>
<zk>
<style>
    body {  
           background-image: url('images/fondos.jpg'); 
           
          }		
</style>

<menubar>
			<menu label="Aplications">
				<menupopup>
				<menuitem label="Map Visualitation" />
				<menuseparator />
				<menu label="Historical Processing">
					<menupopup>					
						<menuitem label="Show Screen with parameters" onClick="gotoPage()"/>
						<menuseparator />
						<menuitem label="Show Screen with previus executed jobs" />
						<menuitem label="Show Screen with intermediate results" />
					</menupopup>
				</menu>				
				<menuseparator />
				<menuitem label="Monitoring" />
				</menupopup>
			</menu>
			
			
			
			<menu label = "Administration">
				<menupopup>
				<menuitem label = "Show Available Applications"/>
				<menuseparator />
				<menu label = "Users">
					<menupopup>
						<menuitem label = "New Users" onClick="goPage()"/>
						<menuseparator/>
						<menuitem label = "Show Users"/>
					</menupopup>		
				</menu>	
				<menuseparator /> 
				<menu label = "Roles">
					<menupopup>
						<menuitem label = "New Roles"/>
						<menuseparator/>
						<menuitem label = "Show Roles"/>
					</menupopup>
				</menu>	
				</menupopup>
			</menu>
		    <menuitem label="Log Out" id = "logout"/>
			
		</menubar>



<window title="Previous Jobs Executed" width="1000px" border="normal" position="center" mode="overlapped" height="250px">


<grid>
		<columns>
			<column label="Execution ID"/>
			<column label="Start Date"/>
			<column label="End Date"/>
			<column label="Start Hour"/>
			<column label="End Hour"/>
			<column label="Ingest Rawdata" width="100px"/>
			<column label="Export Presence" width="120px"/>
			<column label="Export Flows" width="100px"/>
			<column	label= "Rasterizat" width="100px"/>		
		</columns>
		<rows>
			<row>
				
				<label value="TMOBILE000001" />
				<label value="1/11/2011" />
				<label value="1/11/2011" />
				<label value="9:00:00" />
				<label value="13:00:00" />
				<label value="0" />
				<label value="1" />
				<label value="0" />
				<label value="1" />				
			</row>
			
			<row>
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
			</row>
		
			<row>
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
			</row>
			
			<row>
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
			</row>
			
			<row>
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
			</row>
			
			<row>
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
			</row>
			
			<row>
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
			</row>
			
			<row>
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
			</row>
			
			
		
		
		</rows>
	</grid>
	
	
	
	
	<div  align="center"> 
		<button label=" Process " onClick="" width="90px"/>
	</div>


</window>
</zk>
<?page title="Intermediate Results" contentType="text/html;charset=UTF-8"?>
<zk>

<style>
    body {  
           background-image: url('images/fondos.jpg'); 
           
          }		
</style>

<menubar>
			<menu label="Aplications">
				<menupopup>
				<menuitem label="Map Visualitation" />
				<menuseparator />
				<menu label="Historical Processing">
					<menupopup>					
						<menuitem label="Show Screen with parameters" onClick="gotoPage()"/>
						<menuseparator />
						<menuitem label="Show Screen with previus executed jobs" />
						<menuitem label="Show Screen with intermediate results" />
					</menupopup>
				</menu>				
				<menuseparator />
				<menuitem label="Monitoring" />
				</menupopup>
			</menu>
			
			
			
			<menu label = "Administration">
				<menupopup>
				<menuitem label = "Show Available Applications"/>
				<menuseparator />
				<menu label = "Users">
					<menupopup>
						<menuitem label = "New Users" onClick="goPage()"/>
						<menuseparator/>
						<menuitem label = "Show Users"/>
					</menupopup>		
				</menu>	
				<menuseparator /> 
				<menu label = "Roles">
					<menupopup>
						<menuitem label = "New Roles"/>
						<menuseparator/>
						<menuitem label = "Show Roles"/>
					</menupopup>
				</menu>	
				</menupopup>
			</menu>
		    <menuitem label="Log Out" id = "logout"/>
			
		</menubar>
		


<window title="Intermediate Results " width="800px" border="normal" position="center" mode="overlapped">

		

			<grid>		
				<rows>
					 
					<row>
						<label value="Name of the log file" />
					 	<textbox />
					</row>
				
					<row>
						<label value = "Last update "/>
						<textbox />
					</row>
			
			</rows>
					
			</grid>	
					
					<div  align="center">
							
							<button label=" Process " onClick="" width="90px"/>
					</div>
					
				
	
				<vlayout>
				
					
				<label value="Aca apereciran ultimas 20 lineas" visible="true"/>
				<label value="Aca apereciran ultimas 20 lineas" />
				<label value="Aca apereciran ultimas 20 lineas" />
				<label value="Aca apereciran ultimas 20 lineas" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
				<label value="" />
			
				</vlayout>

	</window>
</zk>
<?page title="Current City" contentType="text/html;charset=UTF-8"?>
<zk>

<style>
    body {  
           background-image: url('images/celeste.jpg'); 
           
          }		
</style>


	<window title="Current City Web Aplications" border="normal" height="400" visible="true" width="800" >
		<menubar>
			<menu label="Aplications">
				<menupopup>
				<menuitem label="Map Visualitation" />
				<menuseparator />
				<menu label="Historical Processing">
					<menupopup>					
						<menuitem label="Show Screen with parameters" onClick="gotoPage()"/>
						<menuseparator />
						<menuitem label="Show Screen with previus executed jobs" />
						<menuitem label="Show Screen with intermediate results" />
					</menupopup>
				</menu>				
				<menuseparator />
				<menuitem label="Monitoring" />
				</menupopup>
			</menu>
			
			
			
			<menu label = "Administration">
				<menupopup>
				<menuitem label = "Show Available Applications"/>
				<menuseparator />
				<menu label = "Users">
					<menupopup>
						<menuitem label = "New Users" onClick="goPage()"/>
						<menuseparator/>
						<menuitem label = "Show Users"/>
					</menupopup>		
				</menu>	
				<menuseparator /> 
				<menu label = "Roles">
					<menupopup>
						<menuitem label = "New Roles"/>
						<menuseparator/>
						<menuitem label = "Show Roles"/>
					</menupopup>
				</menu>	
				</menupopup>
			</menu>
		    <menuitem label="Log Out" id = "logout"/>
			
		</menubar>
	
		 	<zscript><![CDATA[
		 	                  
				public void gotoPage(){
	 					Executions.sendRedirect("ccompanys.zul");
	 					
				}
				
				public void goPage(){
					Executions.sendRedirect("newusers.zul");
				
				}
		
				
			
		 	                  ]]></zscript>
		 	                  
		<include src="ccompanys.zul"/>
	</window>
	
	
</zk
delete flag offensive retag edit

8 Replies

Sort by ยป oldest newest

answered 2011-05-03 12:08:50 +0800

kikeskate gravatar image kikeskate
261 2

updated 2011-05-03 12:25:37 +0800

In all the windows appears menu. Becouse i used include in the others page to include the menu.

How can i set to only appear one menu in this window.



<?page title="Administration" contentType="text/html;charset=UTF-8"?>
<zk>
<window title="Administration" border="normal">

<window>

	<window>
	
		<include src="inte.zul"/> 
	 
	</window>


	<window>
	
		<include src="pre.zul"/> 
	 
	</window>

	<window>
	
		<include src="ccompanys.zul"/> 
	 
	</window>

	
</window>


</window>
</zk>

link publish delete flag offensive edit

answered 2011-05-03 20:40:53 +0800

wrt2k4 gravatar image wrt2k4
24

Put the menu bar in a another zul page and create a include for this in the administration.zul

link publish delete flag offensive edit

answered 2011-05-03 22:24:41 +0800

kikeskate gravatar image kikeskate
261 2

I just did that, but in my other windows i have the menu like <include> too, and when i want to import the tree windows to administration.zul includes too the menus of the 3 pages.

link publish delete flag offensive edit

answered 2011-05-04 07:30:02 +0800

wrt2k4 gravatar image wrt2k4
24

Why you put the menubar in 3 pages?, put only in the administration.zul and put the methods in that.

link publish delete flag offensive edit

answered 2011-05-04 10:39:34 +0800

kikeskate gravatar image kikeskate
261 2

Becouse in adminsitration.zul is going to work with the 3 pages. But not all are going to be access to administration. Thats why i need the menu for all the pages for the persons that not have acess to administration.

link publish delete flag offensive edit

answered 2011-05-04 12:50:55 +0800

wrt2k4 gravatar image wrt2k4
24

So i think that is better if you control the menubar permissions for the users in a only menubar but if you really want do that with the menubars in the 3 pages i think that the setVisible(false) will help you

link publish delete flag offensive edit

answered 2011-05-04 16:56:31 +0800

kikeskate gravatar image kikeskate
261 2

updated 2011-05-04 16:58:36 +0800

Maybe you can refer me to a example or book.

link publish delete flag offensive edit

answered 2011-05-04 19:10:59 +0800

wrt2k4 gravatar image wrt2k4
24


<menubar>
        <attribute name="onCreate">
            <![CDATA[
                if(userPermission == 1){
                    self.setVisible(false);
                }
            ]]>
        </attribute>
        <menu label="Aplications">
            <menupopup>
                <menuitem label="Map Visualitation" />
                <menuseparator />
                <menu label="Historical Processing">
                    <menupopup>
                        <menuitem label="Show Screen with parameters" onClick="gotoPage()"/>
                        <menuseparator />
                        <menuitem label="Show Screen with previus executed jobs" />
                        <menuitem label="Show Screen with intermediate results" />
                    </menupopup>
                </menu>
                <menuseparator />
                <menuitem label="Monitoring" />
            </menupopup>
        </menu>



        <menu label = "Administration">
            <menupopup>
                <menuitem label = "Show Available Applications"/>
                <menuseparator />
                <menu label = "Users">
                    <menupopup>
                        <menuitem label = "New Users" onClick="goPage()"/>
                        <menuseparator/>
                        <menuitem label = "Show Users"/>
                    </menupopup>
                </menu>
                <menuseparator />
                <menu label = "Roles">
                    <menupopup>
                        <menuitem label = "New Roles"/>
                        <menuseparator/>
                        <menuitem label = "Show Roles"/>
                    </menupopup>
                </menu>
            </menupopup>
        </menu>
        <menuitem label="Log Out" id = "logout"/>

    </menubar>

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-05-02 16:04:58 +0800

Seen: 382 times

Last updated: May 04 '11

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