^1640742914871
@
sname
DataObjectGridFunctions
slabel
DataObjectGridFunctions
sdescriptors
xworker.lang.MetaDescriptor3
smany
true
seditCols
2
sinitialization
false
smodifier
public
sinheritDescription
false
sdescription
<p>一些和DataObjectGrid相关的函数实现。</p>
  @/@FormStoreLoad
  sname
  FormStoreLoad
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  Store,FormPanel
  smodifier
  public
  sinheritDescription
  false
  Sdescription
#$@text#$@
<p>取一个Form的值为Store的l参数，并执行Store的load方法。</p>
<p>比如有一个查询的表单和查询结果的表格通常会使用这样的方法查询。</p>
#$@text#$@
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  FormStoreLoad
    @/@FormStoreLoad/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@FormStoreLoad/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@FormStoreLoad/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@FormStoreLoad/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
<#assign formName=data.formVarName?default("form")/>
<#if formName == "">
<#assign formName="form"/>
</#if>
<#assign sotreName=data.storeVarName?default("store")/>
<#if sotreName == "">
<#assign sotreName="store"/>
</#if>
<#if !data.getBoolean("useFormVar")>
var ${formName} = Ext.getCmp(${data.formPanelName?if_exists});
</#if>
<#if !data.getBoolean("useStoreVar")>
var ${sotreName} = Ext.StoreMgr.get(${data.storeName?if_exists});
</#if>
Ext.apply(${storeName}.baseParams, ${formName}.getForm().getValues());
${storeName}.load({params:${formName}.getForm().getValues()});
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@FormStoreLoad/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    name
    @/@FormStoreLoad/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    label
    @/@FormStoreLoad/@useFormVar
    sname
    useFormVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    sdescription
    <p>如果为true，那么忽略从formPanelId取form的步骤。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useFormVar
    @/@FormStoreLoad/@formName
    sname
    formPanelName
    slabel
    formPanelId
    sinputtype
    openWindow
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.extjs.Ext.form.FormPanel,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    formName
    @/@FormStoreLoad/@formVarName
    sname
    formVarName
    sreadOnly
    false
    sdefault
    form
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    formVarName
    @/@FormStoreLoad/@useGridVar
    sname
    useStoreVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    sdescription
    <p>如果为true，那么忽略从gridPanelId获取gridStore的步骤。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useGridVar
    @/@FormStoreLoad/@storeName
    sname
    storeName
    slabel
    storeId
    sinputtype
    openWindow
    ssize
    40
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.extjs.Ext.data.Store,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    storeName
    @/@FormStoreLoad/@gridVarName
    sname
    storeVarName
    sreadOnly
    false
    sdefault
    store
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    gridVarName
    @/@FormStoreLoad/@sswtMenus
    sname
    sswtMenus
    sdescriptors
    xworker.lang.MetaDescriptor3/@swtMenus
    sextends
    xworker.extjs.ExtJs/@sswtMenus
    sid
    sswtMenus
  @/@FormGridLaod
  sname
  FormDataObjectGridLaod
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel.DataObjectGridPanel,FormPanel
  smodifier
  public
  sinheritDescription
  false
  sdescription
  <p>从表单读取数据作为查询的参数装载DataObjectGrid数据，通常用于查询按钮的事件处理。</p>
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  FormGridLaod
    @/@FormGridLaod/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@FormGridLaod/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@FormGridLaod/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@FormGridLaod/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
<#assign formName=data.formVarName?default("form")/>
<#if formName == "">
<#assign formName="form"/>
</#if>
<#assign sotreName=data.gridStoreVarName?default("store")/>
<#if sotreName == "">
<#assign sotreName="store"/>
</#if>
<#if !data.getBoolean("useFormVar")>
var ${formName} = Ext.getCmp(${data.formPanelName?if_exists});
</#if>
<#if !data.getBoolean("useGridStoreVar")>
var ${sotreName} = Ext.getCmp(${data.gridName?if_exists}).store;
</#if>
Ext.apply(${sotreName}.baseParams, ${formName}.getForm().getValues());
${sotreName}.load({params: ${formName}.getForm().getValues()});
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@FormGridLaod/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    name
    @/@FormGridLaod/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    label
    @/@FormGridLaod/@useFormVar
    sname
    useFormVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    sdescription
    <p>如果为true，那么忽略从formPanelId取form的步骤。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useFormVar
    @/@FormGridLaod/@formName
    sname
    formPanelName
    slabel
    formPanelId
    sinputtype
    openWindow
    ssize
    40
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.extjs.Ext.form.FormPanel,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    formName
    @/@FormGridLaod/@formVarName
    sname
    formVarName
    sreadOnly
    false
    sdefault
    form
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    formVarName
    @/@FormGridLaod/@useGridVar
    sname
    useGridStoreVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    sdescription
    <p>如果为true，那么忽略从gridPanelId获取gridStore的步骤。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useGridVar
    @/@FormGridLaod/@storeName
    sname
    gridName
    slabel
    gridPanelId
    sinputtype
    openWindow
    ssize
    40
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.web.app.view.extjs.widgets.grid.DataObjectGridPanel,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    sdescription
    <p>DataObjectGrid的标识。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    storeName
    @/@FormGridLaod/@gridVarName
    sname
    gridStoreVarName
    sreadOnly
    false
    sdefault
    store
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    gridVarName
    @/@FormGridLaod/@sswtMenus
    sname
    sswtMenus
    sdescriptors
    xworker.lang.MetaDescriptor3/@swtMenus
    sextends
    xworker.extjs.ExtJs/@sswtMenus
    sid
    sswtMenus
  @/@StoreInsertRecord
  sname
  StoreInsertRecord
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  Store,FormPanel
  smodifier
  public
  sinheritDescription
  false
  sdescription
  <p>向一个Store中插入数据。</p>
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  StoreInsertRecord
    @/@StoreInsertRecord/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@StoreInsertRecord/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@StoreInsertRecord/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@StoreInsertRecord/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
<#assign formName=data.formVarName?default("form")/>
<#assign sotreName=data.storeVarName?default("store")/>
<#if !data.getBoolean("useStoreVar")>
var ${sotreName} = Ext.StoreMgr.get(${data.storeId?if_exists});
</#if>
<#assign dataName=""/>
<#if data.insertType == "blank">
<#assign dataName = "{}"/>
<#elseif data.insertType == "form">
<#if !data.getBoolean("useFormVar")>
var ${formName} = Ext.getCmp(${data.formId?if_exists}).getForm();
</#if>
<#assign dataName = "{params:${formName}.getValues()}"/>
<#else>
<#assign dataName = data.code?if_exists/>
</#if>
if(Ext.isArray(${dataName})){
    for(i=0; i<${dataName}.length; i++){
        ${sotreName}.insert(${sotreName}.getCount(), new ${sotreName}.recordType(${dataName}[i]));
    }
}else{
    ${sotreName}.insert(${sotreName}.getCount(), new ${sotreName}.recordType(${dataName}));
}
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          screateLocalVarScope
          false
          ssaveReturn
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@StoreInsertRecord/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    name
    @/@StoreInsertRecord/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    label
    @/@StoreInsertRecord/@useGridVar
    sname
    useStoreVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    sdescription
    <p>如果为true，那么忽略从gridPanelId获取gridStore的步骤。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useGridVar
    @/@StoreInsertRecord/@storeName
    sname
    storeId
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    storeName
    @/@StoreInsertRecord/@gridVarName
    sname
    storeVarName
    sreadOnly
    false
    sdefault
    store
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    gridVarName
    @/@StoreInsertRecord/@insertBlankRecord
    sname
    insertType
    sinputtype
    select
    sshowLabel
    true
    sreadOnly
    false
    sdefault
    form
    sinheritDescription
    false
    Sdescription
#$@text#$@
<p>插入记录的方式。</p>
<ul>
    <li><strong>blank</strong><br />
    插入一条空的记录。<br />
    &nbsp;</li>
    <li><strong>form</strong><br />
    通过表单获取要插入的记录。<br />
    &nbsp;</li>
    <li><strong>code</strong><br />
    要插入的记录放在code属性中。 <br />
    如果是code，代码为jason，如{id:1}</li>
</ul>
#$@text#$@
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    insertBlankRecord
      @/@StoreInsertRecord/@insertBlankRecord/@blank
      sname
      blank
      slabel
      blank
      svalue
      blank
      sdescriptors
      xworker.lang.MetaDescriptor3/@attribute/@value
      sid
      blank
      @/@StoreInsertRecord/@insertBlankRecord/@form
      sname
      form
      slabel
      form
      svalue
      form
      sdescriptors
      xworker.lang.MetaDescriptor3/@attribute/@value
      sid
      form
      @/@StoreInsertRecord/@insertBlankRecord/@code
      sname
      code
      slabel
      code
      svalue
      code
      sdescriptors
      xworker.lang.MetaDescriptor3/@attribute/@value
      sid
      code
    @/@StoreInsertRecord/@useFormVar
    sname
    useFormVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    sdescription
    <p>如果为true，那么忽略从formPanelId取form的步骤。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useFormVar
    @/@StoreInsertRecord/@formName
    sname
    formId
    sinputtype
    openWindow
    ssize
    40
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.extjs.Ext.form.FormPanel,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    formName
    @/@StoreInsertRecord/@formVarName
    sname
    formVarName
    sreadOnly
    false
    sdefault
    form
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    formVarName
    @/@StoreInsertRecord/@code
    sname
    code
    sinputtype
    textarea
    scolspan
    2
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    code
    @/@StoreInsertRecord/@sswtMenus
    sname
    sswtMenus
    sdescriptors
    xworker.lang.MetaDescriptor3/@swtMenus
    sextends
    xworker.extjs.ExtJs/@sswtMenus
    sid
    sswtMenus
  @/@GridInsertRecord
  sname
  GridInsertRecord
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel
  smodifier
  public
  sinheritDescription
  false
  Sdescription
