> Are there any standards on this? > > (I'm on page 55 of the portlet standard, maybe I will come to it later > ;-)
Are you using Jetspeed 1 or 2? Jetspeed 1 is not a JSR-168 compliant portal, hence it does not follow that API. > Hm. So if my portlet generates a single HTML element (a div, say), > can I then assume that the parent of that element is the right one to > ask about the width that I should choose? I don't see how interrogating the parent DOM object would help you figure out how to size its content. Maybe I am just confused about what you are asking. > Hm. What happens if my content is very wide, say? Does the portal > add scrollbars or clip (in the sense of CSS's overflow:hidden) the > content, or does the misbehaving portlet destroy the whole portal > layout? That would be the job of the window decoration and/or skin in the portal implementation you are using. Jetspeed 1 allows you to create your own controls that enclose content, you could add whatever dhtml/javascript you need to control content sizing at this level. Jetspeed 2 will have similar but more robust/easier to use layout system than Jetspeed 1. Regards, *================================* | Scott T Weaver | | <[EMAIL PROTECTED]> | | Apache Jetspeed Portal Project | | Apache Pluto Portlet Container | *================================* > -----Original Message----- > From: Kai Grossjohann [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 13, 2003 3:32 PM > To: [EMAIL PROTECTED] > Subject: Re: Find out portlet size in pixels? > > "Weaver, Scott" <[EMAIL PROTECTED]> writes: > > >> My understanding is that the portlet container determines the size of > the > >> portlets, at least to some extent. > >> > >> Now I have some complicated JavaScript stuff which needs to know > >> the size of the document in pixels. For the no-portlet > >> implementation I just do (window.innerWidth || > >> document.body.offsetWidth) to find out. > >> > >> But how to find out the width and height for a portlet? > > > > This type of information is entirely dependent on the client. So > > you will have to use javascript to figure it out. There is nothing > > within the api, from a java standpoint, that can accurately reflect > > the size of the rendered content of a portlet. Controllers do > > "suggest", (in percentages) the width columns, but that is about it. > > Hm. So if my portlet generates a single HTML element (a div, say), > can I then assume that the parent of that element is the right one to > ask about the width that I should choose? > > Hm. What happens if my content is very wide, say? Does the portal > add scrollbars or clip (in the sense of CSS's overflow:hidden) the > content, or does the misbehaving portlet destroy the whole portal > layout? > > Are there any standards on this? > > (I'm on page 55 of the portlet standard, maybe I will come to it later > ;-) > > Kai > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]
