UI Composite not rendering in Application

Hi,

After much trouble with XUL Runner etc, I have a vaadin sample project up and running in Tomcat 7 with java 7
The problem I have now is that when i create a composite and add it to a UI page it does not appear in thebrowser when running the app

ReportUI page

[code]
package com.example.standalonereport;

import javax.servlet.annotation.WebServlet;

import com.vaadin.annotations.Theme;
import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;

@SuppressWarnings(“serial”)
@Theme(“standalonereport”)
public class ReportUI extends UI {

com.example.standalonereport.SupplierAccountsExtract page1 = new com.example.standalonereport.SupplierAccountsExtract();

@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = ReportUI.class)
public static class Servlet extends VaadinServlet {
}

@Override
protected void init(VaadinRequest request) {
    final VerticalLayout layout = new VerticalLayout();
    layout.setMargin(true);
    setContent(layout);

    Button button = new Button("Hello 1");
    button.addClickListener(new Button.ClickListener() {
        public void buttonClick(ClickEvent event) {
            layout.addComponent(new Label("Thank you for clicking"));
        }
    });
    layout.addComponent(button);                
    layout.addComponent(page1);
}

}
[/code]Composite

[code]
package com.example.standalonereport;

import com.vaadin.annotations.AutoGenerated;
import com.vaadin.ui.AbsoluteLayout;
import com.vaadin.ui.Button;
import com.vaadin.ui.CustomComponent;

public class SupplierAccountsExtract extends CustomComponent {

/*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */

@AutoGenerated
private AbsoluteLayout mainLayout;
@AutoGenerated
private AbsoluteLayout absoluteLayout_2;
@AutoGenerated
private Button button_2;
/**
 * The constructor should first build the main layout, set the
 * composition root and then do any custom initialization.
 *
 * The constructor will not be automatically regenerated by the
 * visual editor.
 */
public SupplierAccountsExtract() {
    buildMainLayout();
    setCompositionRoot(mainLayout);
}

@AutoGenerated
private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);
    mainLayout.setWidth("100%");
    mainLayout.setHeight("100%");
    
    // top-level component properties
    setWidth("100.0%");
    setHeight("100.0%");
    
    // absoluteLayout_2
    absoluteLayout_2 = buildAbsoluteLayout_2();
    mainLayout.addComponent(absoluteLayout_2, "top:50.0px;left:60.0px;");
    
    return mainLayout;
}

@AutoGenerated
private AbsoluteLayout buildAbsoluteLayout_2() {
    // common part: create layout
    absoluteLayout_2 = new AbsoluteLayout();
    absoluteLayout_2.setImmediate(false);
    absoluteLayout_2.setWidth("330px");
    absoluteLayout_2.setHeight("350px");
    
    // button_2
    button_2 = new Button();
    button_2.setCaption("Button");
    button_2.setImmediate(false);
    button_2.setWidth("-1px");
    button_2.setHeight("-1px");
    absoluteLayout_2.addComponent(button_2, "top:64.0px;left:60.0px;");
    
    return absoluteLayout_2;
}

}
[/code]What am i doing incorrectly - any ideas?

Thanks

This is a common issue when working with Visual Designer custom components. Your custom component (page1) has a 100% size and you are adding it to a layout (VerticalLayout) without a size. To solve it you can either a) set a pixel size for you custom component or b) set your vertical layout to 100%.

Thanks that was exactly the issue now im battling with spring integration…