^1640696561682
@
sname
DataObjectInputDialog
slabel
DataObjectInputDialog
sdescriptors
xworker.lang.MetaDescriptor3
sextends
xworker.lang.actions.SelfAction
smany
true
seditCols
2
sinitialization
false
sgroup
swt.dialogs
smodifier
public
sinheritDescription
false
sdescription
<p>弹出一个输入框，使用数据对象生成编辑表单，点击确定返回表单的编辑结果，点击取消返回null。</p>
sid
DataObjectInputDialog
  @/@actions
  sname
  actions
  slabel
  actions
  sdescriptors
  xworker.lang.MetaDescriptor3/@actions
  sid
  actions
    @/@actions/@run
    sname
    run
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    svarScope
    Local
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.xmeta.ActionContext;

import xworker.swt.util.SwtUtils;
import xworker.ui.swt.SwtDialog;
import org.xmeta.util.UtilString;

import org.eclipse.swt.widgets.Display;

def parentShell = null;
if(Display.getCurrent() == null){
    log.info("DataObjectInputDialod: current thread is not swt thread");
    return null;
}
parentShell = Display.getCurrent().getActiveShell();

def dataObject = null;
if(self.dataObject != null && self.dataObject != ""){
    dataObject = world.getThing(self.dataObject);
}
if(dataObject == null){
    def dataObjects = self.getThing("dataObjects@0");
    if(dataObjects != null && dataObjects.childs.size() > 0){
        dataObject = dataObjects.childs.get(0);
    }
}
if(dataObject == null){
    log.info("DataObjectInputDialog: dataOjbect is null, dataObject=" + self.dataObject);
    return null;
}

