-
FEATURED COMPONENTS
First time here? Check out the FAQ!
<zk>
<portallayout id="myptl" maximizedMode="whole" onPortalMove="saveStatus()" onCreate="initStatus()">
<portalchildren style="padding: 5px" width="25%">
<panel id="pnlSubMenu" height="250px" title="SUB MENU" border="normal" style="margin-bottom:10px" width="250px" >
<panelchildren id = "pnlcSubmenu" >
<vlayout>
<image src="Invoice.zul" />
<hlayout spacing="10px">
<image src="Customer Info.zul" />
<image src="Project.zul" />
</hlayout>
</vlayout>
</panelchildren>
</panel>
<panel id="pnlMainMenu" height="300px" title="MAIN MENU" border="normal" style="margin-bottom:10px" width="250px">
<panelchildren>
<label value=" Order" width="100px" onClick="loadPage()" />
<separator spacing="20px"/>
<hbox><label value=" Locations" /></hbox>
<separator spacing="20px"/>
<hbox><label value=" Finance" /></hbox>
<separator spacing="20px"/>
<hbox><label value="ContractorDetails" /></hbox>
</panelchildren>
</panel>
</portalchildren>
<portalchildren style="padding: 5px" width="20%">
<panel id="" height="560px" title="SEARCH" border="normal" style="margin-bottom:10px" width="200px" collapsible="true" closable="true" maximizable="true">
<panelchildren>
</panelchildren>
</panel>
</portalchildren>
<portalchildren style="padding: 5px" width="30%" >
<panel id="" height="560px" title="DETAIL" border="normal" style="margin-bottom:10px" width="300px" collapsible="true" closable="true" maximizable="true">
<panelchildren>
</panelchildren>
</panel>
</portalchildren>
<portalchildren style="padding: 5px" width="25%">
<panel id="" height="250px" title="REPORTS" border="normal" style="margin-bottom:10px" width="250px" collapsible="true" closable="true" maximizable="true">
<panelchildren>
</panelchildren>
</panel>
<panel id="" height="300px" title="HELP" border="normal" style="margin-bottom:10px" width="250px" collapsible="true" closable="true" maximizable="true">
<panelchildren>
</panelchildren>
</panel>
</portalchildren>
</portallayout>
<!-- Save Portlet Position (Session Scope)-->
<zscript><![CDATA[
void initStatus() {
List panelchildren = myptl.getChildren();
for (int i = 0 ; i < panelchildren.size() ; i++) {
List panelIds = session.getAttribute("PortalChildren" + i);
if (panelIds != null) {
for (String panelId:panelIds) {
Panel newPanel = myptl.getFellow(panelId);
if (panelchildren.size() > 0)
panelchildren.get(i).insertBefore(newPanel,panelchildren.get(0));
else
newPanel.setParent(panelchildren.get(i));
}
}
}
}
void saveStatus() {
int i = 0;
for (Portalchildren ptlc:myptl.getChildren()) {
List portletIds = new ArrayList();
for (Panel portlet : ptlc.getChildren())
portletIds.add(portlet.getId());
session.setAttribute("PortalChildren" + i++, portletIds);
}
}
]]></zscript>
</zk>
ajitha,
The forum title line is meant to hold the subject of your question, not the question itself.
1) Fill in the title with the subject of your question
2) Provide an explanation of what your problem is
3) Ask questions you need to ask
4) As seen right below this editor box when you're entering your post: "Please provide reproducible code and ZK version if possible, use [ code ][ /code ] to wrap your code."
Asked: 2011-05-03 06:17:42 +0800
Seen: 203 times
Last updated: May 03 '11