Files
eip4-platform/tools/s3_rewriter/output/rewritten/4230b669-a107-4ffb-9aae-e814560d8c6e/6.HARD.groovy
zhengwr a711ecd8f0 F2-4(一): 修 XML 实体污染并重批重入库,固化标准入库器
- run_eval: PG xpath(...)::text 保留实体转义(< → &lt;),抽取后补 XML 预定义实体反转义
  (等价手册 §5.3 dom4j getText() 语义);293 个污染产物清零,Groovy 编译失败根因消除
- 缓存重建(源=eip4dev,1428 条:1 模板改名+1 新增脚本属数据演进);全量重跑
  497/30/86/815,自动化率 81.1% 守住 ≥80%
- 重大发现:同模板内脚本顺序在两次抽取间会交换((templateId,seq) 非稳定键,
  welfare 模板 seq1↔seq2 实锤)——重批后 onEvent seq 已与磁盘对齐,长期需内容哈希键(登记 F2-4)
- tools/page-schema-loader/load_page_schema.py:幂等标准入库器(etag=sha256,version 递增,
  仅允许 localhost 双库);本次双库各更新 756/幂等跳过 733,e2e 28/28 保持全绿
- 坑:mvn exec:java 的 -Dexec.args 引号空参会被吞导致参数错位(密码用占位符代替空串)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 21:27:38 +08:00

