^1640740814592
@
sname
Introduction
slabel
Introduction
sdescriptors
xworker.web.ControlSet
sid
Introduction
  @/@index
  sname
  index
  sdescriptors
  xworker.web.ControlSet/@SimpleControl
  sid
  index
    @/@index/@forms
    sname
    forms
    sbelongToHtml
    true
    sstyle
    default
    SotherHeads
#$@text#$@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<LINK REL ="stylesheet" TYPE="text/css" HREF="fckeditor/editor/css/fck_editorarea.css" TITLE="Style"/>
<script type="text/javascript" src="js/xworker/InnerBrowserUtil.js"></script>
#$@text#$@
    sdescriptors
    xworker.web.controls.SimpleControl/@view
    sid
    forms
      @/@index/@forms/@htmlCode
      sname
      htmlCode
      ShtmlCode
#$@text#$@
<p><strong><span style="font-size: small">HTML</span></strong><span style="font-size: xx-small"><a onClick="invoke('thing:xworker.html.doc.Introduction:/@index/@forms/@htmlCode')" href="javascript:void(0)">edit</a></span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;HTML事物主要用于输出HTML文本文档。</p>
<p>&nbsp;&nbsp;&nbsp;HTML事物也是普通的事物，凡是有toHtml方法的事物都可以作为HTML事物。</p>
<p><strong>如何定义HTML事物</strong></p>
<p>&nbsp;&nbsp;&nbsp; 只要有toHtml方法的事物都可以作为HTML事物。</p>
<p>&nbsp;&nbsp;&nbsp; toHtml方法应返回一个字符串的结果作为输出结果，HTML事物通常是父子事物包含的多级事物，所以每个事物生成的代码一般是包含在父事物输入的代码中。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;在toHtml方法里会传入heads、bottoms、bottomThings三个变量，heads、bottoms和bottomThings都是List类型的变量，其中：</p>
<ul>
    <li>heads<br />
    列表中的数据是Map，有name和value两个键值，其中value的值将放在html的head部分（如果有）。<br />
    name的用途是避免重复引用，比如一个日期控件要导入相应的css和js，那么使用相同的日期控件的输入框不必导入多次css和js。<br />
    &nbsp;</li>
    <li>bottoms<br />
    同heads，不过value的变量是放在body的底部的。<br />
    &nbsp;</li>
    <li>bottmThings<br />
    同bottoms，不过value的值是Thing（事物），最后会调用事物的createBottom方法。</li>
</ul>
<p><strong>HTML的总事物</strong></p>
<p>&nbsp;&nbsp;&nbsp; HTML的总事物是<a onClick="invoke('thing.xworker.uiweb.html.base.view')" href="javascriptvoid(0)">xworker.html.base.view</a>。</p>
<p><strong>例子：</strong></p>
<p>&nbsp;&nbsp;&nbsp;<a href="do?sc=xworker.ui.test.web.html.yui.widget.container.TestPanel/@views/@form">xworkeruitest.web.html.yui.widget.container.TestPanel/@views/@form</a>，<a onClick="invoke('thingxworkeruitest.web.html.yui.widget.container.TestPanel/@views/@form')" href="javascriptvoid(0)">打开事物</a>。</p>
<p style="text-align: center">&nbsp;<img height="208" alt="" width="537" src="/files/Image/ui/web/html/cp_xworker.example1.JPG" /></p>
#$@text#$@
      sdescriptors
      xworker.html.base.container.childs/@htmlCode
      sid
      htmlCode
    @/@index/@success
    sname
    success
    stype
    form
    scontentType
    text/html;
    svalue
    xworker.html.doc.Introduction/@index/@forms
    sdescriptors
    xworker.web.controls.SimpleControl/@result
    sid
    success
