^1640696314728
@
sname
DbMonitor
slabel
DbMonitor
ssingleInstance
true
scloseable
true
suseRef
false
srefPath
DbMonitor
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/@mainSash
    sname
    mainSash
    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
    mainSash
      @/@Control/@mainSash/@dbMonitorEditor
      sname
      dbMonitorEditor
      sdataObject
      xworker.app.monitor.dataobjects.DbMonitor
      squeryButton
      true
      snewButton
      true
      seditButton
      true
      seditBatchButton
      false
      sdeleteButton
      true
      spagingToolbar
      true
      sactionContext
      monitorObjectContext
      stableCheck
      false
      sdebug
      false
      sdescriptors
      xworker.swt.app.view.swt.Items/@DataObjectEditCompoiste
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_mark
      false
      sid
      dbMonitorEditor
        @/@Control/@mainSash/@dbMonitorEditor/@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/@mainSash/@dbMonitorEditor/@actions/@tableSelection
          sname
          tableSelection
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          svarScope
          Local
          sdisableGlobalContext
          false
          Scode
#$@text#$@
addTaskButton.setEnabled(true);
deleteTaskButton.setEnabled(false);
addDBButton.setEnabled(false);
deleteDbButton.setEnabled(false);

taskDataStore.doAction("load", actionContext, 
    ["params":["monitorId": monitorObjectContext.dataTable.getSelection()[0].getData().get("id")]]);
    
dbDataStore.doAction("load", actionContext, 
    ["params":["taskId": -1]]);
    
helpBrowser.setText("");
#$@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/@mainSash/@dbMonitorEditor/@actions/@tableDeleted
          sname
          tableDeleted
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          svarScope
          Local
          sdisableGlobalContext
          false
          Scode
#$@text#$@
addTaskButton.setEnabled(false);
deleteTaskButton.setEnabled(false);
addDBButton.setEnabled(false);
deleteDbButton.setEnabled(false);

taskDataStore.doAction("load", actionContext, 
    ["params":["monitorId": monitorObjectContext.dataTable.getSelection()[0].getData().get("id")]]);
    
dbDataStore.doAction("load", actionContext, 
    ["params":["taskId": -1]]);
    
helpBrowser.setText("");
#$@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/@mainSash/@dbMonitorEditor/@actions/@onStoreLoaded1
          sname
          onStoreLoaded
          swidgetForDisplay
          mainSash
          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
          onStoreLoaded1
            @/@Control/@mainSash/@dbMonitorEditor/@actions/@onStoreLoaded1/@actions
            sname
            actions
            sdescriptors
            xworker.swt.actions.DisplayActions/@DisplayExec/@actions
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_mark
            false
            sid
            actions
              @/@Control/@mainSash/@dbMonitorEditor/@actions/@onStoreLoaded1/@actions/@onStoreLoaded
              sname
              doAction
              sisSynchronized
              false
              sthrowException
              true
              suseOtherAction
              false
              svarScope
              Local
              sdisableGlobalContext
              false
              Scode
#$@text#$@
addTaskButton.setEnabled(false);
deleteTaskButton.setEnabled(false);
addDBButton.setEnabled(false);
deleteDbButton.setEnabled(false);

taskDataStore.doAction("load", actionContext, 
    ["params":["monitorId": -1]]);
    
dbDataStore.doAction("load", actionContext, 
    ["params":["taskId": -1]]);
    
