Hi Gonzalo,
AFAIK, there's no portlet standard way to retrieve the portlet window size
currently.
However, if you have a chance to use client side script before retrieving the
size info from your server-side code, then you can depend on Jetspeed specific
html markups.
Most Jetspeed layout templates write a div tag for each portlet window with
setting the id of the div tag to the portlet window id.
For example, you can find html tags of a portlet window in a portal page like
this:
<div id="dp-7" class="portlet jetspeed">
<div class="PTitle">
...
</div>
<div class="PContentBorder">
...
</div>
</div>
To find the portlet window id with Jetspeed-2 api, you can code like this:
import org.apache.jetspeed.request.RequestContext;
import org.apache.jetspeed.container.PortletWindow;
RequestContext rc = (RequestContext)
renderRequest.getAttribute(RequestContext.REQUEST_PORTALENV);
String windowId = rc.getCurrentPortletWindow().getWindowId();
By the way, I've searched on the internet about how to detect the size of div
tag with javascript and some people recommend to use 'div.offsetHeight' and
'div.offsetWidth'.
Regards,
Woonsan
----- Original Message ----
From: Ate Douma <[email protected]>
To: Jetspeed Developers List <[email protected]>
Sent: Wed, November 18, 2009 11:48:57 AM
Subject: Re: Getting window size
Hi Gonzalo,
I don't have a ready answer right now for retrieving the current portlet window
size, but I'll talk to Woonsan today to see if his auto-resizing
IFrameProxyPortlet might contain some features which you could leverage and I
or Woonsan will come back on this.
Besides that, I'm very interested to know how you are using BIRT from within a
portlet.
I have a feature request for a client for which I'll need to provide a BIRT
reporting engine *manageable* from within Jetspeed as a general reporting
service. My intention is to create a generic solution to be hosted under Apache
Portals Applications, so it might be usable even for other portals as well...
If you already have something setup for this which you are willing to share
and/or provide some insight in how you've using BIRT would be very great!
Regards,
Ate
Gonzalo Aguilar Delgado wrote:
> Hi all,
> I have a portlet that shows a BIRT report. The problem is that I need to
> resize the chart of the
> report according the portlet size.
> The question is:
>
> Is there any way to get the window size of the portlet?
> Is there any example?
> I can resize the chart but need to know what size to resize... :d
>
> Tnx
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]