#$@text#$@
<p>向DataObjectGrid中插入数据，是通过grid的store操作的。</p>
<p>通过insertType设定插入方式：</p>
<p>blank:插入一条空记录。</p>
<p>form:从Form表单获取数据插入。</p>
<p>code：数据为编写的代码。</p>
#$@text#$@
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  GridInsertRecord
    @/@GridInsertRecord/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@GridInsertRecord/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@GridInsertRecord/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@GridInsertRecord/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
<#assign formName=data.formVarName?default("form")/>
<#assign sotreName=data.gridVarName?default("store") + "Store"/>
<#if !data.getBoolean("useGridVar")>
var ${sotreName} = Ext.getCmp(${data.gridId}).store;
</#if>
<#assign recordName=sotreName + "Record"/>
<#if data.insertType == "blank">
var ${recordName} = {};
<#elseif data.insertType == "form">
<#if !data.getBoolean("useFormVar")>
var ${formName} = Ext.getCmp(${data.formId?if_exists}).getForm();
</#if>
var ${recordName} = ${formName}.getValues();
<#elseif data.insertType == "code">
var ${recordName} = ${data.code?if_exists};
</#if>
if(Ext.isArray(${recordName})){
    var ${recordName}S = [];
    for(i=0; i<${recordName}.length; i++){
        ${recordName}S[i] = new ${sotreName}.recordType(${recordName}[i]);
    }
    ${sotreName}.insert(${sotreName}.getCount(), ${recordName}S);
}else{
    ${sotreName}.insert(${sotreName}.getCount(), new ${sotreName}.recordType(${recordName}));
}
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          screateLocalVarScope
          false
          ssaveReturn
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@GridInsertRecord/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    name
    @/@GridInsertRecord/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    label
    @/@GridInsertRecord/@useGridVar
    sname
    useGridVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useGridVar
    @/@GridInsertRecord/@storeName
    sname
    gridId
    sinputtype
    openWindow
    ssize
    40
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.extjs.Ext.grid.GridPanel,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    storeName
    @/@GridInsertRecord/@gridVarName
    sname
    gridVarName
    sreadOnly
    false
    sdefault
    grid
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    gridVarName
    @/@GridInsertRecord/@insertBlankRecord
    sname
    insertType
    sinputtype
    select
    sreadOnly
    false
    sdefault
    form
    sinheritDescription
    false
    Sdescription
#$@text#$@
<p>插入记录的方式。</p>
<ul>
    <li><strong>blank</strong><br />
    插入一条空的记录。<br />
    &nbsp;</li>
    <li><strong>form</strong><br />
    通过表单获取要插入的记录。<br />
    &nbsp;</li>
    <li><strong>code</strong><br />
    要插入的记录放在code属性中。 <br />
    如果是code，代码为jason，如{id:1}</li>
</ul>
#$@text#$@
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    insertBlankRecord
      @/@GridInsertRecord/@insertBlankRecord/@blank
      sname
      blank
      slabel
      blank
      svalue
      blank
      sdescriptors
      xworker.lang.MetaDescriptor3/@attribute/@value
      sid
      blank
      @/@GridInsertRecord/@insertBlankRecord/@form
      sname
      form
      slabel
      form
      svalue
      form
      sdescriptors
      xworker.lang.MetaDescriptor3/@attribute/@value
      sid
      form
      @/@GridInsertRecord/@insertBlankRecord/@code
      sname
      code
      slabel
      code
      svalue
      code
      sdescriptors
      xworker.lang.MetaDescriptor3/@attribute/@value
      sid
      code
    @/@GridInsertRecord/@useFormVar
    sname
    useFormVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    sdescription
    <p>如果为true，那么忽略从formPanelId取form的步骤。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useFormVar
    @/@GridInsertRecord/@formName
    sname
    formId
    sinputtype
    openWindow
    ssize
    40
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.extjs.Ext.form.FormPanel,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    formName
    @/@GridInsertRecord/@formVarName
    sname
    formVarName
    sreadOnly
    false
    sdefault
    form
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    formVarName
    @/@GridInsertRecord/@code
    sname
    code
    sinputtype
    textarea
    scolspan
    2
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    code
    @/@GridInsertRecord/@sswtMenus
    sname
    sswtMenus
    sdescriptors
    xworker.lang.MetaDescriptor3/@swtMenus
    sextends
    xworker.extjs.ExtJs/@sswtMenus
    sid
    sswtMenus
  @/@GridDeleteRecords
  sname
  GridDeleteRecords
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel
  smodifier
  public
  sinheritDescription
  false
  sdescription
  <p>从DataObjectGrid删除记录。</p>
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  GridDeleteRecords
    @/@GridDeleteRecords/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@GridDeleteRecords/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@GridDeleteRecords/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@GridDeleteRecords/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
var xworker = Ext.ns('Ext.xworker');    
<#if !data.getBoolean("useGridVar")>
var ${data.gridVarName?default("grid")} = Ext.getCmp(${data.gridName?if_exists});
</#if>
<#if data.confirm?exists && data.confirm == "true">
xworker.util.removeGridSelectedRows(${data.gridVarName?default("grid")}, ${data.title?if_exists}, ${data.message?if_exists});
<#else>
xworker.util.removeGridSelectedRows(${data.gridVarName?default("grid")});
</#if>
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@GridDeleteRecords/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    name
    @/@GridDeleteRecords/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    label
    @/@GridDeleteRecords/@confirm
    sname
    confirm
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    true
    sinheritDescription
    false
    sdescription
    <p>删除时是否提示。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    confirm
    @/@GridDeleteRecords/@useGridVar
    sname
    useGridVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useGridVar
    @/@GridDeleteRecords/@gridName
    sname
    gridName
    slabel
    gridId
    sinputtype
    openWindow
    ssize
    40
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.extjs.Ext.grid.GridPanel,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    gridName
    @/@GridDeleteRecords/@gridVarName
    sname
    gridVarName
    sreadOnly
    false
    sdefault
    grid
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    gridVarName
    @/@GridDeleteRecords/@title
    sname
    title
    sreadOnly
    false
    sdefault
    ''
    sinheritDescription
    false
    sdescription
    <p>提示的标题。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    title
    @/@GridDeleteRecords/@message
    sname
    message
    sinputtype
    text
    ssize
    60
    scolspan
    2
    sreadOnly
    false
    sdefault
    ''
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    message
    @/@GridDeleteRecords/@sswtMenus
    sname
    sswtMenus
    sdescriptors
    xworker.lang.MetaDescriptor3/@swtMenus
    sextends
    xworker.extjs.ExtJs/@sswtMenus
    sid
    sswtMenus
  @/@GridSelectInsert
  sname
  GridInsertSelectedRecords
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel
  smodifier
  public
  sinheritDescription
  false
  Sdescription
#$@text#$@
<p>通过弹出窗口选择数据并插入到DataObjectGrid中的插如函数的代码。</p>
<p>通常在DataObjectGrid中自定义一个函数，这个函数实现插入方法。</p>
#$@text#$@
  sth_createIndex
  false
  sth_mark
  false
  sid
  GridSelectInsert
    @/@GridSelectInsert/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@GridSelectInsert/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@GridSelectInsert/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@GridSelectInsert/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
var store = Ext.StoreMgr.get('${data.gridName?if_exists}_store');
<#if data.recordsName?exists && data.recordsName != "records">
var records = ${data.recordsName};
</#if>
if(records.length){
    for(i=0; i<records.length; i++){
        store.insert(store.getCount(), 
            new store.recordType(${data.handleRecordsCode?if_exists}));
    }
}else{
    var record = records;
    store.insert(store.getCount(), 
            new store.recordType(${data.handleRecordCode?if_exists}));
}
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@GridSelectInsert/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    name
    @/@GridSelectInsert/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    label
    @/@GridSelectInsert/@gridName
    sname
    gridName
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    gridName
    @/@GridSelectInsert/@recordsName
    sname
    recordsName
    sreadOnly
    false
    sdefault
    records
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    recordsName
    @/@GridSelectInsert/@handleRecordsCode
    sname
    handleRecordsCode
    sinputtype
    textarea
    scolspan
    2
    sreadOnly
    false
    Sdefault
#$@text#$@
{
   mapId: store.mapId,
   itemId: records[i].id
}
#$@text#$@
    sinheritDescription
    false
    sdescription
    <p>处理插入多条记录时创建Record的代码，参看默认值的示例，其中store、records[i]是固定的变量。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    handleRecordsCode
    @/@GridSelectInsert/@handleRecordCode
    sname
    handleRecordCode
    sinputtype
    textarea
    scolspan
    2
    sreadOnly
    false
    Sdefault