helpBrowser.setText("");
#$@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/@mainSash/@bottomSashForm
      sname
      bottomSashForm
      sstyle
      HORIZONTAL
      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
      bottomSashForm
        @/@Control/@mainSash/@bottomSashForm/@tasksComposite
        sname
        tasksComposite
        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
        tasksComposite
          @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@tasksCompositeGridLayout
          sname
          tasksCompositeGridLayout
          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
          tasksCompositeGridLayout
          @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@tasksLabel
          sname
          tasksLabel
          sBORDER
          false
          stype
          HORIZONTAL
          sshadow
          SHADOW_OUT
          salignment
          LEFT
          stext
          任务列表：
          scapture
          false
          senabled
          true
          sredraw
          true
          svisible
          true
          sdescriptors
          xworker.swt.Widgets/@Label
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_mark
          false
          sid
          tasksLabel
            @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@tasksLabel/@tasksLabelGridData
            sname
            tasksLabelGridData
            sstyle
            FILL_HORIZONTAL
            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
            tasksLabelGridData
          @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@tasksTable
          sname
          tasksTable
          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
          tasksTable
            @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@tasksTable/@tasksTableGridData
            sname
            tasksTableGridData
            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
            tasksTableGridData
            @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@tasksTable/@DataStore
            sname
            taskDataStore
            sattachToParent
            true
            sloadBackground
            true
            sautoLoad
            false
            sautoSave
            true
            sdataObject
            xworker.app.monitor.dataobjects.DbMonitorTasks
            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
            DataStore
              @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@tasksTable/@DataStore/@queryConfig
              sname
              queryConfig
              sattributeName
              monitorId
              sdataName
              monitorId
              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/@mainSash/@bottomSashForm/@tasksComposite/@tasksTable/@Listeners
            sname
            Listeners
            sdescriptors
            xworker.swt.widgets.Widget/@Listeners
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_mark
            false
            sid
            Listeners
              @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@tasksTable/@Listeners/@tasksTableSelection
              sname
              tasksTableSelection
              stype
              Selection
              sdescriptors
              xworker.swt.events.Listeners/@listeners/@Listener
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_mark
              false
              sid
              tasksTableSelection
                @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@tasksTable/@Listeners/@tasksTableSelection/@GroovyAction
                sname
                GroovyAction
                sisSynchronized
                false
                sthrowException
                true
                suseOtherAction
                false
                svarScope
                Local
                sdisableGlobalContext
                false
                Scode
#$@text#$@
import xworker.dataObject.DataObject;
import xworker.lang.util.XWorkerUtils;

deleteTaskButton.setEnabled(true);
addDBButton.setEnabled(true);
deleteDbButton.setEnabled(false);

def task = tasksTable.getSelection()[0].getData();
//装载数据库
dbDataStore.doAction("load", actionContext, 
    ["params":["taskId": task.get("id")]]);
    
//显示任务的文档    
def taskId = task.get("taskId");
def rtask = new DataObject("xworker.app.monitor.dataobjects.DbTask");
rtask.put("id", taskId);
rtask.load(actionContext);

def actionPath = rtask.getString("actionPath");
if(actionPath != null){
    def actionThing = world.getThing(actionPath);
    if(actionThing != null){
        helpBrowser.setUrl(XWorkerUtils.getThingDescUrl(actionThing));
    }
}
#$@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/@mainSash/@bottomSashForm/@tasksComposite/@helpBrowser
          sname
          helpBrowser
          sMOZILLA
          false
          sWEBKIT
          false
          sjavascriptEnabled
          true
          sdescriptors
          xworker.swt.Widgets/@Browser
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_mark
          false
          sid
          helpBrowser
            @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@helpBrowser/@helpBrowserGridData
            sname
            helpBrowserGridData
            sstyle
            FILL_HORIZONTAL
            shorizontalIndent
            0
            swidth
            -1
            sheight
            100
            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
            helpBrowserGridData
            @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@helpBrowser/@UtilBrowser
            sname
            UtilBrowser
            sdescriptors
            xworker.swt.browser.Browser/@UtilBrowser
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_mark
            false
            sid
            UtilBrowser
          @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@18163
          sname
          taskButtonComposite
          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
          18163
            @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@18163/@18164
            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
            18164
            @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@18163/@18165
            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
            18165
            @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@18163/@18166
            sname
            addTaskButton
            stext
            添加任务
            stype
            SWT.PUSH
            sflat
            false
            sborder
            false
            sselected
            false
            scapture
            false
            senabled
            false
            sredraw
            true
            svisible
            true
            sdescriptors
            xworker.swt.Widgets/@Button
            sth_createIndex
            false
            sid
            18166
              @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@18163/@18166/@18167
              sname
              RowData
              sexclude
              false
              swidth
              80
              sheight
              -1
              sdescriptors
              xworker.swt.layout.LayoutDatas/@RowData
              sth_createIndex
              false
              sid
              18167
              @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@18163/@18166/@18168
              sname
              Listeners
              sdescriptors
              xworker.swt.widgets.Widget/@Listeners
              sth_createIndex
              false
              sid
              18168
                @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@18163/@18166/@18168/@18169
                sname
                addTaskButtonSelection
                stype
                Selection
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sth_createIndex
                false
                sid
                18169
                  @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@18163/@18166/@18168/@18169/@GroovyAction
                  sname
                  GroovyAction
                  sisSynchronized
                  false
                  sthrowException
                  true
                  suseOtherAction
                  false
                  svarScope
                  Local
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
import org.xmeta.ActionContext;
import xworker.swt.util.SwtDialog;
import xworker.dataObject.DataObject;
import xworker.dataObject.utils.DataObjectUtil;

