^1660101079308
@
sname
SimpleControlViewResult
slabel
SimpleControlViewResult
scheckPermission
false
scheckLogin
false
sdescriptors
xworker.web.controls.SimpleControl
sinheritDescription
false
sth_createIndex
false
sth_registMyChilds
false
sth_registDisabled
false
sth_mark
false
  @/@view
  sname
  view
  sbelongToHtml
  true
  stitle
  HelloWorld
  sstyle
  default
  shasHead
  false
  shasBottom
  false
  snoCache
  false
  SotherHeads
#$@text#$@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<LINK REL ="stylesheet" TYPE="text/css" HREF="fckeditor/2_6beta1/editor/css/fck_editorarea.css" TITLE="Style"/>
<script type="text/javascript" src="js/xworker/InnerBrowserUtil.js"></script>
#$@text#$@
  sdescriptors
  xworker.web.controls.SimpleControl/@view
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  view
    @/@view/@htmlCode
    sname
    htmlCode
    ShtmlCode
#$@text#$@
<h3>Hello World!</h3>

<p>&nbsp;&nbsp;&nbsp; SimpleControl是XWorker中常用的一个Web框架，它的view节点可以用来编写HTML界面。</p>

<p><strong>view(视图）原理</strong></p>

<p>&nbsp;&nbsp;&nbsp; 每一个view和其子节点都需要实现String toHtml()方法，在运行时会把它们拼接成一个完整的HTML，并把该HTML作为Freemakrer模板存放到临时工作目录下，最终和变量上下文（同doAction()方法的变量上下文）一起生成最终的页面。</p>

<p>&nbsp;&nbsp;&nbsp; 当view模型改变后，临时工作目录下的freemakrer模型会被重新生成。</p>

<p><strong>result</strong></p>

<p>&nbsp;&nbsp;&nbsp; view是通过result节点调用的。SimpleControl通过doAction()的返回值（默认success)来匹配result节点，result节点输出最终的结果。</p>
#$@text#$@
    sdescriptors
    xworker.html.base.container.childs/@htmlCode
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    htmlCode
  @/@success
  sname
  success
  stype
  form
  scontentType
  text/html;charset=UTF-8
  svalue
  xworker.example.web.helloworld.SimpleControlViewResult/@view
  sdescriptors
  xworker.web.controls.SimpleControl/@result
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  success
