Cheat Sheet

26 downloads 831 Views 528KB Size Report
v-button. CheckBox v-checkbox. TextField v-textfield. RichTextArea .... Use a HTML template having
For Vaadin 6.7

Cheat Sheet Website: vaadin.com

Server-Side Components Legend

Viewer Editor

IndexedContainer

Bean

Item

PropertysetItem ObjectProperty

Property

Object

ValueChangeEvent

setValue() getValue()

BeanContainer

ValueChangeListener

BeanItemContainer

valueChange()

Event v-container

Listener

addStyleName/Listener() setCaption/Icon() setEnabled/Visible() getParent(), attach/detach()

Vali/> location tags with the CustomLayout component. Add components by their location tag: CustomLayout layout = new CustomLayout("mylayout"); layout.addComponent(new Button("Hello"), "hello");

@ClientWidget(VMyWidget.class) *) Must implement changeVariables() for deserialization and paintContent() for serialization using the PaintTarget interface.

Widget Project

(See the Color Picker demo)

Hello, World! public class MyApp extends com.vaadin.Application { public void init() { Window main = new Window("Hello Window"); setMainWindow(main); main.setTheme("mytheme"); // Optional

}

}

Label label = new Label("Hello, World!"); main.addComponent(label);