I’m wrapping a javascript component in vaadin7. I looked around and I’ve seen there are two annotations (@StyleSheet and @JavaScript) used to load both css and js files used by the component.
What if i need to load images ? I searched but I haven’t found anything.
I also noticed that the loading of css and js files are really slow. Is there another way to add css or js files ?
(We are using vaadin 7.0.3)
I have another question. This js component is basically a table done in javascript and I’m adding it as a normal component in the layout:
public class SampleUI extends UI {
@Override
protected void init(VaadinRequest request) {
final VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
final JSTable js = new JSTable();
js.setWidth("600px");
js.setHeight("500px");
Button button = new Button("Click Me");
layout.addComponent(button);
layout.addComponent(js);
layout.setSizeFull();
setSizeFull();
setContent(layout);
}
}
Is it correct this approach ? I’m having some difficulties to see the component because the top div element of page has 0px of height. If i remove the component the top div element has the correct height (equal to the available space in the browser).