^1640696296609
@
sname
DataObjectGridRowEditor
slabel
DataObjectGridRowEditor
sdescriptors
xworker.swt.widgets.Display
sth_createIndex
false
  @/@shell
  sname
  shell
  stext
  编辑
  sstyle
  APPLICATION_MODAL
  sNO_TRIM
  false
  sCLOSE
  true
  sTITLE
  true
  sMIN
  false
  sMAX
  false
  sBORDER
  false
  sRESIZE
  true
  sON_TOP
  false
  sTOOL
  false
  sNO_FOCUS
  false
  swidth
  -1
  sheight
  -1
  scenterScreen
  true
  spack
  false
  smaximized
  false
  sfullScreen
  false
  sH_SCROLL
  false
  sV_SCROLL
  false
  sNO_BACKGROUND
  false
  sNO_MERGE_PAINTS
  false
  sNO_REDRAW_RESIZE
  false
  sNO_RADIO_GROUP
  false
  sEMBEDDED
  false
  sDOUBLE_BUFFERED
  false
  scapture
  false
  senabled
  true
  sredraw
  true
  svisible
  true
  sdescriptors
  xworker.swt.widgets.Display/@Shell
  sid
  shell
    @/@shell/@shellGridLayout
    sname
    shellGridLayout
    smakeColumnsEqualWidth
    false
    smarginWidth
    5
    smarginHeight
    5
    smarginLeft
    0
    smarginTop
    0
    smarginRight
    0
    smarginBottom
    0
    shorizontalSpacing
    5
    sverticalSpacing
    5
    sdescriptors
    xworker.swt.Layouts/@GridLayout
    sid
    shellGridLayout
    @/@shell/@formComposite
    sname
    formComposite
    sBORDER
    false
    sH_SCROLL
    false
    sV_SCROLL
    false
    sNO_BACKGROUND
    false
    sNO_FOCUS
    false
    sNO_MERGE_PAINTS
    false
    sNO_REDRAW_RESIZE
    false
    sNO_RADIO_GROUP
    false
    sEMBEDDED
    false
    sDOUBLE_BUFFERED
    false
    scapture
    false
    senabled
    true
    sredraw
    true
    svisible
    true
    sdescriptors
    xworker.swt.Widgets/@Composite
    sth_createIndex
    false
    sid
    formComposite
      @/@shell/@formComposite/@formCompositeGridDAta
      sname
      formCompositeGridDAta
      sstyle
      FILL_BOTH
      shorizontalIndent
      0
      swidth
      -1
      sheight
      -1
      shorizontalAlignment
      BEGINNING
      sverticalAlignment
      CENTER
      shorizontalSpan
      1
      sverticalSpan
      1
      sgrabExcessHorizontalSpace
      false
      sgrabExcessVerticalSpace
      false
      sdescriptors
      xworker.swt.layout.LayoutDatas/@GridData
      sth_createIndex
      false
      sid
      formCompositeGridDAta
      @/@shell/@formComposite/@formCompoisteFillLayout
      sname
      formCompoisteFillLayout
      stype
      SWT.HORIZONTAL
      sdescriptors
      xworker.swt.Layouts/@FillLayout
      sth_createIndex
      false
      sid
      formCompoisteFillLayout
      @/@shell/@formComposite/@form
      sname
      form
      sformType
      edit
      sdescriptors
      xworker.swt.app.view.swt.Items/@DataObjectForm
      sid
      form
    @/@shell/@2403
    sname
    buttonComposite
    sBORDER
    false
    sH_SCROLL
    false
    sV_SCROLL
    false
    sNO_BACKGROUND
    false
    sNO_FOCUS
    false
    sNO_MERGE_PAINTS
    false
    sNO_REDRAW_RESIZE
    false
    sNO_RADIO_GROUP
    false
    sEMBEDDED
    false
    sDOUBLE_BUFFERED
    false
    scapture
    false
    senabled
    true
    sredraw
    true
    svisible
    true
    sdescriptors
    xworker.swt.Widgets/@Composite
    sid
    2403
      @/@shell/@2403/@2404
      sname
      buttonCompositeGridData
      sstyle
      FILL_HORIZONTAL
      shorizontalIndent
      0
      swidth
      -1
      sheight
      -1
      shorizontalAlignment
      END
      sverticalAlignment
      CENTER
      shorizontalSpan
      1
      sverticalSpan
      1
      sgrabExcessHorizontalSpace
      false
      sgrabExcessVerticalSpace
      false
      sdescriptors
      xworker.swt.layout.LayoutDatas/@GridData
      sid
      2404
      @/@shell/@2403/@2405
      sname
      buttonCompositeRowLayout
      sfill
      false
      sjustify
      false
      smarginWidth
      0
      smarginHeight
      0
      smarginLeft
      3
      smarginTop
      3
      smarginRight
      3
      smarginBottom
      3
      spack
      true
      sspacing
      3
      stype
      SWT.HORIZONTAL
      swrap
      true
      sdescriptors
      xworker.swt.Layouts/@RowLayout
      sid
      2405
      @/@shell/@2403/@2407
      sname
      okButton
      stext
      确定
      stype
      SWT.PUSH
      sflat
      false
      sborder
      false
      sselected
      false
      scapture
      false
      senabled
      true
      sredraw
      true
      svisible
      true
      sdescriptors
      xworker.swt.Widgets/@Button
      sth_createIndex
      false
      sid
      2407
        @/@shell/@2403/@2407/@2408
        sname
        RowData
        sexclude
        false
        swidth
        80
        sheight
        -1
        sdescriptors
        xworker.swt.layout.LayoutDatas/@RowData
        sth_createIndex
        false
        sid
        2408
        @/@shell/@2403/@2407/@918
        sname
        Listeners
        sdescriptors
        xworker.swt.widgets.Widget/@Listeners
        sth_createIndex
        false
        sid
        918
          @/@shell/@2403/@2407/@918/@919
          sname
          okButtonSelection
          stype
          Selection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sth_createIndex
          false
          sid
          919
            @/@shell/@2403/@2407/@918/@919/@920
            sname
            okButtonAction
            sisSynchronized
            false
            sthrowException
            true
            suseOtherAction
            false
            svarScope
            Global
            sdisableGlobalContext
            false
            Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;

