
xworker.http.doc.Introduction.xer.txt Maven / Gradle / Ivy
Show all versions of xworker_web Show documentation
@xworker.http.doc.Introduction
sname
Introduction
slabel
Introduction
sdescriptors
xworker.http.ControlSet
@xworker.http.doc.Introduction/@index
sname
index
sdescriptors
xworker.http.ControlSet/@SimpleControl
@xworker.http.doc.Introduction/@index/@forms
sname
forms
sbelongToHtml
true
sstyle
default
SotherHeads
#$@text#$@
#$@text#$@
sdescriptors
xworker.http.controls.SimpleControl/@view
@xworker.http.doc.Introduction/@index/@forms/@htmlCode
sname
htmlCode
ShtmlCode
#$@text#$@
WebControledit
WebControl是WEB框架事物,可以通过WebControl编写WEB应用。
在XWorker中WebControl也是普通的事物,只要一个事物有httpDo的动作,那么这个事物就可以是一个WEB应用,只要一个描述者有httpDo的行为,那么这个描述者就可以作为WebControl。
WebControl的定义
实现了httpDo动作的事物就可以作为WEB应用,在浏览器中输入地址do?sc=<事物的路径>就可以执行这个WEB应用。
当一个实现httpDo动作的事物作为其他事物的描述者是,这个事物就可以认为是一个WEB框架。
httpDo方法在执行时会传入request(HttpServerletRequest)和response(HttpServletResponse)两个常规变量,还会传入一个requestBean(xworker.ui.http.HttpRequestBean)变量,requestBean用于辅助读取数据等。
执行事物的httpDo的Serverlet是xworker.ui.http.HttoServletDo,这个类是控制所有WebControl的总类。
常用WebControl
ControlSet集合常用的WebControl以及定义界面的描述事物等,通过ControlSet可以方便的编写WEB应用,一般都是通过ControlSet创建WEB应用事物的。
一个简单的WebControl,执行指定的名为doAction的动作,并根据doAction的返回结果执行相应的结果输出,结果输入里集合了常用的界面输入形式,比如freemarker模板、XWorker表单、JasperReports、重定向等。
例子:
xworker:ui:test.http.TestControlSet:/@aSimpleControl,打开此事物。
BizControl用于编写复杂的WEB应用,执行前会找到相应的Web App配置,为每个动作提供默认的Hibernate Session,判断是否要登录等。
BizControl适合于开发大型应用,能够减少工作量。
#$@text#$@
sdescriptors
xworker.html.base.container.childs/@htmlCode
@xworker.http.doc.Introduction/@index/@success
sname
success
stype
form
scontentType
text/html;
svalue
xworker.http.doc.Introduction/@index/@forms
sdescriptors
xworker.http.controls.SimpleControl/@result