^1640696315023
@
sname
ServerGroupEditor
slabel
ServerGroupEditor
ssingleInstance
false
scloseable
true
suseRef
false
sdescriptors
xworker.swt.app.view.swt.app.workbentch.Editor
sinheritDescription
false
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
  @/@Control
  sname
  Control
  sdescriptors
  xworker.swt.app.view.swt.app.workbentch.Editor/@Control
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  Control
    @/@Control/@mainSashForm
    sname
    mainSashForm
    sstyle
    VERTICAL
    sSMOOTH
    false
    sweights
    50,50
    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/@SashForm
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_mark
    false
    sid
    mainSashForm
      @/@Control/@mainSashForm/@serverGroupEditor
      sname
      serverGroupEditor
      sdataObject
      xworker.app.server.dataobjects.ServerGroup
      squeryButton
      true
      snewButton
      true
      seditButton
      true
      seditBatchButton
      false
      sdeleteButton
      true
      sselectAllButton
      false
      sselectRerverseButton
      false
      spagingToolbar
      true
      sactionContext
      dataObjectContext
      stableCheck
      false
      sdebug
      false
      sdescriptors
      xworker.swt.app.view.swt.Items/@DataObjectEditCompoiste
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_mark
      false
      sid
      serverGroupEditor
        @/@Control/@mainSashForm/@serverGroupEditor/@actions
        sname
        actions
        sdescriptors
        xworker.swt.app.view.swt.widgets.DataObjectEditCompoiste/@actions1
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_mark
        false
        sid
        actions
          @/@Control/@mainSashForm/@serverGroupEditor/@actions/@tableSelection
          sname
          tableSelection
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          svarScope
          Local
          sdisableGlobalContext
          false
          Scode
#$@text#$@
//加载子条目
itemsDataStore.doAction("load", actionContext, 
    ["params":["serverGroupId": dataObjectContext.dataTable.getSelection()[0].getData().get("id")]]);
    
//设置条目的按钮状态    
addServerButton.setEnabled(true);
deleteServerButton.setEnabled(false);
#$@text#$@
          sinterpretationType
          Action
          screateLocalVarScope
          false
          ssaveReturn
          false
          sdescriptors
          xworker.lang.actions.Actions/@GroovyAction
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_mark
          false
          sid
          tableSelection
          @/@Control/@mainSashForm/@serverGroupEditor/@actions/@tableDeleted
          sname
          tableDeleted
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          svarScope
          Local
          sdisableGlobalContext
          false
          Scode
#$@text#$@
//设置条目的按钮状态    
addServerButton.setEnabled(false);
deleteServerButton.setEnabled(false);

//加载子条目
itemsDataStore.doAction("load", actionContext, 
    ["params":["serverGroupId": "-1"]]);
#$@text#$@
          sinterpretationType
          Action
          screateLocalVarScope
          false
          ssaveReturn
          false
          sdescriptors
          xworker.lang.actions.Actions/@GroovyAction
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_mark
          false
          sid
          tableDeleted
          @/@Control/@mainSashForm/@serverGroupEditor/@actions/@DisplayExec
          sname
          onStoreLoaded
          swidgetForDisplay
          addServerButton
          stype
          async
          scancelTaskOnWidgetDisposed
          false
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          svarScope
          Local
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          screateLocalVarScope
          false
          ssaveReturn
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.swt.actions.DisplayActions/@DisplayExec
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_mark
          false
          sid
          DisplayExec
            @/@Control/@mainSashForm/@serverGroupEditor/@actions/@DisplayExec/@actions
            sname
            actions
            sdescriptors
            xworker.swt.actions.DisplayActions/@DisplayExec/@actions
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_mark
            false
            sid
            actions
              @/@Control/@mainSashForm/@serverGroupEditor/@actions/@DisplayExec/@actions/@onStoreLoaded
              sname
              doAction
              sisSynchronized
              false
              sthrowException
              true
              suseOtherAction
              false
              svarScope
              Local
              sdisableGlobalContext
              false
              Scode
#$@text#$@
//设置条目的按钮状态    
addServerButton.setEnabled(false);
deleteServerButton.setEnabled(false);

//加载子条目
itemsDataStore.doAction("load", actionContext, 
    ["params":["serverGroupId": "-1"]]);
