View Full Version : how to set rows in portal?

25 Jun 2009, 5:22 AM

I have a question about the Portal. There is a method insert (http://www.extjs.com/deploy/gxtdocs/com/extjs/gxt/ui/client/widget/custom/Portal.html#insert%28com.extjs.gxt.ui.client.widget.custom.Portlet,%20int,%20int%29)(Portlet (http://www.extjs.com/deploy/gxtdocs/com/extjs/gxt/ui/client/widget/custom/Portlet.html) portlet, int index, int column)for inserting the column. Is there any method for inserting row?

I have tried to add two portal to a content panel instead for two row, but the portlet cannot be drag from one to the other, is there any way for draging one portlet from one portal to another portal?

Thank you.

25 Jun 2009, 9:32 PM
May be people cannot understand what I mean without code, some codes are listed below

ContentPanel contentPanel = new ContentPanel();

Portal portal = new Portal(3);
portal.setStyleAttribute("backgroundColor", "white");
portal.setColumnWidth(0, .33);
portal.setColumnWidth(1, .33);
portal.setColumnWidth(2, .33);
portal.setStyleAttribute("backgroundColor", "black");

Portlet portlet = new Portlet();
portlet.setHeading("Another Panel 1");
portlet.getHeader().addTool(new ToolButton("x-tool-gear"));
portlet.addText("Hello Page");

Portal portal2 = new Portal(3);
portal2.setStyleAttribute("backgroundColor", "white");
portal2.setColumnWidth(0, .33);
portal2.setColumnWidth(1, .33);
portal2.setColumnWidth(2, .33);
portal2.add(portlet, 0);
contentPanel.add(portal, new RowData(1, 0.2, new Margins(0)));
contentPanel.add(portal2, new RowData(1, 0.8, new Margins(0)));

I want to simulate Portal with two row, so I tried to use two portals, added vertically into the contentpanel
The portlet is added to portal2 perfectly, but it cannot be drag to portal from portal2.
can anyone help? can portlet be drag from one portal to another? or do there any other way to have a multi-rows portal?

29 Jun 2009, 12:54 PM
can i do this using javascript?
is there a similar function insert for portlet in ExtJs ?
Where can i see the api related to portal ?