def shellThing = world.getThing("xworker.swt.app.view.swt.dialogs.DataObjectInputDialog/@thing");
def ac = new ActionContext();
ac.put("parent", parentShell);
shellThing.doAction("create", ac);
if(self.title != null && self.title != ""){
    def title = UtilString.getString(self.title, actionContext);
    if(title != null){
        ac.dialogShell.setText(title);
    }
}
if(self.message != null && self.message != ""){
    def message = UtilString.getString(self.message, actionContext);
    if(message != null){
        ac.messageLabel.setText(message);
    }
}
ac.dataObjectForm.doAction("setDataObject", ac, ["dataObject":dataObject]);
ac.dialogShell.pack();
SwtUtils.centerShell(ac.dialogShell);
SwtDialog dialog = new SwtDialog(parentShell, ac.dialogShell, ac);
return dialog.open();
#$@text#$@
    sdescriptors
    xworker.lang.actions.Actions/@GroovyAction
    sid
    run
  @/@name
  sname
  name
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  name
  @/@label
  sname
  label
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  label
  @/@dataObject
  sname
  dataObject
  sinputtype
  dataSelector
  ssize
  60
  scolspan
  2
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  dataObject
  @/@title
  sname
  title
  ssize
  60
  scolspan
  2
  sreadOnly
  false
  sinheritDescription
  false
  sdescription
  <p>对话框的标题</p>
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  title
  @/@message
  sname
  message
  sinputtype
  textarea
  scolspan
  2
  sinputattrs
  codeName= codeType= wrap=true fillBoth=true cols= rows=
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  message
  @/@DataObjects
  sname
  dataObjects
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.dataObject.DataObjects
  smany
  true
  seditCols
  2
  sinitialization
  false
  smodifier
  public
  sinheritDescription
  true
  sid
  DataObjects
  @/@thing
  sname
  dialogShell
  stext
  Message
  sNO_TRIM
  false
  sCLOSE
  true
  sTITLE
  true
  sMIN
  true
  sMAX
  true
  sBORDER
  false
  sRESIZE
  false
  sON_TOP
  false
  sTOOL
  false
  sNO_FOCUS
  false
  swidth
  -1
  sheight
  -1
  scenterScreen
  true
  spack
  false
  smaximized
  false
  sfullScreen
  false
  sH_SCROLL
  false
  sV_SCROLL
  false
  sNO_BACKGROUND
  false
  sNO_MERGE_PAINTS
  false
  sNO_REDRAW_RESIZE
  false
  sNO_RADIO_GROUP
  false
  sEMBEDDED
  false
  sDOUBLE_BUFFERED
  false
  scapture
  false
  senabled
  true
  sredraw
  true
  svisible
  true
  sdescriptors
  xworker.swt.widgets.Shell
  sid
  thing
    @/@thing/@shellGridLayout
    sname
    shellGridLayout
    smakeColumnsEqualWidth
    false
    smarginWidth
    5
    smarginHeight
    5
    smarginLeft
    0
    smarginTop
    0
    smarginRight
    0
    smarginBottom
    0
    shorizontalSpacing
    5
    sverticalSpacing
    5
    slabel
    shellGridLayout
    sdescriptors
    xworker.swt.Layouts/@GridLayout
    sid
    shellGridLayout
    @/@thing/@messageLabel
    sname
    messageLabel
    sBORDER
    false
    sstyle
    WRAP
    stype
    HORIZONTAL
    sshadow
    SHADOW_OUT
    salignment
    LEFT
    scapture
    false
    senabled
    true
    sredraw
    true
    svisible
    true
    slabel
    messageLabel
    sdescriptors
    xworker.swt.Widgets/@Label
    sid
    messageLabel
      @/@thing/@messageLabel/@messageLabelGridData
      sname
      messageLabelGridData
      sstyle
      FILL_HORIZONTAL
      shorizontalIndent
      0
      swidth
      -1
      sheight
      -1
      shorizontalAlignment
      BEGINNING
      sverticalAlignment
      CENTER
      shorizontalSpan
      1
      sverticalSpan
      1
      sgrabExcessHorizontalSpace
      false
      sgrabExcessVerticalSpace
      false
      slabel
      messageLabelGridData
      sdescriptors
      xworker.swt.layout.LayoutDatas/@GridData
      sid
      messageLabelGridData
    @/@thing/@dataObjectForm
    sname
    dataObjectForm
    sformType
    edit
    sdescriptors
    xworker.swt.app.view.swt.Items/@DataObjectForm
    sid
    dataObjectForm
      @/@thing/@dataObjectForm/@dataObjectFormGridData
      sname
      dataObjectFormGridData
      sstyle
      FILL_BOTH
      shorizontalIndent
      0
      swidth
      -1
      sheight
      -1
      shorizontalAlignment
      BEGINNING
      sverticalAlignment
      CENTER
      shorizontalSpan
      1
      sverticalSpan
      1
      sgrabExcessHorizontalSpace
      false
      sgrabExcessVerticalSpace
      false
      slabel
      dataObjectFormGridData
      sdescriptors
      xworker.swt.layout.LayoutDatas/@GridData
      sid
      dataObjectFormGridData
    @/@thing/@20484
    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
    20484
      @/@thing/@20484/@20485
      sname
      buttonCompositeGridData
      sstyle
      FILL_HORIZONTAL
      shorizontalIndent
      0
      swidth
      -1
      sheight
      -1
      shorizontalAlignment
      END
      sverticalAlignment
      CENTER
      shorizontalSpan
      1
      sverticalSpan
      1
      sgrabExcessHorizontalSpace
      false
      sgrabExcessVerticalSpace
      false
      slabel
      buttonCompositeGridData
      sdescriptors
      xworker.swt.layout.LayoutDatas/@GridData
      sid
      20485
      @/@thing/@20484/@20486
      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
      slabel
      buttonCompositeRowLayout
      sdescriptors
      xworker.swt.Layouts/@RowLayout
      sid
      20486
      @/@thing/@20484/@20487
      sname
      okButton
      stext
      确定
      stype
      SWT.PUSH
      sflat
      false
      sborder
      false
      sselected
      false
      scapture
      false
      senabled
      true
      sredraw
      true
      svisible
      true
      slabel
      okButton
      sdescriptors
      xworker.swt.Widgets/@Button
      sid
      20487
        @/@thing/@20484/@20487/@20488
        sname
        RowData
        sexclude
        false
        swidth
        80
        sheight
        -1
        slabel
        RowData
        sdescriptors
        xworker.swt.layout.LayoutDatas/@RowData
        sid
        20488
        @/@thing/@20484/@20487/@20489
        sname
        Listeners
        slabel
        Listeners
        sdescriptors
        xworker.swt.widgets.Widget/@Listeners
        sid
        20489
          @/@thing/@20484/@20487/@20489/@20490
          sname
          okButtonSelection
          stype
          Selection
          slabel
          okButtonSelection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          20490
            @/@thing/@20484/@20487/@20489/@20490/@setResult
            sname
            setResult
            sformName
            dataObjectForm
            svariable
            result
            svarScope
            Global
            sinterpretationType
            Self
            sdescriptors
            xworker.swt.app.view.swt.widgets.form.DataObjectFormActions/@FormGetDataObject
            sid
            setResult
            @/@thing/@20484/@20487/@20489/@20490/@shellDispose
            sname
            shellDispose
            scontrolList
            dialogShell
            sinterpretationType
            Self
            svarScope
            Local
            sdescriptors
            xworker.swt.actions.ControlActions/@Dispose
            sid
            shellDispose
      @/@thing/@20484/@20491
      sname
      cancelButton
      stext
      取消
      stype
      SWT.PUSH
      sflat
      false
      sborder
      false
      sselected
      false
      scapture
      false
      senabled
      true
      sredraw
      true
      svisible
      true
      slabel
      cancelButton
      sdescriptors
      xworker.swt.Widgets/@Button
      sid
      20491
        @/@thing/@20484/@20491/@20492
        sname
        RowData
        sexclude
        false
        swidth
        80
        sheight
        -1
        slabel
        RowData
        sdescriptors
        xworker.swt.layout.LayoutDatas/@RowData
        sid
        20492
        @/@thing/@20484/@20491/@20493
        sname
        Listeners
        slabel
        Listeners
        sdescriptors
        xworker.swt.widgets.Widget/@Listeners
        sid
        20493
          @/@thing/@20484/@20491/@20493/@20494
          sname
          cancelButtonSelection
          stype
          Selection
          slabel
          cancelButtonSelection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          20494
            @/@thing/@20484/@20491/@20493/@20494/@shellDispose
            sname
            shellDispose
            scontrolList
            dialogShell
            sinterpretationType
            Self
            svarScope
            Local
            sdescriptors
            xworker.swt.actions.ControlActions/@Dispose
            sid
            shellDispose