#$@text#$@
              sinterpretationType
              Action
              screateLocalVarScope
              false
              ssaveReturn
              false
              sdescriptors
              xworker.lang.actions.Actions/@GroovyAction
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_mark
              false
              sid
              onStoreLoaded
      @/@Control/@mainSashForm/@serverGroupItemsComposite
      sname
      serverGroupItemsComposite
      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
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_mark
      false
      sid
      serverGroupItemsComposite
        @/@Control/@mainSashForm/@serverGroupItemsComposite/@serverGroupItemGridLayout
        sname
        serverGroupItemGridLayout
        smakeColumnsEqualWidth
        false
        smarginWidth
        5
        smarginHeight
        5
        smarginLeft
        0
        smarginTop
        0
        smarginRight
        0
        smarginBottom
        0
        shorizontalSpacing
        5
        sverticalSpacing
        5
        sdescriptors
        xworker.swt.Layouts/@GridLayout
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_mark
        false
        sid
        serverGroupItemGridLayout
        @/@Control/@mainSashForm/@serverGroupItemsComposite/@itemsTable
        sname
        itemsTable
        sselectStyle
        SINGLE
        sV_SCROLL
        true
        sH_SCROLL
        true
        sCHECK
        false
        sFULL_SELECTION
        true
        sHIDE_SELECTION
        true
        sBORDER
        false
        slineVisible
        true
        smultipleColumns
        true
        sheaderVisible
        true
        ssortIndicator
        true
        smoveableColumns
        true
        sheadImages
        false
        ssubImages
        false
        sVIRTUAL
        false
        scapture
        false
        senabled
        true
        sredraw
        true
        svisible
        true
        sdescriptors
        xworker.swt.Widgets/@Table
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_mark
        false
        sid
        itemsTable
          @/@Control/@mainSashForm/@serverGroupItemsComposite/@itemsTable/@itemsTableGridData
          sname
          itemsTableGridData
          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
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_mark
          false
          sid
          itemsTableGridData
          @/@Control/@mainSashForm/@serverGroupItemsComposite/@itemsTable/@itemsDataStore
          sname
          itemsDataStore
          sattachToParent
          true
          sloadBackground
          true
          sautoLoad
          false
          sautoSave
          true
          sdataObject
          xworker.app.server.dataobjects.ServerGroupItems
          spaging
          extend
          spageSize
          50
          sstoreSortField
          _extend
          sstoreSortDir
          ASC
          seditable
          extend
          seditmethod
          extend
          sdescriptors
          xworker.swt.widgets.Table/@DataStore
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_mark
          false
          sid
          itemsDataStore
            @/@Control/@mainSashForm/@serverGroupItemsComposite/@itemsTable/@itemsDataStore/@queryConfig
            sname
            queryConfig
            boperator
            1
            sjoin
            and
            signoreNull
            true
            sdummySql
            false
            saddOneDay
            false
            sdescriptors
            xworker.swt.app.view.swt.data.DataStore/@Condition
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_mark
            false
            sid
            queryConfig
              @/@Control/@mainSashForm/@serverGroupItemsComposite/@itemsTable/@itemsDataStore/@queryConfig/@serverGroupId
              sname
              serverGroupId
              sattributeName
              serverGroupId
              sdataName
              serverGroupId
              boperator
              1
              sjoin
              and
              signoreNull
              true
              sdummySql
              false
              saddOneDay
              false
              sdescriptors
              xworker.dataObject.query.Condition/@Condition
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_mark
              false
              sid
              serverGroupId
          @/@Control/@mainSashForm/@serverGroupItemsComposite/@itemsTable/@Listeners
          sname
          Listeners
          sdescriptors
          xworker.swt.widgets.Widget/@Listeners
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_mark
          false
          sid
          Listeners
            @/@Control/@mainSashForm/@serverGroupItemsComposite/@itemsTable/@Listeners/@itemsTableSelection
            sname
            itemsTableSelection
            stype
            Selection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_mark
            false
            sid
            itemsTableSelection
              @/@Control/@mainSashForm/@serverGroupItemsComposite/@itemsTable/@Listeners/@itemsTableSelection/@Enabled
              sname
              Enabled
              smethod
              enable
              scontrolList
              deleteServerButton
              sinterpretationType
              Self
              sattributeTemplate
              false
              schildsAttributeTemplate
              false
              svarScope
              Local
              sisSynchronized
              false
              sthrowException
              true
              suseOtherAction
              false
              screateLocalVarScope
              false
              ssaveReturn
              false
              sdisableGlobalContext
              false
              sdescriptors
              xworker.swt.actions.ControlActions/@Enabled
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_mark
              false
              sid
              Enabled
        @/@Control/@mainSashForm/@serverGroupItemsComposite/@12241
        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
        12241
          @/@Control/@mainSashForm/@serverGroupItemsComposite/@12241/@12242
          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
          12242
          @/@Control/@mainSashForm/@serverGroupItemsComposite/@12241/@12243
          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
          12243
          @/@Control/@mainSashForm/@serverGroupItemsComposite/@12241/@12244
          sname
          addServerButton
          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
          12244
            @/@Control/@mainSashForm/@serverGroupItemsComposite/@12241/@12244/@12245
            sname
            RowData
            sexclude
            false
            swidth
            80
            sheight
            -1
            sdescriptors
            xworker.swt.layout.LayoutDatas/@RowData
            sth_createIndex
            false
            sid
            12245
            @/@Control/@mainSashForm/@serverGroupItemsComposite/@12241/@12244/@12246
            sname
            Listeners
            sdescriptors
            xworker.swt.widgets.Widget/@Listeners
            sth_createIndex
            false
            sid
            12246
              @/@Control/@mainSashForm/@serverGroupItemsComposite/@12241/@12244/@12246/@12247
              sname
              addServerButtonSelection
              stype
              Selection
              sdescriptors
              xworker.swt.events.Listeners/@listeners/@Listener
              sth_createIndex
              false
              sid
              12247
                @/@Control/@mainSashForm/@serverGroupItemsComposite/@12241/@12244/@12246/@12247/@GroovyAction
                sname
                GroovyAction
                sisSynchronized
                false
                sthrowException
                true
                suseOtherAction
                false
                svarScope
                Local
                sdisableGlobalContext
                false
                Scode
