On Fri, May 6, 2011 at 9:45 AM, Elizabeth Griffith <e_beth...@yahoo.com> wrote: > I saw in the Jetspeed roadmap that the next version of Jetspeed is going to > have direct support for GWT portlets so I am hoping that someone has already > come up with a solution to my problem. I am trying to put GWT into a Jetspeed > portlet. I have succeeded in wrapping GWT into a portlet, but because of a > GWT limitation that the same GWT module cannot be loaded onto the same page > twice, I am so far unable to load two instances of the same portlet onto the > same page in my Jetspeed portal. Has anybody figured out how to do this > without modifying the underlying Jetspeed code? >
I wrote a GWT portlets with Jetspeed a while back, but I never tried to get two on the same page. I think the key is to remove the script line from the portlet, and add it in during the doHeaders method of your portlet. <script type="text/javascript" language="javascript" src="/googleportletapp/googleportletapp/googleportletapp.nocache.js"></script> Another solution (not tested either) could be to set a render parameter on the Jetspeed Request Context, and then just check for it with a JSP, so that you don't include the script twice <%@page import="org.apache.jetspeed.request.RequestContext"%> ... <% RequestContext ctx = request.getAttribute(RequestContext.REQUEST_PORTALENV); if (ctx.getAttribute("com.griffith.app.googleportletRendered") == null) { ctx.setAttribute("com.griffith.app.googleportletRendered", "true"); %> <script type="text/javascript" language="javascript" src="/googleportletapp/googleportletapp/googleportletapp.nocache.js"></script> <% } %> --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-user-unsubscr...@portals.apache.org For additional commands, e-mail: jetspeed-user-h...@portals.apache.org