Hi Udo,
It may be a possible solution for most cases. Thanks a lot.
Also it's interesting whether Tobago is going to do something to auto resize
controls to prevent scrolls in large sheets.
Tell me if you know something about plans.
Thanks,
Olexandr.
-Original Message-
From: Udo Schnurpfeil [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 25, 2006 10:37 PM
To: MyFaces Discussion
Subject: Re: t:sheet autostretching
Hi Olexandr,
do you have a width and height in the tc:page tag?
You may set it in almost all cases. (this might be required)
The LayoutManager computes in the moment only fix sizes.
If you want your application to autoresize to the browser-window
you have to define the page like this:
tc:page
id=page state=#{layout}
width=#{layout.width} height=#{layout.height}
and define a managed bean like this (in faces-config.xml):
managed-bean
managed-bean-namelayout/managed-bean-name
managed-bean-classmypackage.Layout/managed-bean-class
managed-bean-scopesession/managed-bean-scope
managed-property
property-namewidth/property-name
property-classint/property-class
value1000/value
/managed-property
managed-property
property-nameheight/property-name
property-classint/property-class
value600/value
/managed-property
/managed-bean
with a class Layout like
package mypackage;
import org.apache.myfaces.tobago.model.PageStateImpl;
public class Layout extends PageStateImpl {
private int width;
private int height;
public int getWidth() {
if (getClientWidth() != 0) {
return getClientWidth();
}
return width;
}
public void setWidth(int width) {
this.width = width;
}
public int getHeight() {
if (getClientHeight() != 0) {
return getClientHeight();
}
return height;
}
public void setHeight(int height) {
this.height = height;
}
}
there is one disadvantage in the moment. The resizing is will take
effect after the next server-request.
Hope that helps.
Udo
Olexandr Zakordonskyy schrieb:
Hi.
Look at the example:
t:panel
t:sheet columns=25px;1*;90px;80px;80px;50px;80px
forceVerticalScrollbar=false showHeader=true
.
The sheet is hiding.
When is set the width and height in pixels:
t:panel width=800 height=800
t:sheet columns=25px;1*;90px;80px;80px;50px;80px
forceVerticalScrollbar=false showHeader=true
It works fine.
But I need the sheet to autoresize to 100% to do not use scrolls.
What you may advise in this situation?
Thanks,
Olexandr.