#$@text#$@
{
   mapId: store.mapId,
   itemId: records.id
}
#$@text#$@
    sinheritDescription
    false
    sdescription
    <p>处理插入一条记录时创建Record的代码，参看默认值的示例，其中store、records是固定的变量。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    handleRecordCode
    @/@GridSelectInsert/@sswtMenus
    sname
    sswtMenus
    sdescriptors
    xworker.lang.MetaDescriptor3/@swtMenus
    sextends
    xworker.extjs.ExtJs/@sswtMenus
    sid
    sswtMenus
  @/@OpenGridItemAtTab
  sname
  OpenGridItemAtTab
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel,TabPanel.GridPanel
  smodifier
  public
  sinheritDescription
  false
  sdescription
  <p>选择DataObjectGrid中的一条记录，然后在tab中打开。</p>
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  OpenGridItemAtTab
    @/@OpenGridItemAtTab/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@OpenGridItemAtTab/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@OpenGridItemAtTab/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@OpenGridItemAtTab/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
var grid = Ext.getCmp(${data.gridName?if_exists});
var records = Ext.xworker.util.getGridSelectedRows(grid);
<#if data.confirmOnNoData?exists && data.confirmOnNoData == "true">
if(records.length <= 0){
    Ext.Msg.alert('${data.title?if_exists}', '${data.message?if_exists}');
    return;
}
</#if>

var xr = Ext.ns('Ext.xworker.remote');
var tab = Ext.getCmp(${data.tabName?if_exists});
xr.openTabItem(${data.remoteWidgetId?if_exists}, 
    'do?sc=${data.remoteWidgetPath?if_exists}',
    tab,
    ${${data.params}});
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@OpenGridItemAtTab/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    name
    @/@OpenGridItemAtTab/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    label
    @/@OpenGridItemAtTab/@gridName
    sname
    gridName
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    gridName
    @/@OpenGridItemAtTab/@tabName
    sname
    tabName
    sreadOnly
    false
    sinheritDescription
    false
    sdescription
    <p>Tab控件的名称（标识）。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    tabName
    @/@OpenGridItemAtTab/@removeWidgetId
    sname
    remoteWidgetId
    sreadOnly
    false
    sinheritDescription
    false
    sdescription
    <p>远程控件标识。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    removeWidgetId
    @/@OpenGridItemAtTab/@remoteWidgetPath
    sname
    remoteWidgetPath
    ssize
    60
    scolspan
    2
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    remoteWidgetPath
    @/@OpenGridItemAtTab/@confirmOnNoData
    sname
    confirmOnNoData
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    true
    sinheritDescription
    false
    sdescription
    <p>没有选择记录时的提示。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    confirmOnNoData
    @/@OpenGridItemAtTab/@title
    sname
    title
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    title
    @/@OpenGridItemAtTab/@message
    sname
    message
    ssize
    60
    scolspan
    2
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    message
    @/@OpenGridItemAtTab/@params
    sname
    params
    sinputtype
    textarea
    scolspan
    2
    sreadOnly
    false
    sdefault
    {id: records[0].get('id')}
    sinheritDescription
    false
    sdescription
    <p>传入到tabItem的参数。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    params
    @/@OpenGridItemAtTab/@sswtMenus
    sname
    sswtMenus
    sdescriptors
    xworker.lang.MetaDescriptor3/@swtMenus
    sextends
    xworker.extjs.ExtJs/@sswtMenus
    sid
    sswtMenus
  @/@OpenGridPopEditor
  sname
  OpenGridPopEditor
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel,Window.GridPanel
  smodifier
  public
  sinheritDescription
  false
  sdescription
  <p>选择DataObjectGrid的记录弹出一个编辑界面的代码。</p>
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  OpenGridPopEditor
    @/@OpenGridPopEditor/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@OpenGridPopEditor/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@OpenGridPopEditor/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@OpenGridPopEditor/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
var grid = Ext.getCmp(${data.gridName?if_exists});
var records = Ext.xworker.util.getGridSelectedRows(grid);
<#if data.confirmOnNoData?exists && data.confirmOnNoData == "true">
if(records.length <= 0){
    Ext.Msg.alert('${data.title?if_exists}', '${data.message?if_exists}');
    return;
}
</#if>

var xr = Ext.ns('Ext.xworker.remote');
xr.openWindow(${data.remoteWidgetId?if_exists}, 
    'do?sc=${data.remoteWidgetPath?if_exists}',
    ${data.parentField?default("null")},
    ${data.params?default("null")});
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@OpenGridPopEditor/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    name
    @/@OpenGridPopEditor/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    label
    @/@OpenGridPopEditor/@gridName
    sname
    gridName
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    gridName
    @/@OpenGridPopEditor/@parentField
    sname
    parentField
    sreadOnly
    false
    sdefault
    ''
    sinheritDescription
    false
    sdescription
    <p>可以把当前的一个变量或常量带入到打开的窗口中，在打开的窗口的控件parentField属性可以访问。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    parentField
    @/@OpenGridPopEditor/@removeWidgetId
    sname
    remoteWidgetId
    ssize
    40
    scolspan
    2
    sreadOnly
    false
    sinheritDescription
    false
    sdescription
    <p>远程控件标识。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    removeWidgetId
    @/@OpenGridPopEditor/@remoteWidgetPath
    sname
    remoteWidgetPath
    ssize
    60
    scolspan
    2
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    remoteWidgetPath
    @/@OpenGridPopEditor/@confirmOnNoData
    sname
    confirmOnNoData
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    true
    sinheritDescription
    false
    sdescription
    <p>没有选择记录时的提示。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    confirmOnNoData
    @/@OpenGridPopEditor/@title
    sname
    title
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    title
    @/@OpenGridPopEditor/@message
    sname
    message
    ssize
    60
    scolspan
    2
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    message
    @/@OpenGridPopEditor/@params
    sname
    params
    sinputtype
    textarea
    scolspan
    2
    sreadOnly
    false
    sdefault
    {id: records[0].get('id')}
    sinheritDescription
    false
    sdescription
    <p>传入到tabItem的参数。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    params
    @/@OpenGridPopEditor/@sswtMenus
    sname
    sswtMenus
    sdescriptors
    xworker.lang.MetaDescriptor3/@swtMenus
    sextends
    xworker.extjs.ExtJs/@sswtMenus
    sid
    sswtMenus
  @/@OpenGridPopWindow
  sname
  OpenGridPopWindow
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel,Window.GridPanel
  smodifier
  public
  sinheritDescription
  false
  sdescription
  <p>选择DataObjectGrid的记录弹出一个弹出窗口的代码。</p>
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  OpenGridPopWindow
    @/@OpenGridPopWindow/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@OpenGridPopWindow/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@OpenGridPopWindow/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@OpenGridPopWindow/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
var grid = Ext.getCmp(${data.gridName?if_exists});
var records = Ext.xworker.util.getGridSelectedRows(grid);
<#if data.confirmOnNoData?exists && data.confirmOnNoData == "true">
if(records.length <= 0){
    Ext.Msg.alert('${data.title?if_exists}', '${data.message?if_exists}');
    return;
}
</#if>

var xr = Ext.ns('Ext.xworker.remote');
xr.openWindow(${data.remoteWidgetId?if_exists}, 
    'do?sc=${data.remoteWidgetPath?if_exists}',
    ${data.function?if_exists},
    ${data.params?if_exists});
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@OpenGridPopWindow/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    name
    @/@OpenGridPopWindow/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    label
    @/@OpenGridPopWindow/@gridName
    sname
    gridName
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    gridName
    @/@OpenGridPopWindow/@function
    sname
    function
    sreadOnly
    false
    Sdefault
#$@text#$@
function(){
}
#$@text#$@
    sinheritDescription
    false
    sdescription
    <p>可以指定一个函数带入到打开的弹出窗口中，弹出窗口可以通过窗口对象访问parentFn访问该函数。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    function
    @/@OpenGridPopWindow/@removeWidgetId
    sname
    remoteWidgetId
    ssize
    40
    scolspan
    2
    sreadOnly
    false
    sinheritDescription
    false
    sdescription
    <p>远程控件（窗口）标识。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    removeWidgetId
    @/@OpenGridPopWindow/@remoteWidgetPath
    sname
    remoteWidgetPath
    ssize
    60
    scolspan
    2
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    remoteWidgetPath
    @/@OpenGridPopWindow/@confirmOnNoData
    sname
    confirmOnNoData
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    true
    sinheritDescription
    false
    sdescription
    <p>没有选择记录时的提示。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    confirmOnNoData
    @/@OpenGridPopWindow/@title
    sname
    title
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    title
    @/@OpenGridPopWindow/@message
    sname
    message
    ssize
    60
    scolspan
    2
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    message
    @/@OpenGridPopWindow/@params
    sname
    params
    sinputtype
    textarea
    scolspan
    2
    sreadOnly
    false
    sdefault
    {id: records[0].get('id')}
    sinheritDescription
    false
    sdescription
    <p>传入到tabItem的参数。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    params
    @/@OpenGridPopWindow/@sswtMenus
    sname
    sswtMenus
    sdescriptors
    xworker.lang.MetaDescriptor3/@swtMenus
    sextends
    xworker.extjs.ExtJs/@sswtMenus
    sid
    sswtMenus
  @/@GridBindToForm
  sname
  GridBindToForm
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel,FormPanel.GridPanel
  smodifier
  public
  sinheritDescription
  false
  sdescription
  <p>选择DataObjectGrid的记录在Form中显示。</p>
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  GridBindToForm
    @/@GridBindToForm/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@GridBindToForm/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@GridBindToForm/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@GridBindToForm/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
