本文整理汇总了Java中com.vaadin.data.util.PropertysetItem.addItemProperty方法的典型用法代码示例。如果您正苦于以下问题:Java PropertysetItem.addItemProperty方法的具体用法?Java PropertysetItem.addItemProperty怎么用?Java PropertysetItem.addItemProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.data.util.PropertysetItem
的用法示例。
在下文中一共展示了PropertysetItem.addItemProperty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reset
import com.vaadin.data.util.PropertysetItem; //导入方法依赖的package包/类
/**
* Reset data.
*/
public void reset() {
customer = new Customer();
final CompositeItem compositeItem = new CompositeItem();
final PropertysetItem defaultItem = (PropertysetItem) compositeItem.getItem(CompositeItem.DEFAULT_ITEM_KEY);
originalPasswordProperty.setValue("");
verifiedPasswordProperty.setValue("");
defaultItem.addItemProperty("password1", originalPasswordProperty);
defaultItem.addItemProperty("password2", verifiedPasswordProperty);
final BeanItem<Customer> customerItem = new BeanItem<Customer>(customer);
compositeItem.addItem("customer", customerItem);
originalPasswordProperty.setValue(null);
verifiedPasswordProperty.setValue(null);
editor.setItem(compositeItem, true);
}
示例2: reset
import com.vaadin.data.util.PropertysetItem; //导入方法依赖的package包/类
/**
* Reset data.
*/
public void reset() {
final PropertysetItem item = new PropertysetItem();
pinProperty.setValue(Integer.toString((int) ((Math.random() + 1) / 2 * 9999)));
item.addItemProperty("pin", pinProperty);
emailAddressProperty.setValue("");
item.addItemProperty("emailAddress", emailAddressProperty);
editor.setItem(item, true);
}
示例3: reset
import com.vaadin.data.util.PropertysetItem; //导入方法依赖的package包/类
private PropertysetItem reset() {
final PropertysetItem item = new PropertysetItem();
item.addItemProperty("pin", pinProperty);
item.addItemProperty("password", passwordProperty);
editor.setItem(item, true);
return item;
}
示例4: AddForm
import com.vaadin.data.util.PropertysetItem; //导入方法依赖的package包/类
private AddForm(String type, String addText,
Validator... nameValidators) {
PropertysetItem item = new PropertysetItem();
item.addItemProperty("type", new ObjectProperty<String>(type));
addItemProperties(item);
name.setRequired(true);
addComponent(name);
final FieldGroup binder = new FieldGroup(item);
binder.bindMemberFields(this);
Button b = new Button(addText);
b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
try {
binder.commit();
addToProject(binder.getItemDataSource());
} catch (CommitException e) {
}
}
});
addComponent(b);
for (Validator v : nameValidators) {
name.addValidator(v);
}
}
示例5: addItemProperties
import com.vaadin.data.util.PropertysetItem; //导入方法依赖的package包/类
protected void addItemProperties(PropertysetItem item) {
item.addItemProperty("name", new ObjectProperty<String>(""));
}