#$@text#$@
import org.xmeta.ActionContext;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;

import xworker.swt.util.SwtDialog;
import xworker.dataObject.DataObject;
import xworker.dataObject.utils.DataObjectUtil;

//总分组的数据对象
def groupdata = dataObjectContext.dataTable.getSelection()[0].getData();

def resSelectorPath = "xworker.app.appmanager.swt.editors.server.SelectServerShell";

//选择数据
def ac = new ActionContext();
ac.put("parent", addServerButton.getShell());
def shellThing = world.getThing(resSelectorPath);
def shell = shellThing.doAction("create", ac);
def datas = SwtDialog.open(shell, ac);

//插入数据
for(data in datas){
    def dataObject = new DataObject("xworker.app.server.dataobjects.ServerGroupItems");
    dataObject.put("serverGroupId", groupdata.get("id"));
    dataObject.put("serverId",data.get("id"));
    dataObject.put("serverName", data.get("name"));
    DataObjectUtil.createIfNotExists(dataObject, ["serverId", "serverGroupId"] as String[], actionContext);
}

//重新刷新
itemsDataStore.doAction("reload", actionContext);
#$@text#$@
                sinterpretationType
                Action
                screateLocalVarScope
                false
                ssaveReturn
                false
                sdescriptors
                xworker.lang.actions.Actions/@GroovyAction
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_mark
                false
                sid
                GroovyAction
          @/@Control/@mainSashForm/@serverGroupItemsComposite/@12241/@12248
          sname
          deleteServerButton
          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
          12248
            @/@Control/@mainSashForm/@serverGroupItemsComposite/@12241/@12248/@12249
            sname
            RowData
            sexclude
            false
            swidth
            80
            sheight
            -1
            sdescriptors
            xworker.swt.layout.LayoutDatas/@RowData
            sth_createIndex
            false
            sid
            12249
            @/@Control/@mainSashForm/@serverGroupItemsComposite/@12241/@12248/@12250
            sname
            Listeners
            sdescriptors
            xworker.swt.widgets.Widget/@Listeners
            sth_createIndex
            false
            sid
            12250
              @/@Control/@mainSashForm/@serverGroupItemsComposite/@12241/@12248/@12250/@12251
              sname
              deleteServerButtonSelection
              stype
              Selection
              sdescriptors
              xworker.swt.events.Listeners/@listeners/@Listener
              sth_createIndex
              false
              sid
              12251
                @/@Control/@mainSashForm/@serverGroupItemsComposite/@12241/@12248/@12250/@12251/@DataStoreAction
                sname
                DataStoreAction
                sstoreName
                itemsDataStore
                smethod
                remove
                srecordSource
                DataObjectTable
                srecordName
                itemsTable
                sdeleteConfirm
                true
                scrateConfirm
                false
                supdateConfirm
                false
                scommitConfirm
                false
                supdateBatchConfirm
                true
                sremoveBatchConfirm
                true
                sdeleteMessage
                确定要删除选中的条目吗？
                sinterpretationType
                Self
                sattributeTemplate
                false
                schildsAttributeTemplate
                false
                svarScope
                Local
                sisSynchronized
                false
                sthrowException
                true
                suseOtherAction
                false
                screateLocalVarScope
                false
                ssaveReturn
                false
                sdisableGlobalContext
                false
                sdescriptors
                xworker.swt.app.view.swt.data.DataStoreAction
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_mark
                false
                sid
                DataStoreAction