567 lines
23 KiB
Groovy
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// === EIP4 P4 脚本迁移产出 ===
// template_id : 4230b669-a107-4ffb-9aae-e814560d8c6e
// template_name: 员工档案(带证书)
// seq : 6
// label : HARD
// 硬 S3 原因 : 动态创建 Vaadin 组件; UI.getCurrent()
// 处置 : 原文保留,进人工排期(amis dialog/service 重写)
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.UI;
import com.vaadin.ui.AbstractField;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Notification;
import com.vaadin.ui.Notification.Type;
import com.vaadin.ui.Window;
import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.data.Property.ValueChangeEvent;
import com.dsasp.server.common.viewframework.service.PageTemplateService;
import com.dsasp.server.common.core.service.SpringBeanOsgiServices;
import com.dsasp.client.viewframework.listener.ConfirmDialogListener;
final abccards = group.getField("ABCCARDS");
final Button abcupdatebut = new Button("修改");
final Button abcshowbut = new Button("查看");
final Object abctable = abccards?.table;
abctable?.setImmediate(true);
final Window abceditWindow = abccards?.editWindow;
final FieldGroup abcfieldGroup = abccards?.fieldGroup;
final Button abcsaveButton = abccards?.saveButton;
final Button abcsaveContinueButton = abccards?.saveContinueButton;
final Button jzsupdatebut = new Button("修改");
final Button jzsshowbut = new Button("查看");
final jzscards = group.getField("JZSCARDS");
final Object jzstable = jzscards?.table;
jzstable?.setImmediate(true);
final Window jzseditWindow = jzscards?.editWindow;
final FieldGroup jzsfieldGroup = jzscards?.fieldGroup;
final Button jzssaveButton = jzscards?.saveButton;
final Button jzssaveContinueButton = jzscards?.saveContinueButton;
final Button zcupdatebut = new Button("修改");
final Button zcshowbut = new Button("查看");
final zccards = group.getField("ZCCARDS");
final Object zctable = zccards?.table;
zctable?.setImmediate(true);
final Window zceditWindow = zccards?.editWindow;
final FieldGroup zcfieldGroup = zccards?.fieldGroup;
final Button zcsaveButton = zccards?.saveButton;
final Button zcsaveContinueButton = zccards?.saveContinueButton;
final Button jsgrupdatebut = new Button("修改");
final Button jsgrshowbut = new Button("查看");
final jsgrcards = group.getField("JSGRCARDS");
final Object jsgrtable = jsgrcards?.table;
jsgrtable?.setImmediate(true);
final Window jsgreditWindow = jsgrcards?.editWindow;
final FieldGroup jsgrfieldGroup = jsgrcards?.fieldGroup;
final Button jsgrsaveButton = jsgrcards?.saveButton;
final Button jsgrsaveContinueButton = jsgrcards?.saveContinueButton;
final Button mupdatebut = new Button("修改");
final Button mshowbut = new Button("查看");
final mcards = group.getField("MCARDS");
final Object mtable = mcards?.table;
mtable?.setImmediate(true);
final Window meditWindow = mcards?.editWindow;
final FieldGroup mfieldGroup = mcards?.fieldGroup;
final Button msaveButton = mcards?.saveButton;
final Button msaveContinueButton = mcards?.saveContinueButton;
final Button otherupdatebut = new Button("修改");
final Button othershowbut = new Button("查看");
final othercards = group.getField("OTHERCARDS");
final Object othertable = othercards?.table;
othertable?.setImmediate(true);
final Window othereditWindow = othercards?.editWindow;
final FieldGroup otherfieldGroup = othercards?.fieldGroup;
final Button othersaveButton = othercards?.saveButton;
final Button othersaveContinueButton = othercards?.saveContinueButton;
//ABC修改
abcupdatebut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = abctable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = abccards?.getSelectValue("HR_SAFETYCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_SAFETYCARD",true);
abceditWindow.setCaption(abcupdatebut.getCaption());
UI.getCurrent().addWindow(abceditWindow);
abcfieldGroup.setReadOnly(false);
//窗体赋值
for(Field f : abcfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(abcfieldGroup.getPropertyId(f)));
abcfieldGroup.getItemDataSource().getItemProperty(abcfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(abcfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
abcsaveContinueButton.setVisible(false);
}
});
//ABC查看
abcshowbut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = abctable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = abccards?.getSelectValue("HR_SAFETYCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_SAFETYCARD",true);
abceditWindow.setCaption(abcshowbut.getCaption());
UI.getCurrent().addWindow(abceditWindow);
//窗体赋值
for(Field f : abcfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(abcfieldGroup.getPropertyId(f)));
abcfieldGroup.getItemDataSource().getItemProperty(abcfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(abcfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
abcfieldGroup.setReadOnly(true);
abcsaveButton.setVisible(false);
abcsaveContinueButton.setVisible(false);
}
});
abccards?.addButton(abcupdatebut,"update.png",2);
abccards?.addButton(abcshowbut,"ckobu.png",4);
abcupdatebut.setVisible(abccards?.getModifyButton().isVisible());
abccards?.showModifyButton(false);
abccards?.getDetailButton().setVisible(false);
//建造师修改
jzsupdatebut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = jzstable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = jzscards?.getSelectValue("HR_CONSTRUCTORCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_CONSTRUCTORCARD",true);
jzseditWindow.setCaption(jzsupdatebut.getCaption());
UI.getCurrent().addWindow(jzseditWindow);
jzsfieldGroup.setReadOnly(false);
//窗体赋值
for(Field f : jzsfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
if(jzsfieldGroup.getPropertyId(f).equals("PROFESSIONALS")){
def list = pojo.get_Value(jzsfieldGroup.getPropertyId(f));
def newlist=[];
if(list!=null && list.size()>0){
list.each{
def submap = it.toMap();
newlist.add(submap);
}
}
((AbstractField)f).setConvertedValue(newlist);
jzsfieldGroup.getItemDataSource().getItemProperty(jzsfieldGroup.getPropertyId(f)).setValue(newlist);
}else{
((AbstractField)f).setConvertedValue(pojo.get_Value(jzsfieldGroup.getPropertyId(f)));
jzsfieldGroup.getItemDataSource().getItemProperty(jzsfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(jzsfieldGroup.getPropertyId(f)));
}
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
jzssaveContinueButton.setVisible(false);
}
});
//建造师查看
jzsshowbut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = jzstable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = jzscards?.getSelectValue("HR_CONSTRUCTORCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_CONSTRUCTORCARD",true);
jzseditWindow.setCaption(jzsshowbut.getCaption());
UI.getCurrent().addWindow(jzseditWindow);
//窗体赋值
for(Field f : jzsfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
if(jzsfieldGroup.getPropertyId(f).equals("PROFESSIONALS")){
def list = pojo.get_Value(jzsfieldGroup.getPropertyId(f));
def newlist=[];
if(list!=null && list.size()>0){
list.each{
def submap = it.toMap();
newlist.add(submap);
}
}
((AbstractField)f).setConvertedValue(newlist);
jzsfieldGroup.getItemDataSource().getItemProperty(jzsfieldGroup.getPropertyId(f)).setValue(newlist);
}else{
((AbstractField)f).setConvertedValue(pojo.get_Value(jzsfieldGroup.getPropertyId(f)));
jzsfieldGroup.getItemDataSource().getItemProperty(jzsfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(jzsfieldGroup.getPropertyId(f)));
}
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
jzsfieldGroup.setReadOnly(true);
jzssaveButton.setVisible(false);
jzssaveContinueButton.setVisible(false);
}
});
jzscards?.addButton(jzsupdatebut,"update.png",2);
jzscards?.addButton(jzsshowbut,"ckobu.png",4);
jzsupdatebut.setVisible(jzscards?.getModifyButton().isVisible());
jzscards?.showModifyButton(false);
jzscards?.getDetailButton().setVisible(false);
//职称修改
zcupdatebut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = zctable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = zccards?.getSelectValue("HR_POSITIONALTITLES_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_POSITIONALTITLES",true);
zceditWindow.setCaption(zcupdatebut.getCaption());
UI.getCurrent().addWindow(zceditWindow);
zcfieldGroup.setReadOnly(false);
//窗体赋值
for(Field f : zcfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(zcfieldGroup.getPropertyId(f)));
zcfieldGroup.getItemDataSource().getItemProperty(zcfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(zcfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
zcsaveContinueButton.setVisible(false);
}
});
//职称修改
zcshowbut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = zctable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = zccards?.getSelectValue("HR_POSITIONALTITLES_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_POSITIONALTITLES",true);
zceditWindow.setCaption(zcshowbut.getCaption());
UI.getCurrent().addWindow(zceditWindow);
//窗体赋值
for(Field f : zcfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(zcfieldGroup.getPropertyId(f)));
zcfieldGroup.getItemDataSource().getItemProperty(zcfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(zcfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
zcfieldGroup.setReadOnly(true);
zcsaveButton.setVisible(false);
zcsaveContinueButton.setVisible(false);
}
});
zccards?.addButton(zcupdatebut,"update.png",2);
zccards?.addButton(zcshowbut,"ckobu.png",4);
zcupdatebut.setVisible(zccards?.getModifyButton().isVisible());
zccards?.showModifyButton(false);
zccards?.getDetailButton().setVisible(false);
//技术工人修改
jsgrupdatebut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = jsgrtable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = jsgrcards?.getSelectValue("HR_WORKERSCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_WORKERSCARD",true);
jsgreditWindow.setCaption(jsgrupdatebut.getCaption());
UI.getCurrent().addWindow(jsgreditWindow);
jsgrfieldGroup.setReadOnly(false);
//窗体赋值
for(Field f : jsgrfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(jsgrfieldGroup.getPropertyId(f)));
jsgrfieldGroup.getItemDataSource().getItemProperty(jsgrfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(jsgrfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
jsgrsaveContinueButton.setVisible(false);
}
});
//
jsgrshowbut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = jsgrtable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = jsgrcards?.getSelectValue("HR_WORKERSCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_WORKERSCARD",true);
jsgreditWindow.setCaption(jsgrshowbut.getCaption());
UI.getCurrent().addWindow(jsgreditWindow);
//窗体赋值
for(Field f : jsgrfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(jsgrfieldGroup.getPropertyId(f)));
jsgrfieldGroup.getItemDataSource().getItemProperty(jsgrfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(jsgrfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
jsgrfieldGroup.setReadOnly(true);
jsgrsaveButton.setVisible(false);
jsgrsaveContinueButton.setVisible(false);
}
});
jsgrcards?.addButton(jsgrupdatebut,"update.png",2);
jsgrcards?.addButton(jsgrshowbut,"ckobu.png",4);
jsgrupdatebut.setVisible(jsgrcards?.getModifyButton().isVisible());
jsgrcards?.showModifyButton(false);
jsgrcards?.getDetailButton().setVisible(false);
//十大员修改
mupdatebut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = mtable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = mcards?.getSelectValue("HR_MEMBERCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_MEMBERCARD",true);
meditWindow.setCaption(mupdatebut.getCaption());
UI.getCurrent().addWindow(meditWindow);
mfieldGroup.setReadOnly(false);
//窗体赋值
for(Field f : mfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(mfieldGroup.getPropertyId(f)));
mfieldGroup.getItemDataSource().getItemProperty(mfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(mfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
msaveContinueButton.setVisible(false);
}
});
//
mshowbut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = mtable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = mcards?.getSelectValue("HR_MEMBERCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_MEMBERCARD",true);
meditWindow.setCaption(mshowbut.getCaption());
UI.getCurrent().addWindow(meditWindow);
//窗体赋值
for(Field f : mfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(mfieldGroup.getPropertyId(f)));
mfieldGroup.getItemDataSource().getItemProperty(mfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(mfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
mfieldGroup.setReadOnly(true);
msaveButton.setVisible(false);
msaveContinueButton.setVisible(false);
}
});
mcards?.addButton(mupdatebut,"update.png",2);
mcards?.addButton(mshowbut,"ckobu.png",4);
mupdatebut.setVisible(mcards?.getModifyButton().isVisible());
mcards?.showModifyButton(false);
mcards?.getDetailButton().setVisible(false);
//其他证书修改
otherupdatebut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = othertable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = othercards?.getSelectValue("HR_OTHERCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_OTHERCARD",true);
othereditWindow.setCaption(otherupdatebut.getCaption());
UI.getCurrent().addWindow(othereditWindow);
otherfieldGroup.setReadOnly(false);
//窗体赋值
for(Field f : otherfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(otherfieldGroup.getPropertyId(f)));
otherfieldGroup.getItemDataSource().getItemProperty(otherfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(otherfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
othersaveContinueButton.setVisible(false);
}
});
//
othershowbut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = othertable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = othercards?.getSelectValue("HR_OTHERCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_OTHERCARD",true);
othereditWindow.setCaption(othershowbut.getCaption());
UI.getCurrent().addWindow(othereditWindow);
//窗体赋值
for(Field f : otherfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(otherfieldGroup.getPropertyId(f)));
otherfieldGroup.getItemDataSource().getItemProperty(otherfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(otherfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
otherfieldGroup.setReadOnly(true);
othersaveButton.setVisible(false);
othersaveContinueButton.setVisible(false);
}
});
othercards?.addButton(otherupdatebut,"update.png",2);
othercards?.addButton(othershowbut,"ckobu.png",4);
otherupdatebut.setVisible(othercards?.getModifyButton().isVisible());
othercards?.showModifyButton(false);
othercards?.getDetailButton().setVisible(false);