^1640696296817
@
sname
AttributeDataObjectSelector
slabel
AttributeDataObjectSelector
sdescription
<p>编辑属性属性时选择关联数据对象的选择窗口，如在查询用户时，点击*按钮弹出用户选择界面。</p>
sdescriptors
xworker.swt.widgets.Display
sth_createIndex
false
  @/@shell
  sname
  shell
  stext
  数据选择
  sNO_TRIM
  false
  sCLOSE
  true
  sTITLE
  true
  sMIN
  true
  sMAX
  true
  sBORDER
  false
  sRESIZE
  true
  sON_TOP
  false
  sTOOL
  false
  sNO_FOCUS
  false
  swidth
  640
  sheight
  480
  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
  sth_createIndex
  false
  sid
  shell
    @/@shell/@preInit
    sname
    preInit
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    svarScope
    Local
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.xmeta.util.UtilString;

//参数列表
def params = UtilString.getParams(param, ",");

actionContext.getScope(0).put("params", params);
#$@text#$@
    sinterpretationType
    Action
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.swt.widgets.Widget/@Code
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_mark
    false
    sid
    preInit
    @/@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
    sth_createIndex
    false
    sid
    shellGridLayout
    @/@shell/@queryForm
    sname
    queryForm
    sformType
    query
    sdescriptors
    xworker.swt.app.view.swt.Items/@DataObjectForm
    sth_createIndex
    false
    sid
    queryForm
      @/@shell/@queryForm/@queryFormGridData
      sname
      queryFormGridData
      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
      sth_createIndex
      false
      sid
      queryFormGridData
    @/@shell/@25567
    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
    25567
      @/@shell/@25567/@25568
      sname
      buttonCompositeGridData
      sstyle
      FILL_HORIZONTAL
      shorizontalIndent
      0
      swidth
      -1
      sheight
      -1
      shorizontalAlignment
      CENTER
      sverticalAlignment
      CENTER
      shorizontalSpan
      1
      sverticalSpan
      1
      sgrabExcessHorizontalSpace
      false
      sgrabExcessVerticalSpace
      false
      sdescriptors
      xworker.swt.layout.LayoutDatas/@GridData
      sid
      25568
      @/@shell/@25567/@25569
      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
      25569
      @/@shell/@25567/@25571
      sname
      queryBtn
      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
      25571
        @/@shell/@25567/@25571/@25572
        sname
        RowData
        sexclude
        false
        swidth
        80
        sheight
        -1
        sdescriptors
        xworker.swt.layout.LayoutDatas/@RowData
        sth_createIndex
        false
        sid
        25572
        @/@shell/@25567/@25571/@Listeners
        sname
        Listeners
        sdescriptors
        xworker.swt.widgets.Widget/@Listeners
        sth_createIndex
        false
        sid
        Listeners
          @/@shell/@25567/@25571/@Listeners/@queryBtnSelection
          sname
          queryBtnSelection
          stype
          Selection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sth_createIndex
          false
          sid
          queryBtnSelection
            @/@shell/@25567/@25571/@Listeners/@queryBtnSelection/@query
            sname
            query
            sstoreName
            store
            smethod
            query
            srecordSource
            DataObjectForm
            srecordName
            queryForm
            sdeleteConfirm
            true
            scrateConfirm
            false
            supdateConfirm
            false
            scommitConfirm
            false
            supdateBatchConfirm
            true
            sremoveBatchConfirm
            true
            sinterpretationType
            Self
            sdescriptors
            xworker.swt.app.view.swt.data.DataStoreAction
            sth_createIndex
            false
            sid
            query
            @/@shell/@25567/@25571/@Listeners/@queryBtnSelection/@enableButton
            sname
            disableButton
            smethod
            disable
            scontrolList
            okButton
            sinterpretationType
            Self
            svarScope
            Global
            sdescriptors
            xworker.swt.actions.ControlActions/@Enabled
            sth_createIndex
            false
            sid
            enableButton
    @/@shell/@IF
    sname
    IF
    scondition
    params.multi != null && params.multi == "true"
    sdescriptors
    xworker.swt.Widgets/@_IF
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_mark
    false
    sid
    IF
      @/@shell/@IF/@dataTable
      sname
      dataTable
      sselectStyle
      MULTI
      sV_SCROLL
      true
      sH_SCROLL
      true
      sCHECK
      true
      sFULL_SELECTION
      true
      sHIDE_SELECTION
      false
      sBORDER
      true
      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
      sth_createIndex
      false
      sid
      dataTable
        @/@shell/@IF/@dataTable/@dataTableGridData
        sname
        dataTableGridData
        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
        dataTableGridData
        @/@shell/@IF/@dataTable/@userTore
        sname
        store
        sattachToParent
        true
        sloadBackground
        true
        sautoLoad
        false
        sautoSave
        true
        spaging
        extend
        spageSize
        50
        sstoreSortField
        _extend
        sstoreSortDir
        ASC
        seditable
        extend
        seditmethod
        extend
        sdescriptors
        xworker.swt.widgets.Table/@DataStore
        sth_createIndex
        false
        sid
        userTore
        @/@shell/@IF/@dataTable/@28276
        sname
        Listeners
        sdescriptors
        xworker.swt.widgets.Widget/@Listeners
        sth_createIndex
        false
        sid
        28276
          @/@shell/@IF/@dataTable/@28276/@28277
          sname
          dataTableSelection
          stype
          Selection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sth_createIndex
          false
          sid
          28277
            @/@shell/@IF/@dataTable/@28276/@28277/@enableButton
            sname
            enableButton
            smethod
            enable
            scontrolList
            okButton
            sinterpretationType
            Self
            svarScope
            Global
            sdescriptors
            xworker.swt.actions.ControlActions/@Enabled
            sth_createIndex
            false
            sid
            enableButton
      @/@shell/@IF/@ELSE
      sname
      ELSE
      sdescriptors
      xworker.swt.statement.IF/@_ELSE
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_mark
      false
      sid
      ELSE
        @/@shell/@IF/@ELSE/@dataTable
        sname
        dataTable
        sselectStyle
        SINGLE
        sV_SCROLL
        true
        sH_SCROLL
        true
        sCHECK
        false
        sFULL_SELECTION
        true
        sHIDE_SELECTION
        false
        sBORDER
        true
        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
        sth_createIndex
        false
        sid
        dataTable
          @/@shell/@IF/@ELSE/@dataTable/@dataTableGridData
          sname
          dataTableGridData
          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
          dataTableGridData
          @/@shell/@IF/@ELSE/@dataTable/@userTore
          sname
          store
          sattachToParent
          true
          sloadBackground
          true
          sautoLoad
          false
          sautoSave
          true
          spaging
          extend
          spageSize
          50
          sstoreSortField
          _extend
          sstoreSortDir
          ASC
          seditable
          extend
          seditmethod
          extend
          sdescriptors
          xworker.swt.widgets.Table/@DataStore
          sth_createIndex
          false
          sid
          userTore
          @/@shell/@IF/@ELSE/@dataTable/@28276
          sname
          Listeners
          sdescriptors
          xworker.swt.widgets.Widget/@Listeners
          sth_createIndex
          false
          sid
          28276
            @/@shell/@IF/@ELSE/@dataTable/@28276/@28277
            sname
            dataTableSelection
            stype
            Selection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sth_createIndex
            false
            sid
            28277
              @/@shell/@IF/@ELSE/@dataTable/@28276/@28277/@enableButton
              sname
              enableButton
              smethod
              enable
              scontrolList
              okButton
              sinterpretationType
              Self
              svarScope
              Global
              sdescriptors
              xworker.swt.actions.ControlActions/@Enabled
              sth_createIndex
              false
              sid
              enableButton
    @/@shell/@pageingToolbar
    sname
    pageingToolbar
    sbeforePageText
    第
    safterPageText
    页 共{0}页
    sdisplayInfo
    false
    sdisplayMsg
    第{0}-第{1}条，共{2}条
    semptyMsg
    没有数据
    sfirstText
    首页
    slastText
    最后一页
    sstore
    store
    sdescriptors
    xworker.swt.app.view.swt.Items/@PagingToolbar
    sth_createIndex
    false
    sid
    pageingToolbar
      @/@shell/@pageingToolbar/@pagingToolbarGridData
      sname
      pagingToolbarGridData
      sstyle
      FILL_HORIZONTAL
      shorizontalIndent
      0
      swidth
      -1
      sheight
      -1
      shorizontalAlignment
      BEGINNING
      sverticalAlignment
      CENTER
      shorizontalSpan
      1
      sverticalSpan
      1
      sgrabExcessHorizontalSpace
      false
      sgrabExcessVerticalSpace
      false
      sdescriptors
      xworker.swt.Commons/@GridData
      sth_createIndex
      false
      sid
      pagingToolbarGridData
    @/@shell/@255671
    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
    255671
      @/@shell/@255671/@25568
      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
      25568
      @/@shell/@255671/@25569
      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
      25569
      @/@shell/@255671/@27755
      sname
      okButton
      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
      27755
        @/@shell/@255671/@27755/@27756
        sname
        RowData
        sexclude
        false
        swidth
        80
        sheight
        -1
        sdescriptors
        xworker.swt.layout.LayoutDatas/@RowData
        sth_createIndex
        false
        sid
        27756
        @/@shell/@255671/@27755/@27757
        sname
        Listeners
        sdescriptors
        xworker.swt.widgets.Widget/@Listeners
        sth_createIndex
        false
        sid
        27757
          @/@shell/@255671/@27755/@27757/@27758
          sname
          updateBatchBtnSelection
          stype
          Selection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sth_createIndex
          false
          sid
          27758
            @/@shell/@255671/@27755/@27757/@27758/@selection
            sname
            selection
            sisSynchronized
            false
            sthrowException
            true
            suseOtherAction
            false
            suseOuterJava
            true
            souterClassName
            xworker.swt.dataObject.AttributeDataObjectSelectorActions
            smethodName
            selection
            sdisableGlobalContext
            false
            sinterpretationType
            Action
            svarScope
            Local
            screateLocalVarScope
            false
            ssaveReturn
            false
            sdescriptors
            xworker.lang.actions.Actions/@JavaAction
            sth_createIndex
            false
            sid
            selection
      @/@shell/@255671/@27759
      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
      27759
        @/@shell/@255671/@27759/@27760
        sname
        RowData
        sexclude
        false
        swidth
        80
        sheight
        -1
        sdescriptors
        xworker.swt.layout.LayoutDatas/@RowData
        sth_createIndex
        false
        sid
        27760
        @/@shell/@255671/@27759/@27761
        sname
        Listeners
        sdescriptors
        xworker.swt.widgets.Widget/@Listeners
        sth_createIndex
        false
        sid
        27761
          @/@shell/@255671/@27759/@27761/@27762
          sname
          disposeBtnSelection
          stype
          Selection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sth_createIndex
          false
          sid
          27762
            @/@shell/@255671/@27759/@27761/@27762/@shellDispose
            sname
            shellDispose
            sshellName
            shell
            smethod
            dispose
            sinterpretationType
            Self
            svarScope
            Local
            sdescriptors
            xworker.swt.actions.ShellActions/@ShellNormalActions1
            sth_createIndex
            false
            sid
            shellDispose
    @/@shell/@init
    sname
    init
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    svarScope
    Local
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.xmeta.util.UtilString;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;


