^1639983267853
@
sname
Context
slabel
ActionListener
sdescriptors
xworker.lang.MetaDescriptor3
smany
true
seditCols
2
sinitialization
false
smodifier
public
sinheritDescription
false
Sdescription
#$@text#$@
<p><strong>动作监听器</strong></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp; 动作监听器可以监听一个动作的执行，可以在动作执行前、执行成功和执行异常时触发监听器的相关方法。</p>

<p><strong>动作监听器的方法</strong></p>

<ul>
	<li><strong>void init()</strong><br />
	在动作执行前触发的方法。<br />
	&nbsp;</li>
	<li><strong>void&nbsp;success()</strong><br />
	在动作执行后触发的方法。<br />
	&nbsp;</li>
	<li><strong>void exception()</strong><br />
	在动作执行发生异常时触发的方法。&nbsp;&nbsp;&nbsp;</li>
</ul>

<p><strong>实现动作监听器的方法</strong></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp; 建议使用描述者<strong>xworker.lang.context.ThingActionListener</strong>来创建动作监听器。</p>

<p><strong>名字</strong></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp; 动作监听器以前叫做动作上下文，后改名动作监听器，但其路径没有改，有一些旧的模型仍然叫动作上下文。</p>

<p>&nbsp;</p>
#$@text#$@
snotXmlAttribute
false
sjson_isArray
false
sen_description
<p>Context.</p>
  @/@actions
  sname
  actions
  sdescriptors
  xworker.lang.MetaDescriptor3/@actions
  sid
  actions
    @/@actions/@init
    sname
    init
    sisSynchronized
    false
    sthrowException
    false
    suseOtherAction
    false
    suseOuterJava
    true
    souterClassName
    xworker.lang.actions.BlankAction
    smethodName
    run
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sid
    init
    @/@actions/@inherit
    sname
    inherit
    sisSynchronized
    false
    sthrowException
    false
    suseOtherAction
    false
    suseOuterJava
    true
    souterClassName
    xworker.lang.actions.BlankAction
    smethodName
    run
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sid
    inherit
    @/@actions/@success
    sname
    success
    sisSynchronized
    false
    sthrowException
    false
    suseOtherAction
    false
    suseOuterJava
    true
    souterClassName
    xworker.lang.actions.BlankAction
    smethodName
    run
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sid
    success
    @/@actions/@exception
    sname
    exception
    sisSynchronized
    false
    sthrowException
    false
    suseOtherAction
    false
    suseOuterJava
    true
    souterClassName
    xworker.lang.actions.BlankAction
    smethodName
    run
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sid
    exception
    @/@actions/@run
    sname
    run
    sunimplementedException
    false
    sdescriptors
    xworker.lang.actions.Actions/@NOOP
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    run
  @/@name
  sname
  name
  slabel
  名称
  sgroup
  Context
  sinheritDescription
  false
  sdescription
  上下文的名称。
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sen_label
  Name
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sen_description
  <p>The name of context.</p>
  sid
  name
  @/@label
  sname
  label
  slabel
  标签
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  smodifier
  public
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sen_label
  Label
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_fileMonitor
  false
  sth_mark
  false
  sid
  label
  @/@disable
  sname
  disable
  slabel
  禁止
  sinputtype
  truefalse
  sgroup
  Context
  sdefault
  false
  sinheritDescription
  false
  sdescription
  <p>如果设置false那么该上下文不生效。</p>
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sen_label
  Disable
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  disable
  @/@onError
  sname
  onError
  slabel
  发生异常时
  sinputtype
  select
  sgroup
  Context
  sdefault
  ignore
  sinheritDescription
  false
  Sdescription
#$@text#$@
当执行上下文有异常错误发生时的处理。exception（抛出异常），ignore（忽略继续）。<br />
<br />
如果抛出异常，那么整个脚本的执行都将停止。
#$@text#$@
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sen_label
  On Error
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sen_description
  <p>Whe action error happens.</p>
  sid
  onError
    @/@onError/@exception
    sname
    exception
    slabel
    exception
    svalue
    exception
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sid
    exception
    @/@onError/@ignore
    sname
    ignore
    slabel
    ignore
    svalue
    ignore
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sid
    ignore
  @/@preventError
  sname
  preventError
  slabel
  阻止错误
  sinputtype
  truefalse
  sgroup
  Context
  sdefault
  false
  sinheritDescription
  false
  Sdescription
#$@text#$@
<p>阻止错误可以阻止脚本或者其他上下文脚本执行时抛出的异常抛到上一级脚本调用者，但阻止错误只能阻拦上下文之前的错误，不能阻止之后的错误。阻止错误属性只在处理异常时使用。<br />
<br />
如：在web控制里业务或者界面抛出异常，那么可以设置一个上下文处理最终的错误，阻止错误抛到Servlet层，从而可以返回给客户端友好的界面。</p>
#$@text#$@
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sen_label
  Prevent Error
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sen_description
  <p>Prevent throw error.</p>
  sid
  preventError
  @/@inherit
  sname
  inherit
  slabel
  继承
  sinputtype
  truefalse
  sgroup
  Context
  sdefault
  true
  sinheritDescription
  false
  sdescription
  <p>如果为true那么执行inherit方法检查是否继承，否则不检查每次都调用init初始化上下文。</p>
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sen_label
  Inherit
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sen_description
  <p>Inherit</p>
  sid
  inherit
  @/@description
  sname
  description
  sinputtype
  html
  scolspan
  2
  sgroup
  Context
  sinputattrs
  Width='480';Height='300';ToolbarSet="SwtEdit"
  sinheritDescription
  false
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  description
  @/@actions1
  sname
  actions
  slabel
  动作
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.lang.MetaDescriptor3/@actions
  sen_label
  Actions
  sid
  actions1