//选择数据
def ac = new ActionContext();
ac.put("parent", addTaskButton.getShell());
def shellThing = world.getThing("xworker.app.appmanager.swt.editors.task.SelectDbTasksShell");
def shell = shellThing.doAction("create", ac);
def datas = SwtDialog.open(shell, ac);

//插入数据
for(data in datas){
    def dataObject = new DataObject("xworker.app.monitor.dataobjects.DbMonitorTasks");
    dataObject.put("monitorId", monitorObjectContext.dataTable.getSelection()[0].getData().get("id"));
    dataObject.put("taskId", data.get("id"));
    dataObject.put("taskName", data.get("name")); 
    dataObject.put("status", 1);
    DataObjectUtil.createIfNotExists(dataObject, ["monitorId", "taskId"] as String[], actionContext);
}

//重新刷新
taskDataStore.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/@mainSash/@bottomSashForm/@tasksComposite/@18163/@18170
            sname
            deleteTaskButton
            stext
            删除任务
            stype
            SWT.PUSH
            sflat
            false
            sborder
            false
            sselected
            false
            scapture
            false
            senabled
            false
            sredraw
            true
            svisible
            true
            sdescriptors
            xworker.swt.Widgets/@Button
            sth_createIndex
            false
            sid
            18170
              @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@18163/@18170/@18171
              sname
              RowData
              sexclude
              false
              swidth
              80
              sheight
              -1
              sdescriptors
              xworker.swt.layout.LayoutDatas/@RowData
              sth_createIndex
              false
              sid
              18171
              @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@18163/@18170/@18172
              sname
              Listeners
              sdescriptors
              xworker.swt.widgets.Widget/@Listeners
              sth_createIndex
              false
              sid
              18172
                @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@18163/@18170/@18172/@18173
                sname
                deleteTaskButtonSelection
                stype
                Selection
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sth_createIndex
                false
                sid
                18173
                  @/@Control/@mainSash/@bottomSashForm/@tasksComposite/@18163/@18170/@18172/@18173/@DataStoreAction
                  sname
                  DataStoreAction
                  sstoreName
                  taskDataStore
                  smethod
                  remove
                  srecordSource
                  DataObjectTable
                  srecordName
                  tasksTable
                  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
        @/@Control/@mainSash/@bottomSashForm/@dbsComposite
        sname
        dbsComposite
        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
        dbsComposite
          @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@dbsCompositeGridLayout
          sname
          dbsCompositeGridLayout
          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
          dbsCompositeGridLayout
          @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@dbsLabel
          sname
          dbsLabel
          sBORDER
          false
          stype
          HORIZONTAL
          sshadow
          SHADOW_OUT
          salignment
          LEFT
          stext
          数据库列表：
          scapture
          false
          senabled
          true
          sredraw
          true
          svisible
          true
          sdescriptors
          xworker.swt.Widgets/@Label
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_mark
          false
          sid
          dbsLabel
            @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@dbsLabel/@dbsLabelGridData
            sname
            dbsLabelGridData
            sstyle
            FILL_HORIZONTAL
            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
            dbsLabelGridData
          @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@dbsTable
          sname
          dbsTable
          sselectStyle
          SINGLE
          sV_SCROLL
          true
          sH_SCROLL
          true
          sCHECK
          true
          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
          dbsTable
            @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@dbsTable/@dbsTableGridData
            sname
            dbsTableGridData
            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
            dbsTableGridData
            @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@dbsTable/@dbDataStore
            sname
            dbDataStore
            sattachToParent
            true
            sloadBackground
            true
            sautoLoad
            false
            sautoSave
            true
            sdataObject
            xworker.app.monitor.dataobjects.DbMonitorDbs
            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
            dbDataStore
              @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@dbsTable/@dbDataStore/@queryConfig
              sname
              queryConfig
              sattributeName
              taskId
              sdataName
              taskId
              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/@mainSash/@bottomSashForm/@dbsComposite/@dbsTable/@Listeners
            sname
            Listeners
            sdescriptors
            xworker.swt.widgets.Widget/@Listeners
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_mark
            false
            sid
            Listeners
              @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@dbsTable/@Listeners/@dbsTableSelection
              sname
              dbsTableSelection
              stype
              Selection
              sdescriptors
              xworker.swt.events.Listeners/@listeners/@Listener
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_mark
              false
              sid
              dbsTableSelection
                @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@dbsTable/@Listeners/@dbsTableSelection/@Enabled
                sname
                Enabled
                smethod
                enable
                scontrolList
                deleteDbButton
                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/@mainSash/@bottomSashForm/@dbsComposite/@18163
          sname
          dbsButtonComposite
          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
          18163
            @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@18163/@18164
            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
            18164
            @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@18163/@18165
            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
            18165
            @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@18163/@18166
            sname
            addDBButton
            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
            18166
              @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@18163/@18166/@18167
              sname
              RowData
              sexclude
              false
              swidth
              80
              sheight
              -1
              sdescriptors
              xworker.swt.layout.LayoutDatas/@RowData
              sth_createIndex
              false
              sid
              18167
              @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@18163/@18166/@18168
              sname
              Listeners
              sdescriptors
              xworker.swt.widgets.Widget/@Listeners
              sth_createIndex
              false
              sid
              18168
                @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@18163/@18166/@18168/@18169
                sname
                addTaskButtonSelection
                stype
                Selection
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sth_createIndex
                false
                sid
                18169
                  @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@18163/@18166/@18168/@18169/@GroovyAction
                  sname
                  GroovyAction
                  sisSynchronized
                  false
                  sthrowException
                  true
                  suseOtherAction
                  false
                  svarScope
                  Local
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
import org.xmeta.ActionContext;
import xworker.swt.util.SwtDialog;
import xworker.dataObject.DataObject;
import xworker.dataObject.utils.DataObjectUtil;

