^1640740804087
@
sname
SimpleControlFreemarker
slabel
SimpleControlFreemarker
scheckPermission
false
scheckLogin
false
sdescriptors
xworker.web.controls.SimpleControl
sinheritDescription
false
sth_createIndex
false
sth_registMyChilds
false
sth_registDisabled
false
sth_mark
false
  @/@actions
  sname
  actions
  sdescriptors
  xworker.web.controls.SimpleControl/@actions
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  actions
    @/@actions/@doAction
    sname
    doAction
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    svarScope
    Local
    sdisableGlobalContext
    false
    Scode
#$@text#$@
//获取系统变量
def env = System.getenv();
def list = [];
for(key in env.keySet()){
    list.add(key + ": " + env.get(key));
}

//放到全局上下文中，这样界面就可以引用了
actionContext.getScope(0).put("envs", list);

return "success";
#$@text#$@
    sinterpretationType
    Action
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@GroovyAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    doAction
  @/@view
  sname
  view
  sbelongToHtml
  true
  stitle
  Freemarker
  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 Freemakrer！</h3>

<p>SimpleControl的界面会转化成Freemarker，因此可以在界面中使用Freemarker模板。</p>

<p>比如，系统变量的显示：</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
    @/@view/@systemVar
    sname
    systemVar
    Scode
#$@text#$@
<#list envs as env>
&nbsp;&nbsp;&nbsp;&nbsp;${env}</br>
</#list>
#$@text#$@
    sdescriptors
    xworker.html.base.container.childs/@code
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    systemVar
  @/@success
  sname
  success
  stype
  form
  scontentType
  text/html;charset=UTF-8
  svalue
  xworker.example.web.helloworld.SimpleControlFreemarker/@view
  sdescriptors
  xworker.web.controls.SimpleControl/@result
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  success
