注:我从字面上才开始在上周调查V7,所以我的回应谨慎...
这两个问题从事实干FormLayout从不提供页眉和页脚--Form类没有提供。
我会建议创建您自己的具有标题布局,FormLayout和页脚布局例如Form的等价物。 (没试过使用,可能需要使用一个网格布局,而不是为VerticalLayout的mainLaout)
public class FormComponent extends CustomComponent {
private Layout mainLayout;
protected Layout header;
protected Layout central;
protected Layout footer;
public FormComponent() {
init(new HorizontalLayout(), new FormLayout(), new HorizontalLayout());
}
protected void init(Layout header, Layout central, Layout footer) {
this.footer = footer;
this.header = header;
this.central = central;
mainLayout = new VerticalLayout();
mainLayout.addComponent(header);
mainLayout.addComponent(central);
mainLayout.addComponent(footer);
setCompositionRoot(mainLayout);
setSizeUndefined();
}
public Layout getHeader() {
return header;
}
public Layout getCentral() {
return central;
}
public Layout getFooter() {
return footer;
}
}
谢谢。我已经这样教了一些东西,但希望有一个内置的解决方案。如果实际上没有任何东西,我会再等一等,并接受你的回答。 – raffael 2013-04-09 10:16:17