Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Integration of existing gwt application to liferay protal

 
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?



liferayGwt01.jpg
[Thumbnail for liferayGwt01.jpg]
liferayGwt02.jpg
[Thumbnail for liferayGwt02.jpg]
liferayGwt03.jpg
[Thumbnail for liferayGwt03.jpg]
 
I like tacos! And this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic