本文整理汇总了Java中com.vaadin.data.util.PropertysetItem类的典型用法代码示例。如果您正苦于以下问题:Java PropertysetItem类的具体用法?Java PropertysetItem怎么用?Java PropertysetItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PropertysetItem类属于com.vaadin.data.util包,在下文中一共展示了PropertysetItem类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: testIntGt
import com.vaadin.data.util.PropertysetItem; //导入依赖的package包/类
@Test
public void testIntGt() {
Container.Filter expected = new Compare.Greater(INT_PROPID, 100);
Container.Filter filter = filterFactory.createFilter(int.class, INT_PROPID, ">100");
assertEquals(expected, filter);
Item target = new PropertysetItem();
target.addItemProperty(INT_PROPID, new ObjectProperty(110));
assertTrue(filter.passesFilter(0, target));
target.getItemProperty(INT_PROPID).setValue(90);
assertFalse(filter.passesFilter(0, target));
}
示例3: 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);
}
示例4: 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;
}
示例5: 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);
}
}
示例6: addItemProperties
import com.vaadin.data.util.PropertysetItem; //导入依赖的package包/类
protected void addItemProperties(PropertysetItem item) {
item.addItemProperty("name", new ObjectProperty<String>(""));
}