^1757228649110
@
lth_createTime
1741414067319
sname
code
slabel
代码
sdescriptors
xworker.lang.MetaDescriptor3
sextends
xworker.html.Widgets,xworker.html.HtmlWidget
smany
true
seditCols
2
sinitialization
false
smodifier
public
sinheritDescription
false
Sdescription
#$@text#$@
<p>用于直接编写HTML代码。</p>

<p><strong>追加位置</strong></p>

<p>通过appendTo设置代码放在html的head、body或body的末尾。</p>

<p><strong>子区块</strong></p>

<p>可以使用子节点来定义代码子块，通过%%&lt;childName&gt;%%来引用。</p>

<p>比如：</p>

<p>&lt;div&gt;hello %%userName%%&lt;/div&gt;</p>

<p>设置一个名字是userName的子节点，假设这个子节点toHtml()方法返回的是zhangsan，那么最终就是&lt;div&gt;hello zhangsan&lt;/div&gt;。</p>

<p><strong>Freemarker不解析</strong></p>

<p>生成的html代码在XWorker的SimpleControl模型里，通常会作为freemarker版本生成最终的Html代码。如果属性noprase=true，那么代码会包裹在&lt;#noparse&gt;中。</p>

<p>&nbsp;</p>
#$@text#$@
snotXmlAttribute
false
sjson_isArray
false
sjson_array_type
children
sjson_attribute
false
sen_label
Code
sth_createIndex
false
sth_registMyChilds
false
sth_registDisabled
false
sth_mark
false
  @/@scripts
  sname
  scripts
  slabel
  scripts
  sdescriptors
  xworker.lang.MetaDescriptor3/@actions
  sid
  scripts
    @/@scripts/@toHtml
    sname
    toHtml
    slabel
    toHtml
    sisSynchronized
    false
    sthrowException
    true
    suseOuterJava
    true
    souterClassName
    xworker.html.base.component.codeCreator
    smethodName
    toHtml
    sdescriptors
    xworker.lang.actions.JavaAction
    sid
    toHtml
    @/@scripts/@ai_isNeedGenerate
    sname
    ai_isNeedGenerate
    sattributeName
    generate
    sBoolean
    false
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.ActionUtil/@GetBoolean
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sid
    ai_isNeedGenerate
    @/@scripts/@ai_onResult
    sname
    ai_onResult
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.html.ai.AICode
    smethodName
    ai_onResult
    sdisableGlobalContext
    false
    Scode
#$@text#$@
//把AI的结果设置成code
self.set("code", content);

//下次不要生成了，除非主动打开了
self.set("generate", false);
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Local
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sid
    ai_onResult
    @/@scripts/@5210
    sname
    isNoparse
    sattributeName
    noparse
    sBoolean
    false
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    susage
    params
    sdescriptors
    xworker.lang.actions.ActionUtil/@GetBoolean
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sid
    5210
    @/@scripts/@5520
    sname
    getCode
    sattributeName
    code
    snotNull
    false
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    susage
    params
    sdescriptors
    xworker.lang.actions.ActionUtil/@GetString
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sid
    5520
    @/@scripts/@ai_getPromptFormat
    sname
    ai_getPromptFormat
    stype
    string
    Svalue
#$@text#$@
## 输出要求
只要生成<body>中的html代码，不包含<body>，不要解释。请直接输出代码，保持代码为连续文本，不要用任何 Markdown 格式包裹。例如：

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello World");
    }
}
#$@text#$@
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@ValueFactory
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sid
    ai_getPromptFormat
    @/@scripts/@ai_getContent
    sname
    ai_getContent
    sattributeName
    code
    snotNull
    false
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.ActionUtil/@GetString
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sid
    ai_getContent
    @/@scripts/@8058
    sname
    getAppendTo
    sattributeName
    appendTo
    snotNull
    false
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    susage
    params
    sdescriptors
    xworker.lang.actions.ActionUtil/@GetString
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sai_needGenerate
    false
    sai_generateType
    create
    sai_promptContainsVars
    false
    sid
    8058
  @/@name
  sname
  name
  slabel
  名称
  sinputtype
  text
  sinheritDescription
  false
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sen_label
  Name
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  name
  @/@label
  sname
  label
  slabel
  标签
  sinputtype
  text
  sinheritDescription
  false
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sen_label
  Label
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  label
  @/@appendTo
  sname
  appendTo
  sinputtype
  select
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  smodifier
  public
  sreadOnly
  false
  sdefault
  body
  sinheritDescription
  false
  Sdescription