def dataObjectPath = params.dataObject;
def queryConfigPath = params.queryConfig
def relationName = params.relationName;
def winWidth = -1;
try{
    winWidth = Integer.parseInt(params.winWidth);
}catch(Exception e){
}
def winHeight = -1;
try{
    winHeight = Integer.parseInt(params.winHeight);
}catch(Exception e){
}
actionContext.getScope(0).put("relationName", relationName);
actionContext.getScope(0).put("attributeName", params.attributeName);
actionContext.getScope(0).put("valueMapping", params.valueMapping);

//数据对象和查询配置
def dataObject = world.getThing(dataObjectPath);
def queryConfig = world.getThing(queryConfigPath);

if(dataObject == null){
    MessageBox box = new MessageBox(shell, SWT.OK | SWT.ICON_WARNING);
    box.setText("错误");
    box.setMessage("未设置或数据对象不存在，dataObjectPath=" + dataObjectPath);
    box.open();
    shell.dispose();
    return;
}
if(params.attributeName == null || params.attributeName == ""){
    MessageBox box = new MessageBox(shell, SWT.OK | SWT.ICON_WARNING);
    box.setText("错误");
    box.setMessage("属性名不能为空！");
    box.open();
    shell.dispose();
    return;
}

//查询配置
def queryDataObject = world.getThing(params.queryDataObject);
if(queryDataObject == null){
    queryDataObject = dataObject.getThing("QueryFormDataObject@0");
}
if(queryDataObject != null && queryDataObject.getChilds().size() > 0){
    queryDataObject = queryDataObject.getChilds().get(0);
}else{
    queryDataObject = dataObject;
}
if(queryConfig == null){
    queryConfig = world.getThing(dataObject.getString("conditionPath"));    
    if(queryConfig == null){
        queryConfig = dataObject.getThing("Condition@0");
    }
}

queryForm.doAction("setDataObject", actionContext, ["dataObject":queryDataObject]);
store.doAction("setDataObject", actionContext, ["dataObject":dataObject, "queryConfig":queryConfig]);
def editModel = parentContext.get("__editModel__model");
def queryParams = editModel.doAction("getValue", parentContext);
actionContext.getScope(0).put("editModel", editModel);
//log.info("queryParams=" + queryParams);
if(params.queryUserFormValues == "true"){
    queryForm.doAction("setValues", actionContext, ["values": queryParams]);
}
store.doAction("load", actionContext);//, ["params": queryParams]);

//窗口大小
if(winWidth > 0 || winHeight > 0){
    def size = shell.getSize();
    if(winWidth > 0){
        size.x = winWidth;
    }
    if(winHeight > 0){
        size.y = winHeight;
    }
    shell.setSize(size);
}
#$@text#$@
    sinterpretationType
    Action
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.swt.Widgets/@Code
    sth_createIndex
    false
    sid
    init