//选择数据
def ac = new ActionContext();
ac.put("parent", addTaskButton.getShell());
def shellThing = world.getThing("xworker.app.appmanager.swt.editors.db.SelectDatasourceShell");
def shell = shellThing.doAction("create", ac);
def datas = SwtDialog.open(shell, ac);

//插入数据
for(data in datas){
    def dataObject = new DataObject("xworker.app.monitor.dataobjects.DbMonitorDbs");
    dataObject.put("taskId",tasksTable.getSelection()[0].getData().get("id"));
    dataObject.put("dbId", data.get("name"));
    dataObject.put("dbName", data.get("label")); 
    dataObject.put("status", 1);
    DataObjectUtil.createIfNotExists(dataObject, ["taskId", "dbId"] as String[], actionContext);
}

//重新刷新
dbDataStore.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/@mainSash/@bottomSashForm/@dbsComposite/@18163/@18170
            sname
            deleteDbButton
            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
            18170
              @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@18163/@18170/@18171
              sname
              RowData
              sexclude
              false
              swidth
              80
              sheight
              -1
              sdescriptors
              xworker.swt.layout.LayoutDatas/@RowData
              sth_createIndex
              false
              sid
              18171
              @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@18163/@18170/@18172
              sname
              Listeners
              sdescriptors
              xworker.swt.widgets.Widget/@Listeners
              sth_createIndex
              false
              sid
              18172
                @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@18163/@18170/@18172/@18173
                sname
                deleteTaskButtonSelection
                stype
                Selection
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sth_createIndex
                false
                sid
                18173
                  @/@Control/@mainSash/@bottomSashForm/@dbsComposite/@18163/@18170/@18172/@18173/@DataStoreAction
                  sname
                  DataStoreAction
                  sstoreName
                  dbDataStore
                  smethod
                  remove
                  srecordSource
                  DataObjectTable
                  srecordName
                  dbsTable
                  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
