File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Portals and Portlets and the fly likes Integration of existing gwt application to liferay protal Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Integration of existing gwt application to liferay protal " Watch "Integration of existing gwt application to liferay protal " New topic
Author

Integration of existing gwt application to liferay protal

peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 240
In my gwt module, onModuleLoad() method I write the following code

RootPanel rootPanel = RootPanel.get("uniqueID");
//RootPanel rootPanel = RootPanel.get();
final SplitLayoutPanel splitLayoutPanel = new SplitLayoutPanel();
rootPanel.add(splitLayoutPanel);
splitLayoutPanel.setSize(String.valueOf(Window.getClientWidth()), String.valueOf(Window.getClientHeight()));


I compile the gwt module and copy all file under the directory of *.nocache.js(attachment liferayGwt03.jpg) to demo-portlet/docroot/html/
(attachment liferayGwt02.jpg, demo-portlet is my first portlet example)
and then in docroot/view.jsp, I write the following

<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<script src="<%=request.getContextPath()%>/html/com.mycompany.project.GWTDesignerFirst.nocache.js">
</script>
<div id="uniqueID"></div>
<portlet:defineObjects />

This is the Demo portlet.


but when I run the liferay portal, the rootPanel occupy all the space of the front page of liferay, not inside any portlet window. why?
how to limit its size to within the portlet window?





[Thumbnail for liferayGwt01.jpg]

[Thumbnail for liferayGwt02.jpg]

[Thumbnail for liferayGwt03.jpg]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Integration of existing gwt application to liferay protal