1
的組合框我有具有客戶爲布爾的性別價值POJO。我必須以數據源爲客戶類型的形式創建組合框。 如何使組合框有「男」和將被綁定到布爾值「女」的選擇。綁定布爾值在Vaadin
謝謝。 表格代號:
Form customerForm= new BeanValidationForm<Customer>(Customer.class);
客戶POJO:
public class Customer implements Serializable {
public static final String QUERY_ALL = "Customer.queryAll";
public static final String QUERY_BY_ID = "Customer.queryById";
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Column(length = 50, nullable = false)
private String name;
@Column(length = 50, nullable = false)
private String surname;
@Column(nullable = false)
private Boolean gender;
//getters and setters....
}
看一看:https://vaadin.com/book/-/page/components.selecting.html你的要求有描述。你必須添加你的物品(真,假),然後添加一個itemDescription。 – zip 2012-08-06 14:13:50