var grid = Ext.getCmp(${data.gridName?if_exists});
var records = Ext.xworker.util.getGridSelectedRows(grid);
<#if data.confirmOnNoData?exists && data.confirmOnNoData == "true">
if(records.length <= 0){
    Ext.Msg.alert('${data.title?if_exists}', '${data.message?if_exists}');
    return;
}
</#if>

if(records.length > 0){
   var form = Ext.getCmp(${data.formName?if_exists}).getForm();
   form.setValues(${data.values?if_exists});
}
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@GridBindToForm/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    name
    @/@GridBindToForm/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    label
    @/@GridBindToForm/@gridName
    sname
    gridName
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    gridName
    @/@GridBindToForm/@function
    sname
    formName
    sreadOnly
    false
    sinheritDescription
    false
    sdescription
    <p>可以指定一个函数带入到打开的弹出窗口中，弹出窗口可以通过窗口对象访问parentFn访问该函数。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    function
    @/@GridBindToForm/@confirmOnNoData
    sname
    confirmOnNoData
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    true
    sinheritDescription
    false
    sdescription
    <p>没有选择记录时的提示。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    confirmOnNoData
    @/@GridBindToForm/@title
    sname
    title
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    title
    @/@GridBindToForm/@message
    sname
    message
    ssize
    60
    scolspan
    2
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    message
    @/@GridBindToForm/@params
    sname
    values
    sinputtype
    textarea
    scolspan
    2
    sreadOnly
    false
    sdefault
    records[0]
    sinheritDescription
    false
    sdescription
    <p>传入到表单的数据，默认是选中的记录。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    params
    @/@GridBindToForm/@sswtMenus
    sname
    sswtMenus
    sdescriptors
    xworker.lang.MetaDescriptor3/@swtMenus
    sextends
    xworker.extjs.ExtJs/@sswtMenus
    sid
    sswtMenus
  @/@GridBindToStores
  sname
  GridBindToStoresRow
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  xworker.grid,GridPanel
  smodifier
  public
  sinheritDescription
  false
  sdescription
  <p>在行选择模式下表格和其他一个或者多个Store的联动代码。</p>
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  GridBindToStores
    @/@GridBindToStores/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@GridBindToStores/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@GridBindToStores/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@GridBindToStores/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
//表格绑定到数据仓库
var gridStore = Ext.StoreMgr.get('${data.gridId?if_exists}_store');
var rowData = gridStore.getAt(rowIndex);

