"Weaver, Scott" <[EMAIL PROTECTED]> writes:

>> 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.

Ah, okay, so if I'm using Jetspeed 1, then I'll have to switch.  I
don't recall at the moment; the stuff is at work.

>> 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.

I think it's me who was confused.  I was thinking that maybe the
portal generates <td style="width:150px">[[portlet goes here]]</td>,
but on second thought, that makes no sense.

Also, I was thinking about the IE document.all DOM thing, where you
can ask for the width in pixels of an element.  But it seems that this
can only be done after the document is loaded, and then it's too late
to do something about the size...  One could, however, render an
invisible div with the real contents and a very small div with some
dummy content.  Then, when the document is loaded, one looks at the
area in pixels of the parent DOM object, frobs the size of the
previously invisible div, and makes it visible.

That would give me one more opportunity to break rules of sensible web
design.  What an exciting thought.

>> 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.

So this would depend on the portlet container.  So if I wanted to
write a portlet that works with Jetspeed and also with IBM Websphere
Portal, then I might have to make two implementations?

I think that I'm going to end up with something simple and stupid,
like allowing the users to specify width/height of the portlet in the
preferences.  That is not so terribly nice to use, but at least it
won't drive the people involved crazy.

Kai



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to