public CustomerParams getCustomerParams() {
CustomerParams cp = new CustomerParams();
cp.addCustomerParam("include", chbxContainLower.isSelected() + "");
cp.addCustomerParam("year", spnrYear.getValue().toString());
cp.addCustomerParam("month", cmbxMonth.getSelectedItem().toString());
return cp;
}
在getCustomerParams()方法中只能用字符串
public void setCustomerParams(CustomerParams cp) {
initUIContentData();
if (cp.getCustomerParam("include") != null) {
chbxContainLower.setSelected(Boolean.valueOf(
cp.getCustomerParam("include").toString()).booleanValue());
}
if (cp.getCustomerParam("year") != null) {
spnrYear.setValue(new Integer(cp.getCustomerParam("year").toString()));
}
if (cp.getCustomerParam("month") != null) {
cmbxMonth.setSelectedItem(new Integer(cp.getCustomerParam("month").toString()));
}
}
clear()方法中是用来在切换到默认方案中的时候清空处理
public void clear() {
bizOrgUnit.setValue(null);
chbxContainLower.setSelected(false);
initUIContentData();
}