if(!form.doAction("validate", actionContext)){
    return;
}

def vs = form.doAction("getValues", actionContext);
def values = form.getData("values");
if(values != null && vs != null){
    for(key in vs.keySet()){
        values.put(key, vs.get(key));
    }
}else{
    values = vs;
}

try{
    def result = null;
	if(actionContext.get("formType") == "create"){
        result = store.doAction("insert", actionContext, ["record":values]);  
    }else{
        result = store.doAction("update", actionContext, ["record":values]);
    }
    
    actionContext.getScope(0).put("result", result);
}catch(Exception e){
    def box = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK);
    box.setText("错误");
    if(e.getCause() != null){
        box.setMessage("保存数据错误，" + e.getCause().getMessage());
    }else{
        box.setMessage("保存数据错误，" + e.getMessage());
    }
    box.open();
    log.error("save data error", e);
    actionContext.getScope(0).put("result", null);
    return;
}

shell.dispose();
#$@text#$@
            sinterpretationType
            Action
            sdescriptors
            xworker.lang.actions.Actions/@GroovyAction
            sth_createIndex
            false
            sid
            920
      @/@shell/@2403/@2409
      sname
      cancelButton
      stext
      取消
      stype
      SWT.PUSH
      sflat
      false
      sborder
      false
      sselected
      false
      scapture
      false
      senabled
      true
      sredraw
      true
      svisible
      true
      sdescriptors
      xworker.swt.Widgets/@Button
      sth_createIndex
      false
      sid
      2409
        @/@shell/@2403/@2409/@2410
        sname
        RowData
        sexclude
        false
        swidth
        80
        sheight
        -1
        sdescriptors
        xworker.swt.layout.LayoutDatas/@RowData
        sth_createIndex
        false
        sid
        2410
        @/@shell/@2403/@2409/@Listeners
        sname
        Listeners
        sdescriptors
        xworker.swt.widgets.Widget/@Listeners
        sth_createIndex
        false
        sid
        Listeners
          @/@shell/@2403/@2409/@Listeners/@cancelButtonSelection
          sname
          cancelButtonSelection
          stype
          Selection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sth_createIndex
          false
          sid
          cancelButtonSelection
            @/@shell/@2403/@2409/@Listeners/@cancelButtonSelection/@GroovyAction
            sname
            GroovyAction
            sisSynchronized
            false
            sthrowException
            true
            suseOtherAction
            false
            svarScope
            Global
            sdisableGlobalContext
            false
            Scode
#$@text#$@
actionContext.getScope(0).put("result", null);
shell.dispose();
#$@text#$@
            sdescriptors
            xworker.lang.actions.Actions/@GroovyAction
            sth_createIndex
            false
            sid
            GroovyAction
    @/@shell/@init
    sname
    init
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    svarScope
    Global
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import xworker.swt.util.SwtUtils;

shell.pack();
SwtUtils.centerShell(shell);
#$@text#$@
    sdescriptors
    xworker.swt.Widgets/@Code
    sth_createIndex
    false
    sid
    init
    @/@shell/@actions
    sname
    actions
    sdescriptors
    xworker.swt.Widgets/@actions
    sth_createIndex
    false
    sid
    actions
      @/@shell/@actions/@setValues
      sname
      setValues
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Global
      sdisableGlobalContext
      false
      Scode
#$@text#$@
//取数据
def dataObject = actionContext.get("dataObject");
if(dataObject != null){
    form.doAction("setDataObject", ac, ["dataObject":dataObject]);
}

if(actionContext.get("values") != null){
}
#$@text#$@
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sth_createIndex
      false
      sid
      setValues
        @/@shell/@actions/@setValues/@ins
        sisValidate
        false
        sname
        ins
        sdescriptors
        xworker.lang.actions.Inout/@ins
        sth_createIndex
        false
        sid
        ins
          @/@shell/@actions/@setValues/@ins/@dataObject
          sname
          dataObject
          stypeCheck
          false
          soptional
          true
          scheck
          false
          scheckLevel
          exception
          sdescriptors
          xworker.lang.actions.Inout/@ins/@param
          sth_createIndex
          false
          sid
          dataObject
          @/@shell/@actions/@setValues/@ins/@values
          sname
          values
          stypeCheck
          false
          soptional
          true
          scheck
          false
          scheckLevel
          exception
          sdescriptors
          xworker.lang.actions.Inout/@ins/@param
          sth_createIndex
          false
          sid
          values
      @/@shell/@actions/@getValues
      sname
      getValues
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Global
      sdisableGlobalContext
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sth_createIndex
      false
      sid
      getValues
