^1477532928584
@
sname
Switch
slabel
Switch
sdescriptors
xworker.lang.MetaDescriptor3
sextends
xworker.lang.actions.SelfAction
smany
true
seditCols
2
sinitialization
false
smodifier
public
sinheritDescription
false
scolor
BLUE
Sdescription
#$@text#$@
<p><strong>语法规则</strong></p>

<pre class="brush:as3;">
switch(switchValue){
    case caseValue:
         //执行对应Case下的动作
     .......
     default:
          //如果没有Case匹配，那么执行Default子节点下的动作
}</pre>

<p><strong>流程中断</strong></p>

<p>&nbsp;&nbsp;&nbsp; Switch动作的规则基本和Java的swtich语法相同，如果流程的状态时BREAK时中断，否则继续执行后续的Case，另外CONTINUE、RETURN也会中断流程。</p>

<p><strong>switchValue</strong></p>

<p>&nbsp;&nbsp;&nbsp; 从变量上下文中获取，支持ogn:、var:、template:等前缀。</p>

<p><strong>caseValue</strong></p>

<p>&nbsp;&nbsp;&nbsp; 也从变量上下文中获取，支持ogn:、var:、template:等前缀。</p>

<p><strong>case匹配规则</strong></p>

<p>&nbsp;&nbsp;&nbsp; 使用Java对象的equlas方法匹配。</p>

<p><strong>变量上下文</strong></p>

<p>&nbsp;&nbsp;&nbsp; 会启动一个局部变量上下文的范围。</p>

<p><strong>示例</strong></p>

<ul>
	<li><a href="javascript:invoke('thing:xworker.example.thing.actions.SwitchDemo')">SwitchDemo</a></li>
</ul>

<p>&nbsp;</p>
#$@text#$@
snotXmlAttribute
false
sjson_isArray
false
  @/@scripts
  sname
  scripts
  slabel
  scripts
  sdescriptors
  xworker.lang.MetaDescriptor3/@actions
  sid
  scripts
    @/@scripts/@run
    sname
    run
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    souterClassName
    xworker.lang.actions.SwitchCreator
    sclassName
    Switch
    smethodName
    run
    sdisableGlobalContext
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sid
    run
  @/@Case
  sname
  Case
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.lang.actions.Actions
  smany
  true
  seditCols
  2
  sinitialization
  false
  smodifier
  public
  sinheritDescription
  false
  snotXmlAttribute
  false
  sid
  Case
    @/@Case/@name
    sname
    name
    LvalidateOnBlur
    false
    LallowDecimals
    false
    LallowNegative
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    name
    @/@Case/@label
    sname
    label
    LvalidateOnBlur
    false
    LallowDecimals
    false
    LallowNegative
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    label
    @/@Case/@caseValue
    sname
    caseValue
    sshowLabel
    true
    ssize
    50
    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
    caseValue
    @/@Case/@description
    sname
    description
    sinputtype
    html
    scolspan
    2
    LvalidateOnBlur
    false
    LallowDecimals
    false
    LallowNegative
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sid
    description
  @/@Default
  sname
  Default
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.lang.actions.Actions
  sid
  Default
  @/@name
  sname
  name
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  name
  @/@label
  sname
  label
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sid
  label
  @/@switchValue
  sname
  switchValue
  sshowLabel
  true
  ssize
  60
  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
  switchValue
  @/@description
  sname
  description
  sinputtype
  html
  scolspan
  2
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  description
