|
|
|
@ -645,6 +645,7 @@ public class NewCodeItemDialog extends Dialog {
|
|
|
|
|
* 新建的 UI 组件-Label放在objPropComposite下,内容组件根据类型创建后放在
|
|
|
|
|
*/
|
|
|
|
|
public void addGeneralPropComosite() {
|
|
|
|
|
boolean isDocType = false;//当前属性名称是否为文档类型?
|
|
|
|
|
for (int i = 0; i < generalPropLabelList.size(); i++) {
|
|
|
|
|
Label label = generalPropLabelList.get(i);
|
|
|
|
|
Widget text = generalPropTextList.get(i);
|
|
|
|
@ -656,19 +657,37 @@ public class NewCodeItemDialog extends Dialog {
|
|
|
|
|
|
|
|
|
|
if (this.cnpropList != null) {
|
|
|
|
|
for (CNProperty cnProp : this.cnpropList) {
|
|
|
|
|
//20250425新增 将最左侧选中的编码规则名称写入到最右侧的文档类别中
|
|
|
|
|
Stirng currentPropName = cnProp.getDisplayName();//当前遍历的对象or分类属性名称
|
|
|
|
|
System.out.println("当前创建的UI组件Label名称="+currentPropName);
|
|
|
|
|
if(currentPropName != null && currentPropName.equals("文档类别") && leftMostCodeRuleNameString != null && !leftMostCodeRuleNameString.equals("")){
|
|
|
|
|
System.out.println("“文档类别”匹配成功!属性值设置为最左侧选中编码名称="+leftMostCodeRuleNameString);
|
|
|
|
|
// widget.setText(leftMostCodeRuleNameString);
|
|
|
|
|
isDocType = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Label label = CreateCompositeUtil.createNewLabel(objPropComposite,
|
|
|
|
|
cnProp.getIsMust() ? (cnProp.getDisplayName() + "(±ØÌî)") : cnProp.getDisplayName());
|
|
|
|
|
cnProp.getIsMust() ? (currentPropName + "(必填)") : currentPropName);
|
|
|
|
|
generalPropLabelList.add(label);
|
|
|
|
|
Widget widget = null;
|
|
|
|
|
if (!cnProp.getIsLov()) {
|
|
|
|
|
if (cnProp.getPropertyType().toUpperCase().equals("STRING")) {
|
|
|
|
|
final Text text = CreateCompositeUtil.createNewText(objPropComposite, cnProp.getDefaultValue());
|
|
|
|
|
text.setText(cnProp.getDefaultValue());
|
|
|
|
|
// text.setText(cnProp.getDefaultValue());
|
|
|
|
|
if (isDocType){
|
|
|
|
|
text.setText(leftMostCodeRuleNameString);
|
|
|
|
|
}else {
|
|
|
|
|
text.setText(cnProp.getDefaultValue());
|
|
|
|
|
}
|
|
|
|
|
widget = text;
|
|
|
|
|
} else if (cnProp.getPropertyType().toUpperCase().equals("INTEGER")) {
|
|
|
|
|
final Text text = CreateCompositeUtil.createNewText(objPropComposite, cnProp.getDefaultValue());
|
|
|
|
|
text.setText("0");
|
|
|
|
|
// text.setText("0");
|
|
|
|
|
if (isDocType){
|
|
|
|
|
text.setText(leftMostCodeRuleNameString);
|
|
|
|
|
}else {
|
|
|
|
|
text.setText("0");
|
|
|
|
|
}
|
|
|
|
|
widget = text;
|
|
|
|
|
text.addVerifyListener(new VerifyListener() {
|
|
|
|
|
@Override
|
|
|
|
@ -679,7 +698,12 @@ public class NewCodeItemDialog extends Dialog {
|
|
|
|
|
});
|
|
|
|
|
} else if (cnProp.getPropertyType().toUpperCase().equals("DOUBLE")) {
|
|
|
|
|
final Text text = CreateCompositeUtil.createNewText(objPropComposite, cnProp.getDefaultValue());
|
|
|
|
|
text.setText("0");
|
|
|
|
|
// text.setText("0");
|
|
|
|
|
if (isDocType){
|
|
|
|
|
text.setText(leftMostCodeRuleNameString);
|
|
|
|
|
}else {
|
|
|
|
|
text.setText("0");
|
|
|
|
|
}
|
|
|
|
|
widget = text;
|
|
|
|
|
text.addVerifyListener(new VerifyListener() {
|
|
|
|
|
@Override
|
|
|
|
@ -698,6 +722,11 @@ public class NewCodeItemDialog extends Dialog {
|
|
|
|
|
final Combo comb = CreateCompositeUtil.createNotFillNewCombo(objPropComposite,
|
|
|
|
|
new String[] { "true", "false" }); // new
|
|
|
|
|
comb.setText(cnProp.getDefaultValue()); // Combo(propTable,
|
|
|
|
|
if (isDocType){
|
|
|
|
|
comb.setText(leftMostCodeRuleNameString);
|
|
|
|
|
}else {
|
|
|
|
|
comb.setText(cnProp.getDefaultValue());
|
|
|
|
|
}
|
|
|
|
|
widget = comb; // SWT.NONE);
|
|
|
|
|
}
|
|
|
|
|
} else {// lovBeanList
|
|
|
|
@ -769,6 +798,7 @@ public class NewCodeItemDialog extends Dialog {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
generalPropTextList.add(widget);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|