public void doFields(SimpleFormBuilder form, int colCount, String[] names) {
int col = 0;
Row row = null;
for (String name : names) {
PropertyDescriptor p = BeanUtils.getProperty(getBeanInfo(), name);
if (p == null) {
log.log(Level.WARNING, "Unable to find property {0}", name);
continue;
}
else if (List.class.isAssignableFrom(p.getPropertyType())) {
addListFor(p);
}
else if (p.getReadMethod().isAnnotationPresent(Lob.class)) {
TextArea area = new TextArea();
area.setPrefRowCount(10);
addRight(BeanUtils.getDisplayName(p), area);
addToNamespace(p.getName(), area);
}
else {
if (row == null) {
row = form.row();
col = 0;
}
row.apply(r -> addFieldFor(r, p));
col ++;
if (col >= colCount) {
row.end();
row = null;
}
}
}
if (row != null) {
row.end();
}
}
MyWMSForm.java 文件源码
java
阅读 34
收藏 0
点赞 0
评论 0
项目:myWMS
作者:
评论列表
文章目录