#$@text#$@
<p>追加到html的那个部分。</p>

<ul>
	<li>head: 是html的head里。</li>
	<li>body: 是hml的body里。</li>
	<li>bottom: 是html的body的最后面。</li>
</ul>

<p>&nbsp;&nbsp;</p>
#$@text#$@
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sxmlJsonIncludeDefault
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_noThingRegistViewer
  false
  sth_fileMonitor
  false
  sth_mark
  false
  sth_registQueryOnlySelf
  false
  sjson_isArray
  false
  sgroupDescriptor
  false
  sai_needGenerate
  false
  sai_generateType
  create
  sai_promptContainsVars
  false
  sid
  appendTo
    @/@appendTo/@header
    sname
    head
    svalue
    head
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sai_needGenerate
    false
    sai_generateType
    create
    sai_promptContainsVars
    false
    sid
    header
    @/@appendTo/@body
    sname
    body
    svalue
    body
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sai_needGenerate
    false
    sai_generateType
    create
    sai_promptContainsVars
    false
    sid
    body
    @/@appendTo/@bottom
    sname
    bottom
    svalue
    bottom
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sai_needGenerate
    false
    sai_generateType
    create
    sai_promptContainsVars
    false
    sid
    bottom
  @/@generate
  sname
  generate
  sinputtype
  truefalse
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  smodifier
  public
  sreadOnly
  false
  sdefault
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sxmlJsonIncludeDefault
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_noThingRegistViewer
  false
  sth_fileMonitor
  false
  sth_mark
  false
  sth_registQueryOnlySelf
  false
  sjson_isArray
  false
  sgroupDescriptor
  false
  sid
  generate
  @/@noparse
  sname
  noparse
  sinputtype
  truefalse
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  smodifier
  public
  sreadOnly
  false
  sdefault
  false
  sinheritDescription
  false
  Sdescription
#$@text#$@
<p>在XWorker中，通常生成的HTML代码最后会当作freemake模板。如果JS代码用了Jquery等，会有$符号，这样可能会出错。</p>

<p>如果noparse=true，那么生成的代码将包含在&lt;#noparse&gt;&lt;code&gt;&lt;/#noparse&gt;中，这样代码就不会被freemarker解析，而作为一个整体了。</p>
#$@text#$@
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sxmlJsonIncludeDefault
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_noThingRegistViewer
  false
  sth_fileMonitor
  false
  sth_mark
  false
  sth_registQueryOnlySelf
  false
  sjson_isArray
  false
  sgroupDescriptor
  false
  sid
  noparse
  @/@ai_promptSystem
  sname
  ai_promptSystem
  slabel
  角色
  sinputtype
  textarea
  sgroup
  AI
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  smodifier
  public
  sreadOnly
  false
  sinheritDescription
  false
  Sdescription
#$@text#$@
<p>让AI扮演的角色的提示词，一般放在提示词的开头。</p>

<p>注意属性的生效优先级低于对应的方法，在框架中通常建议重写对应的方法，这样就不用每个模型都配置了。</p>
#$@text#$@
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sen_label
  Role
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_noThingRegistViewer
  false
  sth_fileMonitor
  false
  Sen_description
#$@text#$@
<p>The prompt words for letting AI play the role are usually placed at the beginning of the prompt words. </p>

<p>Note that the effective priority of the attribute is lower than the corresponding method. In the framework, it is usually recommended to rewrite the corresponding method, so that every model is not configured. </p>
#$@text#$@
  sth_mark
  false
  sth_registQueryOnlySelf
  false
  sjson_isArray
  false
  sgroupDescriptor
  false
  sid
  ai_promptSystem
  @/@ai_promptRequirement
  sname
  ai_promptRequirement
  slabel
  需求
  sinputtype
  textarea
  sgroup
  AI
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  smodifier
  public
  sreadOnly
  false
  sinheritDescription
  false
  sdescription
  <p>这里一般是用户的需求，放在提示词的中间。</p>
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sen_label
  Requirement
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_noThingRegistViewer
  false
  sth_fileMonitor
  false
  sen_description
  <p>This is usually the user's needs, placed in the middle of the prompt word. </p>
  sth_mark
  false
  sth_registQueryOnlySelf
  false
  sjson_isArray
  false
  sgroupDescriptor
  false
  sid
  ai_promptRequirement
  @/@code
  sname
  code
  slabel
  代码
  stype
  text
  sinputtype
  codeEditor
  sinputattrs
  rows=8 cols=40 codeName=html codeType=html
  sinheritDescription
  false
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sen_label
  Code
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  code
