Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Full size portlet

Pertti Ylijukuri
1 decade ago Dec 22, 2009 11:56am

How I can do full size where width and height is 100%. This work fine in normal application, but not inside portlet.
After I set pixels portlet work fine. Without this I can't get work liferay freeform layout. s

Last updated on Dec, 22nd 2009
Pertti Ylijukuri
1 decade ago Dec 22, 2009 12:04pm

This is what I see in Firebug. Panel is hided, but it show after I change _OpenLayers_ height and width to pixels.

<div style="overflow: hidden; height: 623px; width: 1257px; float: left; padding-left: 0px; padding-top: 0px;">
<div style="float: left; margin-left: 0px;">
<div class="v-mappanel" style="width: 1257px;">
<div id="_OpenLayers_ViewPort" class="olMapViewport" style="overflow: hidden; position: relative; width: 100%; height: 100%;">

Jouni Koivuviita
1 decade ago Dec 22, 2009 1:01pm

Percentage heights won't work unless each and every parent element has a defined height. In the HTML snippet you provided, there are two DIV elements that don't have a specified height, hence your _OpenLayers_ViewPort 100% height results in 0 height.

You either need to specify a fixed height for your portlet, and set all of your Vaadin layouts/components to 100% height, or set a fixed height to the OpenLayers component.

Joonas Lehtinen
1 decade ago Dec 22, 2009 1:04pm

Pertti Ylijukuri: How I can do full size where width and height is 100%. This work fine in normal application, but not inside portlet.
After I set pixels portlet work fine. Without this I can't get work liferay freeform layout. s

What would 100% height mean? 100% of what? I there is no size reference at all, 100% of 0px is 0px - which is quite confusing...

With portlets, you might want to consider leaving the height undefined. This way the height will be calculated from the contents of your application.

Pertti Ylijukuri
1 decade ago Dec 22, 2009 9:00pm
Jouni Koivuviita
1 decade ago Dec 22, 2009 9:08pm
Pertti Ylijukuri
1 decade ago Dec 23, 2009 9:17am
Marks Hohlovs
9 years ago Nov 29, 2013 3:28pm
Henri Sara
9 years ago Nov 30, 2013 7:46am