var params = {<#list data.params?split(",") as ps>${ps}: rowData.get('${ps}')<#if ps_has_next>,</#if></#list>};
var storeIds = '${data.stores?if_exists}'.split(',');
for(i=0; i<storeIds.length; i++){
    var store = Ext.StoreMgr.get(storeIds[i]);
    if(store){
        Ext.apply(store.baseParams, params);
        store.load({params: params});
    }
}
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@GridBindToStores/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    name
    @/@GridBindToStores/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    label
    @/@GridBindToStores/@gridName
    sname
    gridId
    ssize
    40
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    gridName
    @/@GridBindToStores/@stores
    sname
    stores
    ssize
    60
    scolspan
    2
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    stores
    @/@GridBindToStores/@params
    sname
    params
    ssize
    60
    scolspan
    2
    sreadOnly
    false
    sinheritDescription
    false
    sdescription
    <p>要从Store数据中取的参数列表，使用逗号（,）隔开。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    params
    @/@GridBindToStores/@sswtMenus
    sname
    sswtMenus
    sdescriptors
    xworker.lang.MetaDescriptor3/@swtMenus
    sextends
    xworker.extjs.ExtJs/@sswtMenus
    sid
    sswtMenus
  @/@NewDataObjecWindow
  sname
  NewDataObjecWindow
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel
  smodifier
  public
  sinheritDescription
  false
  sdescription
  <p>打开一个新增数据的弹出窗口。</p>
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  NewDataObjecWindow
    @/@NewDataObjecWindow/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@NewDataObjecWindow/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@NewDataObjecWindow/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@NewDataObjecWindow/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
var grid = Ext.getCmp(${data.gridId?if_exists});
if(!grid){
    alert('Grid not exits, id=${data.gridId?if_exists}, path=${data.metadata.path}');
    return;
}

var xr = Ext.ns('Ext.xworker.remote');
xr.openWindow(${data.windowId?if_exists}, 
    'do?sc=${data.windowPath?if_exists}',
    ${data.function?if_exists},
    ${data.params?if_exists});
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@NewDataObjecWindow/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    name
    @/@NewDataObjecWindow/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    label
    @/@NewDataObjecWindow/@gridId
    sname
    gridId
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    gridId
    @/@NewDataObjecWindow/@windowId
    sname
    windowId
    sreadOnly
    false
    sinheritDescription
    false
    sdescription
    <p>全局唯一的标识，和远程组件的名字空间的一样。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    windowId
    @/@NewDataObjecWindow/@windowPath
    sname
    windowPath
    ssize
    60
    scolspan
    2
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    windowPath
    @/@NewDataObjecWindow/@sswtMenus
    sname
    sswtMenus
    sdescriptors
    xworker.lang.MetaDescriptor3/@swtMenus
    sextends
    xworker.extjs.ExtJs/@sswtMenus
    sid
    sswtMenus
  @/@GridToGridInserRecords
  sname
  GridToGridInserRecords
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel
  smodifier
  public
  sinheritDescription
  false
  Sdescription
#$@text#$@
<p>把一个GridPanel中选中的数据插入到另一个GridPanel中。比如在一个弹出窗口查询选择多条记录，然后把选中的记录插入到指定表格中。</p>

<p><strong>1. 开启过滤。</strong></p>

<p>&nbsp;&nbsp;&nbsp; 如果filterExistRecords=true，那么先从服务器查询那些记录服务器已经存在，那些不存在，只插入不存在的记录，其中filterCondition设置过滤的查询条件。</p>

<p><strong>2. 新纪录</strong></p>

<p>&nbsp;&nbsp;&nbsp; 过滤的条件值和要插入的数据是通过newRecord属性设置的，而不是原始数据。</p>

<p>&nbsp;&nbsp;&nbsp; 如：{id: record.get(&#39;id&#39;}，插入的原始值的变量名为record，通过recordVarName指定。</p>
#$@text#$@
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  GridToGridInserRecords
    @/@GridToGridInserRecords/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sth_createIndex
    false
    sth_mark
    false
    sid
    actions
      @/@GridToGridInserRecords/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@GridToGridInserRecords/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@GridToGridInserRecords/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
<#if !data.getBoolean("useSrcGridName")>
var ${data.srcGridVarName?if_exists} = Ext.getCmp(${data.srcGridId?if_exists});
</#if>
<#if !data.getBoolean("useTargGridVar")>
var ${data.targGridVarName?if_exists} = Ext.getCmp(${data.targGridId?if_exists});
</#if>
var ${data.targGridVarName?if_exists}_Store = ${data.targGridVarName?if_exists}.store;
var ${data.srcGridVarName?if_exists}_Records = Ext.xworker.util.getGridSelectedRows(${data.srcGridVarName?if_exists});

if(${data.srcGridVarName?if_exists}_Records.length == 0){
    return;
}
<#if data.getBoolean("filterExistsRecords")>
<#if data.filterCondition?exists && data.filterCondition != "">
var ${data.targGridVarName?if_exists}_FilterCondition = '${data.filterCondition?if_exists}';
<#else>
var ${data.targGridVarName?if_exists}_FilterCondition = '${(data.get("FilterCondition@0").getMetadata().getPath())?if_exists}';
</#if>
</#if>
if(Ext.isArray(${data.srcGridVarName?if_exists}_Records)){    
    var ${data.targGridVarName?if_exists}_records = [];
    <#if !data.getBoolean("filterExistsRecords")>   
    Ext.each(${data.srcGridVarName?if_exists}_Records, function(${data.recordVarName?if_exists}, index, allitems){
        ${data.targGridVarName?if_exists}_records[index] = new ${data.targGridVarName?if_exists}_Store.recordType(<#list data.newRecord?split("\n") as line>${line}${"\n"}            </#list>
        );        
    });    
    ${data.targGridVarName?if_exists}_Store.insert(${data.targGridVarName?if_exists}_Store.getCount(), ${data.targGridVarName?if_exists}_records);    
    <#else>
    <#if data.getBoolean("filterMessage")>
    Ext.Msg.progress(${data.title?if_exists}, String.format(${data.message?if_exists}, ${data.srcGridVarName?if_exists}_Records.length, '0','0','0'));
    </#if>
    Ext.each(${data.srcGridVarName?if_exists}_Records, function(${data.recordVarName?if_exists}, index, allitems){
        ${data.targGridVarName?if_exists}_records[index] = <#list data.newRecord?split("\n") as line>${line}${"\n"}            </#list>;
    });  
    var xworker = Ext.ns('Ext.xworker');    
    xworker.util.remoteEach({
        url: 'do?sc=xworker.web.app.view.extjs.server.DataObjectStore/@read&dataObjectPath=${data.dataObject?if_exists}&conditionPath=' + ${data.targGridVarName?if_exists}_FilterCondition,
        records: ${data.targGridVarName?if_exists}_records,
        store: ${data.targGridVarName?if_exists}_Store,
        successCnt: 0,
        failureCnt: 0,
        errorCnt: 0,
        handledCnt: 0,
        totalCount: ${data.srcGridVarName?if_exists}_Records.length,
        insertRecords: [],
        success: function(options, response){
            options.handledCnt = options.handledCnt + 1;
            
            if(response.result.totalCount <= 0){
                options.insertRecords[options.insertRecords.length] = new options.store.recordType(options.item);
                
                <#if data.getBoolean("filterMessage")>
                options.successCnt = options.successCnt + 1;
			    Ext.Msg.updateProgress((options.handledCnt / options.totalCount), '', String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
			    </#if>
            }else{
                <#if data.getBoolean("filterMessage")>
                options.failureCnt = options.failureCnt + 1;
			    Ext.Msg.updateProgress((options.handledCnt / options.totalCount), '', String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
			    </#if>
            }
            
            if(options.index >= options.totalCount - 1){
                if(options.insertRecords.length > 0){
                    options.store.insert(options.store.getCount(), options.insertRecords);
                }
                Ext.Msg.hide();
                Ext.Msg.alert(${data.title?if_exists}, String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
            }
        },
        
        failure: function(options, response){
            options.handledCnt = options.handledCnt + 1;
            options.errorCnt = options.errorCnt + 1;
            <#if data.getBoolean("filterMessage")>
		    Ext.Msg.updateProgress((options.handledCnt / options.totalCount), '', String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
		    </#if>
            if(options.index >= options.totalCount - 1){
                Ext.Msg.hide();
                Ext.Msg.alert(${data.title?if_exists}, String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
            }
        }        
    });    
    </#if>
}else{
    var ${data.recordVarName?if_exists} = ${data.srcGridVarName?if_exists}_Records;
    <#if !data.getBoolean("filterExistsRecords")>    
    ${data.targGridVarName?if_exists}_Store.insert(${data.targGridVarName?if_exists}_Store.getCount(), 
        new ${data.targGridVarName?if_exists}_Store.recordType(<#list data.newRecord?split("\n") as line>${line}            </#list>
    ));
    <#else>
    ${data.recordVarName?if_exists} = <#list data.newRecord?split("\n") as line>${line}
                </#list>;
    <#if data.getBoolean("filterMessage")>
    Ext.Msg.progress(${data.title?if_exists}, String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, '1','0','0'));
    </#if>
    var xworker = Ext.ns('Ext.xworker');    
    xworker.util.remoteEach({
        url: 'do?sc=xworker.web.app.view.extjs.server.DataObjectStore/@read&dataObjectPath=${data.dataObject?if_exists}&conditionPath=' + ${data.targGridVarName?if_exists}_FilterCondition,
        records: ${data.recordVarName?if_exists},
        store: ${data.targGridVarName?if_exists}_Store,
        totalCount: 1,
        insertRecords: [],
        success: function(options, response){
            options.handledCnt = options.handledCnt + 1;
            if(response.result.totalCount <= 0){
                var ${data.recordVarName?if_exists} = options.item;
                options.insertRecords[options.insertRecords.length] = new options.store.recordType(options.item);
                <#if data.getBoolean("filterMessage")>
                options.successCnt = options.successCnt + 1;
			    Ext.Msg.updateProgress((options.handledCnt / options.totalCount), '', String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
			    </#if>
            }else{
                <#if data.getBoolean("filterMessage")>
                options.failureCnt = options.failureCnt + 1;
			    Ext.Msg.updateProgress((options.handledCnt / options.totalCount), '', String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
			    </#if>
            }
            
            if(options.index >= options.totalCount - 1 && options.insertRecords.length > 0){                
                options.store.insert(options.store.getCount(), options.insertRecords);
            }
            
            Ext.Msg.hide();
            Ext.Msg.alert(${data.title?if_exists}, String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
        },
        
        failure: function(options, response){
            options.handledCnt = options.handledCnt + 1;
            options.errorCnt = options.errorCnt + 1;
            
            Ext.Msg.hide();
            Ext.Msg.alert(${data.title?if_exists}, String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
        }        
    });    
    </#if>
}
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          ssaveReturn
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@GridToGridInserRecords/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    name
    @/@GridToGridInserRecords/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    label
    @/@GridToGridInserRecords/@useSrcGridName
    sname
    useSrcGridVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useSrcGridName
    @/@GridToGridInserRecords/@srcGridId
    sname
    srcGridId
    sinputtype
    openWindow
    ssize
    40
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.extjs.Ext.grid.GridPanel,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    srcGridId
    @/@GridToGridInserRecords/@srcGridVarName
    sname
    srcGridVarName
    sreadOnly
    false
    sdefault
    srcGrid
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    srcGridVarName
    @/@GridToGridInserRecords/@useTargGridName
    sname
    useTargGridVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useTargGridName
    @/@GridToGridInserRecords/@targGridId
    sname
    targGridId
    sinputtype
    openWindow
    ssize
    40
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.extjs.Ext.grid.GridPanel,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    targGridId
    @/@GridToGridInserRecords/@targGridVarName
    sname
    targGridVarName
    sreadOnly
    false
    sdefault
    targGrid
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    targGridVarName
    @/@GridToGridInserRecords/@recordsVarName
    sname
    recordVarName
    sreadOnly
    false
    sdefault
    record
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    recordsVarName
    @/@GridToGridInserRecords/@newRecord
    sname
    newRecord
    sinputtype
    textarea
    sreadOnly
    false
    sdefault
    record
    sinheritDescription
    true
    Sdescription
#$@text#$@
<p>在把源表格的数据插入到目标表格时会把表格的数据以&lt;recordVarName&gt;保存，newRecord应该提供一个转化目标表格数据到新表格数据的方法。</p>
<p>如{</p>
<p>id: record.id</p>
<p>}</p>
#$@text#$@
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    newRecord
    @/@GridToGridInserRecords/@filteExistsRecords
    sname
    filterExistsRecords
    sinputtype
    truefalse
    sgroup
    Filter
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    sdescription
    <p>如果为true，那么在插入数据前先提交服务器校验数据是否存在，如果存在则不插入，否则插入数据。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    filteExistsRecords
    @/@GridToGridInserRecords/@dataObject
    sname
    dataObject
    sinputtype
    dataSelector
    ssize
    60
    scolspan
    2
    sgroup
    Filter
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    dataObject
    @/@GridToGridInserRecords/@filteCondition
    sname
    filterCondition
    sinputtype
    dataSelector
    ssize
    60
    scolspan
    2
    sgroup
    Filter
    sreadOnly
    false
    sinheritDescription
    false
    sdescription
    <p>过滤校验数据是否存在的查询条件。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    filteCondition
    @/@GridToGridInserRecords/@FilterCondition
    sname
    FilterCondition
    sdescriptors
    xworker.lang.MetaDescriptor3/@thing
    sextends
    xworker.dataObject.query.Condition
    smany
    true
    seditCols
    2
    sinitialization
    false
    smodifier
    public
    sinheritDescription
    false
    sdescription
    <p>过滤重复数据的查询条件，插入记录前验证记录是否符合条件。</p>
    sth_createIndex
    false
    sth_mark
    false
    sid
    FilterCondition
    @/@GridToGridInserRecords/@filterMessage
    sname
    filterMessage
    sinputtype
    truefalse
    sgroup
    Filter
    sreadOnly
    false
    sdefault
    true
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    filterMessage
    @/@GridToGridInserRecords/@title
    sname
    title
    sgroup
    Filter
    sreadOnly
    false
    sdefault
    '过滤重复数据'
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    title
    @/@GridToGridInserRecords/@messsage
    sname
    message
    ssize
    60
    sgroup
    Filter
    sreadOnly
    false
    sdefault
    '总记录{0}条，可插入{1}条，重复{2}条，错误{3}条。'
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    messsage
    @/@GridToGridInserRecords/@sswtMenus
    sname
    sswtMenus
    sdescriptors
    xworker.lang.MetaDescriptor3/@swtMenus
    sextends
    xworker.extjs.ExtJs/@sswtMenus
    sid
    sswtMenus
  @/@GridSelectRows
  sname
  GridSelectRows
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel
  smodifier
  public
  sinheritDescription
  false
  sdescription
  <p>生成选择一个Grid选中的记录的代码。</p>
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  GridSelectRows
    @/@GridSelectRows/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@GridSelectRows/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@GridSelectRows/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@GridSelectRows/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
<#if !data.getBoolean("xworkerExists")>
var xworker = Ext.ns('Ext.xworker');   
</#if> 
<#if !data.getBoolean("useGridVar")>
var ${data.gridVarName?default("grid")} = Ext.getCmp(${data.gridName?if_exists});
</#if>
var ${data.dataVarName?default("datas")} = xworker.util.getGridSelectedRows(${data.gridVarName?default("grid")});
<#if data.getBoolean("returnOnNoRowSelected")>
if(${data.dataVarName?default("datas")}.length == 0){
<#if data.getBoolean("alertOnNoRows")>
    Ext.Msg.alert(${data.noRowsAlertTitle?default("提示")}, ${data.noRowsAlertMessage?default("请先选择一条记录！")});
</#if>    
    return;
}
</#if>
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@GridSelectRows/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    name
    @/@GridSelectRows/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    label
    @/@GridSelectRows/@useGridVar
    sname
    useGridVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useGridVar
    @/@GridSelectRows/@gridName
    sname
    gridName
    slabel
    gridId
    sinputtype
    openWindow
    ssize
    40
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.extjs.Ext.grid.GridPanel,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    gridName
    @/@GridSelectRows/@gridVarName
    sname
    gridVarName
    sreadOnly
    false
    sdefault
    grid
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    gridVarName
    @/@GridSelectRows/@xworkerExists
    sname
    xworkerExists
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    Sdescription
#$@text#$@
<p>在很多方法里都使用到了XWorer的脚本，一般xworker脚本脚本的代码是：</p>
<p>var xworker = Ext.ns('Ext.xworker');</p>
<p>如果前面的代码已经有这一句了，那么可以设置xworkerExists为true，这样就不用重复生成这一句代码了。</p>
#$@text#$@
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    xworkerExists
    @/@GridSelectRows/@dataVarName
    sname
    dataVarName
    sreadOnly
    false
    sdefault
    datas
    sinheritDescription
    false
    sdescription
    <p>获取的数据的变量名。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    dataVarName
    @/@GridSelectRows/@returnOnNoRowSelected
    sname
    returnOnNoRowSelected
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    sdescription
    <p>如果没有记录选中提示一个返回框。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    returnOnNoRowSelected
    @/@GridSelectRows/@alertOnNoRows
    sname
    alertOnNoRows
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    true
    sinheritDescription
    false
    sdescription
    <p>当returnOnNoRowSelected=true时生效。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    alertOnNoRows
    @/@GridSelectRows/@noRowsAlertTitle
    sname
    noRowsAlertTitle
    sreadOnly
    false
    sdefault
    '提示'
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    noRowsAlertTitle
    @/@GridSelectRows/@noRowsAlertMessage
    sname
    noRowsAlertMessage
    sreadOnly
    false
    sdefault
    '请先选择一条记录！'
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    noRowsAlertMessage
  @/@GridLoadRecords
  sname
  GridLoadRecords
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel
  smodifier
  public
  sinheritDescription
  false
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  GridLoadRecords
    @/@GridLoadRecords/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@GridLoadRecords/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@GridLoadRecords/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@GridLoadRecords/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
<#assign sotreName=data.gridStoreVarName?default("store")/>
<#if sotreName == "">
<#assign sotreName="store"/>
</#if>
<#if !data.getBoolean("useGridStoreVar")>
var ${sotreName} = Ext.getCmp(${data.gridName?if_exists}).store;
</#if>
var ${sotreName}Params = ${data.params?default("{}")};
Ext.apply(${sotreName}.baseParams, ${sotreName}Params );
${sotreName}.load({params: ${sotreName}Params});
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@GridLoadRecords/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    name
    @/@GridLoadRecords/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    label
    @/@GridLoadRecords/@useGridVar
    sname
    useGridStoreVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    sdescription
    <p>如果为true，那么忽略从gridPanelId获取gridStore的步骤。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useGridVar
    @/@GridLoadRecords/@storeName
    sname
    gridName
    slabel
    gridPanelId
    sinputtype
    openWindow
    ssize
    40
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.web.app.view.extjs.widgets.grid.DataObjectGridPanel,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    sdescription
    <p>DataObjectGrid的标识。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    storeName
    @/@GridLoadRecords/@gridVarName
    sname
    gridStoreVarName
    sreadOnly
    false
    sdefault
    store
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    gridVarName
    @/@GridLoadRecords/@params
    sname
    params
    sinputtype
    textarea
    sreadOnly
    false
    sdefault
    {}
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    params
  @/@GridReloadRecods
  sname
  GridReloadRecords
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel
  smodifier
  public
  sinheritDescription
  false
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  GridReloadRecods
    @/@GridReloadRecods/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@GridReloadRecods/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@GridReloadRecods/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@GridReloadRecods/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
<#assign sotreName=data.gridStoreVarName?default("store")/>
<#if sotreName == "">
<#assign sotreName="store"/>
</#if>
<#if !data.getBoolean("useGridStoreVar")>
var ${sotreName} = Ext.getCmp(${data.gridName?if_exists}).store;
</#if>
${sotreName}.reload();
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@GridReloadRecods/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    name
    @/@GridReloadRecods/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    label
    @/@GridReloadRecods/@useGridVar
    sname
    useGridStoreVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    sdescription
    <p>如果为true，那么忽略从gridPanelId获取gridStore的步骤。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useGridVar
    @/@GridReloadRecods/@storeName
    sname
    gridName
    slabel
    gridPanelId
    sinputtype
    openWindow
    ssize
    40
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.web.app.view.extjs.widgets.grid.DataObjectGridPanel,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    sdescription
    <p>DataObjectGrid的标识。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    storeName
    @/@GridReloadRecods/@gridVarName
    sname
    gridStoreVarName
    sreadOnly
    false
    sdefault
    store
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    gridVarName
  @/@FormInsertGrid
  sname
  FormInsertGrid
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel,FormPanel.GridPanel
  smodifier
  public
  sinheritDescription
  false
  Sdescription
#$@text#$@
<p>向DataObjectGrid中插入数据，是通过grid的store操作的。</p>
<p>通过insertType设定插入方式：</p>
<p>blank:插入一条空记录。</p>
<p>form:从Form表单获取数据插入。</p>
<p>code：数据为编写的代码。</p>
#$@text#$@
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  FormInsertGrid
    @/@FormInsertGrid/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sid
    actions
      @/@FormInsertGrid/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@FormInsertGrid/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@FormInsertGrid/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
<#assign formName=data.formVarName?default("form")/>
<#assign sotreName=data.gridVarName?default("store") + "Store"/>
<#if !data.getBoolean("useGridVar")>
var ${sotreName} = Ext.getCmp(${data.gridId}).store;
</#if>
<#assign recordName=sotreName + "Record"/>
<#if !data.getBoolean("useFormVar")>
var ${formName} = Ext.getCmp(${data.formId?if_exists}).getForm();
</#if>
var ${recordName} = ${formName}.getValues();
${sotreName}.insert(${sotreName}.getCount(), new ${sotreName}.recordType(${recordName}));
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@FormInsertGrid/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    name
    @/@FormInsertGrid/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    label
    @/@FormInsertGrid/@useGridVar
    sname
    useGridVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useGridVar
    @/@FormInsertGrid/@storeName
    sname
    gridId
    sinputtype
    openWindow
    ssize
    40
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.extjs.Ext.grid.GridPanel,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    storeName
    @/@FormInsertGrid/@gridVarName
    sname
    gridVarName
    sreadOnly
    false
    sdefault
    grid
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    gridVarName
    @/@FormInsertGrid/@useFormVar
    sname
    useFormVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useFormVar
    @/@FormInsertGrid/@formName
    sname
    formId
    sinputtype
    openWindow
    ssize
    40
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.extjs.Ext.form.FormPanel,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    formName
    @/@FormInsertGrid/@formVarName
    sname
    formVarName
    sreadOnly
    false
    sdefault
    form
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    formVarName
    @/@FormInsertGrid/@sswtMenus
    sname
    sswtMenus
    sdescriptors
    xworker.lang.MetaDescriptor3/@swtMenus
    sextends
    xworker.extjs.ExtJs/@sswtMenus
    sid
    sswtMenus
  @/@GridInsertRecordsWithFilter
  sname
  GridInsertRecordsWithFilter
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel
  smodifier
  public
  sinheritDescription
  false
  Sdescription
#$@text#$@
<div id="content">
<p>把数据插入到一个GridPanel中，数据通过recordsName指定。</p>

<p><strong>1. 开启过滤</strong></p>

<p>&nbsp;&nbsp;&nbsp; 如果filterExistRecords=true，那么先从服务器查询那些记录服务器已经存在，那些不存在，只插入不存在的记录，其中filterCondition设置过滤的查询条件。</p>

<p><strong>2. 新纪录</strong></p>

<p>&nbsp;&nbsp;&nbsp; 过滤的条件值和要插入的数据是通过newRecord属性设置的，而不是原始数据。</p>

<p>&nbsp;&nbsp;&nbsp; 如：{id: record.get(&#39;id&#39;}，插入的原始值的变量名为record，通过recordVarName指定。</p>

<p><span style="color:rgb(255, 0, 0)"><strong>3.过滤条件</strong></span></p>

<p>&nbsp;&nbsp;&nbsp; 过滤条件的路径最好设置到属性中，发现在DataObjectGrid中子节点设置的条件路径会变成临时的，在生成JavaScript代码是。</p>

<p>&nbsp;</p>
</div>
#$@text#$@
  snotXmlAttribute
  false
  sjson_isArray
  false
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_mark
  false
  sid
  GridInsertRecordsWithFilter
    @/@GridInsertRecordsWithFilter/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sth_createIndex
    false
    sth_mark
    false
    sid
    actions
      @/@GridInsertRecordsWithFilter/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@GridInsertRecordsWithFilter/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@GridInsertRecordsWithFilter/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
<#if !data.getBoolean("useTargGridVar")>
var ${data.targGridVarName?if_exists} = Ext.getCmp(${data.targGridId?if_exists});
</#if>
var ${data.targGridVarName?if_exists}_Store = ${data.targGridVarName?if_exists}.store;

<#if data.getBoolean("filterExistsRecords")>
<#if data.filterCondition?exists && data.filterCondition != "">
var ${data.targGridVarName?if_exists}_FilterCondition = '${data.filterCondition?if_exists}';
<#else>
var ${data.targGridVarName?if_exists}_FilterCondition = '${(data.get("FilterCondition@0").getMetadata().getPath())?if_exists}';
</#if>
</#if>
if(Ext.isArray(${data.recordsName?if_exists})){    
    var ${data.targGridVarName?if_exists}_records = [];
    <#if !data.getBoolean("filterExistsRecords")>   
    Ext.each(${data.recordsName?if_exists}, function(${data.recordVarName?if_exists}, index, allitems){
        ${data.targGridVarName?if_exists}_records[index] = new ${data.targGridVarName?if_exists}_Store.recordType(<#list data.newRecord?split("\n") as line>${line}${"\n"}            </#list>
        );        
    });    
    ${data.targGridVarName?if_exists}_Store.insert(${data.targGridVarName?if_exists}_Store.getCount(), ${data.targGridVarName?if_exists}_records);    
    <#else>
    <#if data.getBoolean("filterMessage")>
    Ext.Msg.progress(${data.title?if_exists}, String.format(${data.message?if_exists}, ${data.recordsName?if_exists}.length, '0','0','0'));
    </#if>
    Ext.each(${data.recordsName?if_exists}, function(${data.recordVarName?if_exists}, index, allitems){
        ${data.targGridVarName?if_exists}_records[index] = <#list data.newRecord?split("\n") as line>${line}${"\n"}            </#list>;
    });  
    var xworker = Ext.ns('Ext.xworker');    
    xworker.util.remoteEach({
        url: 'do?sc=xworker.web.app.view.extjs.server.DataObjectStore/@read&dataObjectPath=${data.dataObject?if_exists}&conditionPath=' + ${data.targGridVarName?if_exists}_FilterCondition,
        records: ${data.targGridVarName?if_exists}_records,
        store: ${data.targGridVarName?if_exists}_Store,
        successCnt: 0,
        failureCnt: 0,
        errorCnt: 0,
        handledCnt: 0,
        totalCount: ${data.recordsName?if_exists}.length,
        insertRecords: [],
        success: function(options, response){
            options.handledCnt = options.handledCnt + 1;
            
            if(response.result.totalCount <= 0){
                options.insertRecords[options.insertRecords.length] = new options.store.recordType(options.item);
                
                <#if data.getBoolean("filterMessage")>
                options.successCnt = options.successCnt + 1;
			    Ext.Msg.updateProgress((options.handledCnt / options.totalCount), '', String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
			    </#if>
            }else{
                <#if data.getBoolean("filterMessage")>
                options.failureCnt = options.failureCnt + 1;
			    Ext.Msg.updateProgress((options.handledCnt / options.totalCount), '', String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
			    </#if>
            }
            
            if(options.index >= options.totalCount - 1){
                if(options.insertRecords.length > 0){
                    options.store.insert(options.store.getCount(), options.insertRecords);
                }
                Ext.Msg.hide();
                Ext.Msg.alert(${data.title?if_exists}, String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
            }
        },
        
        failure: function(options, response){
            options.handledCnt = options.handledCnt + 1;
            options.errorCnt = options.errorCnt + 1;
            <#if data.getBoolean("filterMessage")>
		    Ext.Msg.updateProgress((options.handledCnt / options.totalCount), '', String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
		    </#if>
            if(options.index >= options.totalCount - 1){
                Ext.Msg.hide();
                Ext.Msg.alert(${data.title?if_exists}, String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
            }
        }        
    });    
    </#if>
}else{
    var ${data.recordVarName?if_exists} = ${data.recordsName?if_exists};
    <#if !data.getBoolean("filterExistsRecords")>    
    ${data.targGridVarName?if_exists}_Store.insert(${data.targGridVarName?if_exists}_Store.getCount(), 
        new ${data.targGridVarName?if_exists}_Store.recordType(<#list data.newRecord?split("\n") as line>${line}            </#list>
    ));
    <#else>
    ${data.recordVarName?if_exists} = <#list data.newRecord?split("\n") as line>${line}
                </#list>;
    <#if data.getBoolean("filterMessage")>
    Ext.Msg.progress(${data.title?if_exists}, String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, '1','0','0'));
    </#if>
    var xworker = Ext.ns('Ext.xworker');    
    xworker.util.remoteEach({
        url: 'do?sc=xworker.web.app.view.extjs.server.DataObjectStore/@read&dataObjectPath=${data.dataObject?if_exists}&conditionPath=' + ${data.targGridVarName?if_exists}_FilterCondition,
        records: ${data.recordVarName?if_exists},
        store: ${data.targGridVarName?if_exists}_Store,
        totalCount: 1,
        insertRecords: [],
        success: function(options, response){
            options.handledCnt = options.handledCnt + 1;
            if(response.result.totalCount <= 0){
                var ${data.recordVarName?if_exists} = options.item;
                options.insertRecords[options.insertRecords.length] = new options.store.recordType(options.item);
                <#if data.getBoolean("filterMessage")>
                options.successCnt = options.successCnt + 1;
			    Ext.Msg.updateProgress((options.handledCnt / options.totalCount), '', String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
			    </#if>
            }else{
                <#if data.getBoolean("filterMessage")>
                options.failureCnt = options.failureCnt + 1;
			    Ext.Msg.updateProgress((options.handledCnt / options.totalCount), '', String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
			    </#if>
            }
            
            if(options.index >= options.totalCount - 1 && options.insertRecords.length > 0){                
                options.store.insert(options.store.getCount(), options.insertRecords);
            }
            
            Ext.Msg.hide();
            Ext.Msg.alert(${data.title?if_exists}, String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
        },
        
        failure: function(options, response){
            options.handledCnt = options.handledCnt + 1;
            options.errorCnt = options.errorCnt + 1;
            
            Ext.Msg.hide();
            Ext.Msg.alert(${data.title?if_exists}, String.format(${data.message?if_exists}, ${data.targGridVarName?if_exists}_records.length, options.successCnt,options.failureCnt,options.errorCnt));
        }        
    });    
    </#if>
}
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          ssaveReturn
          false
          sdisableGlobalContext
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@GridInsertRecordsWithFilter/@name
    sname
    name
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    name
    @/@GridInsertRecordsWithFilter/@label
    sname
    label
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    label
    @/@GridInsertRecordsWithFilter/@recordsName
    sname
    recordsName
    ssize
    40
    scolspan
    2
    sreadOnly
    false
    sdefault
    datas
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    recordsName
    @/@GridInsertRecordsWithFilter/@useTargGridName
    sname
    useTargGridVar
    sinputtype
    truefalse
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    useTargGridName
    @/@GridInsertRecordsWithFilter/@targGridId
    sname
    targGridId
    sinputtype
    openWindow
    ssize
    40
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.extjs.Ext.grid.GridPanel,returnType=attribute
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    targGridId
    @/@GridInsertRecordsWithFilter/@targGridVarName
    sname
    targGridVarName
    sreadOnly
    false
    sdefault
    targGrid
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    targGridVarName
    @/@GridInsertRecordsWithFilter/@recordsVarName
    sname
    recordVarName
    sreadOnly
    false
    sdefault
    record
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    recordsVarName
    @/@GridInsertRecordsWithFilter/@newRecord
    sname
    newRecord
    sinputtype
    textarea
    sreadOnly
    false
    sdefault
    record
    sinheritDescription
    true
    Sdescription
#$@text#$@
<p>在把源表格的数据插入到目标表格时会把表格的数据以&lt;recordVarName&gt;保存，newRecord应该提供一个转化目标表格数据到新表格数据的方法。</p>
<p>如{</p>
<p>id: record.id</p>
<p>}</p>
#$@text#$@
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    newRecord
    @/@GridInsertRecordsWithFilter/@filteExistsRecords
    sname
    filterExistsRecords
    sinputtype
    truefalse
    sgroup
    Filter
    sreadOnly
    false
    sdefault
    false
    sinheritDescription
    false
    sdescription
    <p>如果为true，那么在插入数据前先提交服务器校验数据是否存在，如果存在则不插入，否则插入数据。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    filteExistsRecords
    @/@GridInsertRecordsWithFilter/@dataObject
    sname
    dataObject
    sinputtype
    dataSelector
    ssize
    60
    scolspan
    2
    sgroup
    Filter
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    dataObject
    @/@GridInsertRecordsWithFilter/@filteCondition
    sname
    filterCondition
    sinputtype
    dataSelector
    ssize
    60
    scolspan
    2
    sgroup
    Filter
    sreadOnly
    false
    sinheritDescription
    false
    sdescription
    <p>过滤校验数据是否存在的查询条件。</p>
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    filteCondition
    @/@GridInsertRecordsWithFilter/@FilterCondition
    sname
    FilterCondition
    sdescriptors
    xworker.lang.MetaDescriptor3/@thing
    sextends
    xworker.dataObject.query.Condition
    smany
    true
    seditCols
    2
    sinitialization
    false
    smodifier
    public
    sinheritDescription
    false
    sdescription
    <p>过滤重复数据的查询条件，插入记录前验证记录是否符合条件。</p>
    sth_createIndex
    false
    sth_mark
    false
    sid
    FilterCondition
    @/@GridInsertRecordsWithFilter/@filterMessage
    sname
    filterMessage
    sinputtype
    truefalse
    sgroup
    Filter
    sreadOnly
    false
    sdefault
    true
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    filterMessage
    @/@GridInsertRecordsWithFilter/@title
    sname
    title
    sgroup
    Filter
    sreadOnly
    false
    sdefault
    '过滤重复数据'
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    title
    @/@GridInsertRecordsWithFilter/@messsage
    sname
    message
    ssize
    60
    sgroup
    Filter
    sreadOnly
    false
    sdefault
    '总记录{0}条，可插入{1}条，重复{2}条，错误{3}条。'
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_mark
    false
    sid
    messsage
    @/@GridInsertRecordsWithFilter/@sswtMenus
    sname
    sswtMenus
    sdescriptors
    xworker.lang.MetaDescriptor3/@swtMenus
    sextends
    xworker.extjs.ExtJs/@sswtMenus
    sid
    sswtMenus
  @/@OpenNewRecordWindow
  sname
  OpenNewRecordWindow
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel
  smodifier
  public
  sinheritDescription
  false
  sdescription
  <p>打开一个新建数据的窗口。</p>
  snotXmlAttribute
  false
  sjson_isArray
  false
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  OpenNewRecordWindow
    @/@OpenNewRecordWindow/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@OpenNewRecordWindow/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@OpenNewRecordWindow/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@OpenNewRecordWindow/@actions/@toJavaScriptCode1/@actions/@init
          sname
          init
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          svarScope
          Local
          sdisableGlobalContext
          false
          Scode
#$@text#$@
def l = actionContext.l();
l.put("nameSpace", "NewRecordWindow-" + data.dataObject.hashCode());
#$@text#$@
          sinterpretationType
          Action
          screateLocalVarScope
          false
          ssaveReturn
          false
          sdebugLog
          false
          sdescriptors
          xworker.lang.actions.Actions/@GroovyAction
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          init
          @/@OpenNewRecordWindow/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
var grid = Ext.getCmp(${data.gridId?if_exists});
if(!grid){
    alert('Grid not exits, path=${data.metadata.path}');
    return;
}

var url = "do?sc=xworker.web.app.view.extjs.server.DataObjectWindows/@NewRecordWindow";
url = url + "&gridId=${data.gridId?if_exists}";
url = url + "&dataObject=${data.dataObject?if_exists}";
url = url + "&width=${data.width?if_exists}";
url = url + "&height=${data.height?if_exists}";
var windowsId = '';

var xr = Ext.ns('Ext.xworker.remote');
xr.openWindow('${nameSpace?if_exists}Window', 
    url,
    null,
    ${data.params?if_exists});
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          screateLocalVarScope
          false
          ssaveReturn
          false
          sdisableGlobalContext
          false
          sdebugLog
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@OpenNewRecordWindow/@name
    sname
    name
    sshowLabel
    true
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    name
    @/@OpenNewRecordWindow/@label
    sname
    label
    sshowLabel
    true
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    label
    @/@OpenNewRecordWindow/@gridId
    sname
    gridId
    sinputtype
    openWindow
    ssize
    40
    sshowLabel
    true
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.extjs.Ext.grid.GridPanel,seperator=%2C,returnType=attribute,append=false
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    gridId
    @/@OpenNewRecordWindow/@dataObject
    sname
    dataObject
    sinputtype
    dataSelector
    ssize
    60
    sshowLabel
    true
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    dataObject
    @/@OpenNewRecordWindow/@width
    sname
    width
    sshowLabel
    true
    sreadOnly
    false
    sdefault
    640
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    width
    @/@OpenNewRecordWindow/@height
    sname
    height
    sinputtype
    text
    sshowLabel
    true
    sreadOnly
    false
    sdefault
    640
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    height
    @/@OpenNewRecordWindow/@params
    sname
    params
    sinputtype
    textarea
    sshowLabel
    true
    sreadOnly
    false
    Sdefault
#$@text#$@
{
}
#$@text#$@
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    params
  @/@OpenEditRecordWindow
  sname
  OpenEditRecordWindow
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  smany
  true
  seditCols
  2
  sinitialization
  false
  sgroup
  GridPanel
  smodifier
  public
  sinheritDescription
  false
  sdescription
  <p>打开一个编辑数据的窗口。</p>
  snotXmlAttribute
  false
  sjson_isArray
  false
  sth_createIndex
  true
  sth_registThing
  child|xworker.extjs.Function
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  OpenEditRecordWindow
    @/@OpenEditRecordWindow/@actions
    sname
    actions
    slabel
    actions
    sdescriptors
    xworker.lang.MetaDescriptor3/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@OpenEditRecordWindow/@actions/@toJavaScriptCode1
      sname
      toJavaScriptCode
      schangeSelf
      true
      sselfVarName
      data
      sinterpretationType
      Self
      svarScope
      Local
      sdescriptors
      xworker.lang.actions.Actions/@ActionGroup
      sid
      toJavaScriptCode1
        @/@OpenEditRecordWindow/@actions/@toJavaScriptCode1/@actions
        sname
        actions
        sdescriptors
        xworker.lang.actions.Begin/@actions
        sid
        actions
          @/@OpenEditRecordWindow/@actions/@toJavaScriptCode1/@actions/@init
          sname
          init
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          svarScope
          Local
          sdisableGlobalContext
          false
          Scode
#$@text#$@
def l = actionContext.l();
l.put("nameSpace", "EditRecordWindow-" + data.dataObject.hashCode());
#$@text#$@
          sinterpretationType
          Action
          screateLocalVarScope
          false
          ssaveReturn
          false
          sdebugLog
          false
          sdescriptors
          xworker.lang.actions.Actions/@GroovyAction
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          init
          @/@OpenEditRecordWindow/@actions/@toJavaScriptCode1/@actions/@toJavaScriptCode
          sname
          toTemplate
          stype
          freemarker
          svarScope
          Local
          stemplateEncoding
          UTF-8
          soutputEncoding
          UTF-8
          StemplateCode
#$@text#$@
var xworker = Ext.ns('Ext.xworker');   
var grid = Ext.getCmp(${data.gridId?if_exists});
if(!grid){
    alert('Grid not exits, path=${data.metadata.path}');
    return;
}

var datas = xworker.util.getGridSelectedRows(grid);
if(!datas || datas.length == 0){
    alert("请先选择一条记录。");
    return;
}

var url = "do?sc=xworker.web.app.view.extjs.server.DataObjectWindows/@EditRecordWindow";
url = url + "&gridId=${data.gridId?if_exists}";
url = url + "&dataObject=${data.dataObject?if_exists}";
url = url + "&width=${data.width?if_exists}";
url = url + "&height=${data.height?if_exists}";
var windowsId = '';

var xr = Ext.ns('Ext.xworker.remote');
xr.openWindow('${nameSpace?if_exists}Window', 
    url,
    null,
    datas[0]);
#$@text#$@
          sinterpretationType
          Self
          sattributeTemplate
          false
          schildsAttributeTemplate
          false
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          screateLocalVarScope
          false
          ssaveReturn
          false
          sdisableGlobalContext
          false
          sdebugLog
          false
          sdescriptors
          xworker.core.text.TextTemplate
          sid
          toJavaScriptCode
    @/@OpenEditRecordWindow/@name
    sname
    name
    sshowLabel
    true
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    name
    @/@OpenEditRecordWindow/@label
    sname
    label
    sshowLabel
    true
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    label
    @/@OpenEditRecordWindow/@gridId
    sname
    gridId
    sinputtype
    openWindow
    ssize
    40
    sshowLabel
    true
    sinputattrs
    xworker.swt.xworker.attributeEditor.openWins.SelectThingOpenWindow/@shell|attributeName=id,descriptor=xworker.extjs.Ext.grid.GridPanel,seperator=%2C,returnType=attribute,append=false
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    gridId
    @/@OpenEditRecordWindow/@dataObject
    sname
    dataObject
    sinputtype
    dataSelector
    ssize
    60
    sshowLabel
    true
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    dataObject
    @/@OpenEditRecordWindow/@width
    sname
    width
    sshowLabel
    true
    sreadOnly
    false
    sdefault
    640
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    width
    @/@OpenEditRecordWindow/@height
    sname
    height
    sinputtype
    text
    sshowLabel
    true
    sreadOnly
    false
    sdefault
    640
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    height
