^1393931489553
@xworker.doc.structures.Module
sname
Module
slabel
模块
sdescriptors
xworker.lang.MetaDescriptor3
smany
true
seditCols
2
sinitialization
false
smodifier
public
sinheritDescription
false
Sdescription
#$@text#$@
<p>模块是网页菜单的定义，可以用一个或者多个模块共同定义一个菜单树。模块主要用于XWorker的<a href="http://www.xworker.org">www.xworker.org</a>的网站的菜单的定义。</p>

<p><strong>菜单集合（MenuSet）</strong></p>

<p>是菜单的容器，可包含多个菜单和子菜单集合。菜单集合是一个不链接任何内容的菜单节点，需要指定要显示的菜单集合下的菜单或子菜单集合，默认显示第一个菜单或子菜单集合。</p>

<p><strong>菜单（Menu）</strong></p>

<p>可以内容的菜单，是菜单的叶子节点，可以是显示内容、超链接、空白页等。</p>

<p><strong>显示样式</strong></p>

<p>模块只定义菜单的内容，显示样式由具体的应用设置。</p>
#$@text#$@
sen_label
Module
sth_createIndex
false
@xworker.doc.structures.Module/@name
sname
name
slabel
名称
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@label
sname
label
slabel
标签
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@zh_label
sname
zh_label
slabel
中文标签
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@en_label
sname
en_label
slabel
英文标签
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@indexModule
sname
indexModule
slabel
主页横条模块
sshowLabel
true
ssize
60
sreadOnly
false
sinheritDescription
false
Sdescription
#$@text#$@
<p>每个页面顶部横条下的索引链接，同样使用Moudle定义。默认是XWorker主页的。</p>

<p>主页现在只是一个链接，不是菜单，以后会考虑有下拉菜单的情况。</p>
#$@text#$@
svalidateAllowBlank
true
LvalidateOnBlur
true
LallowDecimals
true
LallowNegative
true
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
sregistMyChilds
false
sth_mark
false
@xworker.doc.structures.Module/@notDisplayBar
sname
notDisplayBar
slabel
不显示横条模块
sinputtype
truefalse
sshowLabel
true
sreadOnly
false
sdefault
false
sinheritDescription
false
svalidateAllowBlank
true
LvalidateOnBlur
true
LallowDecimals
true
LallowNegative
true
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
sregistMyChilds
false
sth_mark
false
@xworker.doc.structures.Module/@description
sname
description
slabel
描述
sinputtype
html
sshowLabel
true
sreadOnly
false
sinheritDescription
false
svalidateAllowBlank
true
LvalidateOnBlur
true
LallowDecimals
true
LallowNegative
true
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
sregistMyChilds
false
sth_mark
false
@xworker.doc.structures.Module/@MenuSet
sname
MenuSet
slabel
菜单集合
sdescriptors
xworker.lang.MetaDescriptor3/@thing
smany
true
seditCols
2
sinitialization
false
smodifier
public
sinheritDescription
false
Sdescription
#$@text#$@
<p>是菜单的容器，可包含多个菜单和子菜单集合。菜单集合是一个不链接任何内容的菜单节点，需要指定要显示的菜单集合下的菜单或子菜单集合，默认显示第一个菜单或子菜单集合。</p>

<p><strong>菜单集合的引用</strong></p>

<p>如要引用其他菜单集合，设置菜单引用属性。</p>
#$@text#$@
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@name
sname
name
slabel
名称
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@label
sname
label
slabel
标签
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@zh_label
sname
zh_label
slabel
中文标签
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@en_label
sname
en_label
slabel
英文标签
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@referencedThing
sname
referencedThing
slabel
被引用者
sinputtype
dataSelector
ssize
60
sreadOnly
false
sinheritDescription
false
sdescription
<p>引用该事物的引用者，一个菜单集合只能被一个菜单集合引用。</p>
svalidateAllowBlank
true
LvalidateOnBlur
true
LallowDecimals
true
LallowNegative
true
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
sth_mark
false
@xworker.doc.structures.Module/@MenuSet/@extendMenuSet
sname
referenceMenuSet
slabel
引用菜单
sinputtype
dataSelector
ssize
60
scolspan
2
sreadOnly
false
sinheritDescription
false
Sdescription
#$@text#$@
<p>菜单可以使用多个模块分散定义，通过引用的方式把不同的模块连接在一起。</p>

<p><strong>设置方式</strong></p>

<p>比如菜单集合A要引用菜单集合B，那么A的引用要设置为B，B的引用同时要设置成A。</p>

<p><strong>如果判断是引用还是被引用</strong></p>

<p>由于引用和被引用都使用引用字段设置，因此设定：<br />
&nbsp;&nbsp;&nbsp;&nbsp; 1. 如果A引用B，那么A的子节点为空，B的子节点不为空。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2. 如果B的子节点不为空，那么B判断A引用了B。<br />
&nbsp;&nbsp;&nbsp;&nbsp; 3. 如果B的子节点为空，那么B判断是B引用了A，<span style="color:rgb(255, 0, 0)">注意此种情况可能会导致菜单显示的不是预期的</span>。</p>
#$@text#$@
svalidateAllowBlank
true
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@selection
sname
selected
slabel
正选中的菜单
sinputtype
dataSelector
ssize
60
scolspan
2
sreadOnly
false
sinheritDescription
false
sdescription
<p>在继承里，通常是子模块继承父模块的菜单，默认选中父模块的一个菜单，让其默认处于选中状态，即显示粗体没有超链接。</p>
svalidateAllowBlank
true
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@expand
sname
expand
slabel
是否展开
sinputtype
truefalse
sreadOnly
false
sdefault
false
sinheritDescription
false
sdescription
<p>是否是在不在选中的时候也展开。</p>
svalidateAllowBlank
true
LvalidateOnBlur
true
LallowDecimals
true
LallowNegative
true
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
sth_mark
false
@xworker.doc.structures.Module/@MenuSet/@menu
sname
menu
slabel
菜单
sdescriptors
xworker.lang.MetaDescriptor3/@thing
smany
true
seditCols
2
sinitialization
false
smodifier
public
sinheritDescription
false
sdescription
<p>可以内容的菜单，是菜单的叶子节点，可以是显示内容、超链接、空白页等。</p>
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@menu/@name
sname
name
slabel
名称
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@menu/@label
sname
label
slabel
标签
sshowLabel
true
ssize
60
sreadOnly
false
sinheritDescription
false
svalidateAllowBlank
true
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@menu/@zh_label
sname
zh_label
slabel
中文标签
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@menu/@en_label
sname
en_label
slabel
英文标签
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@menu/@contentType
sname
contentType
slabel
内容类型
sinputtype
select
sreadOnly
false
sdefault
page
sinheritDescription
false
Sdescription
#$@text#$@
<p>内容类型：</p>
<ul>
    <li>page<br />
    HTML页面，通过toString转化内容的。<br />
    &nbsp;</li>
    <li>link<br />
    外部链接，如http://www.google.cn<br />
    &nbsp;</li>
    <li>blank<br />
    空页面<br />
    &nbsp;</li>
    <li>innerLink<br />
    直接连接到其他菜单项。</li>
</ul>
#$@text#$@
svalidateAllowBlank
true
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@menu/@contentType/@page
sname
page
slabel
page
svalue
page
sdescriptors
xworker.lang.MetaDescriptor3/@attribute/@value
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@menu/@contentType/@link
sname
link
slabel
link
svalue
link
sdescriptors
xworker.lang.MetaDescriptor3/@attribute/@value
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@menu/@contentType/@blank
sname
blank
slabel
blank
svalue
blank
sdescriptors
xworker.lang.MetaDescriptor3/@attribute/@value
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@menu/@descriptionPath
sname
contentPath
slabel
内容路径
sinputtype
dataSelector
ssize
60
scolspan
2
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@menu/@sswtMenus
sname
sswtMenus
sid
swtMenus1
sdescriptors
xworker.lang.MetaDescriptor3/@swtMenus
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@menu/@sswtMenus/@menuDefine
sname
menuDefine
sid
menuDefine
sdescriptors
xworker.lang.MetaDescriptor3/@swtMenus/@menuDefine
@xworker.doc.structures.Module/@MenuSet/@menu/@sswtMenus/@menuDefine/@WebAction
sname
webAction
slabel
WebAction
sid
WebAction
sdescriptors
xworker.lang.ThingMenu/@menuDefine/@menu
@xworker.doc.structures.Module/@MenuSet/@menu/@sswtMenus/@execute
sname
WebAction
stype
data
smenuType
webAction
sid
execute
sdescriptors
xworker.lang.MetaDescriptor3/@swtMenus/@menuSetting
@xworker.doc.structures.Module/@MenuSet/@menu/@sswtMenus/@execute/@runWebAction
sname
runWebAction
slabel
运行WebAction
surl
xworker.doc.structures.Module/@MenuSet/@menu/@actions/@httpExecute
sisSplit
false
sattachParam
true
sid
runWebAction
sen_label
Run Web Action
sdescriptors
xworker.lang.ThingMenu/@menuSetting/@menu
@xworker.doc.structures.Module/@MenuSet/@menu/@actions
sname
actions
sdescriptors
xworker.lang.MetaDescriptor3/@actions
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@menu/@actions/@httpExecute
sname
httpExecute
sisSynchronized
false
sthrowException
false
suseOtherAction
false
svarScope
Global
sdisableGlobalContext
false
Scode
#$@text#$@
def globalCfg = world.getThing("_local.xworker.config.GlobalConfig");
def httpServer = null;
if(globalCfg != null){
    httpServer = globalCfg.getString("webUrl");
}

if(httpServer == null || httpServer == ""){
   httpServer = "http://localhost:9001/";
}

url = httpServer + "do?sc=xworker.orgweb.ModuleWeb/@index&menuPath=" + currentThing.metadata.path;

//log.info("url=" + url);
explorerContext.actions.doAction("openUrl", ["url":url, "name":currentThing]);
#$@text#$@
sinitBreakPoint
false
ssuccessBreakPoint
false
sexceptionBreakPoint
false
seditBreakPoint
false
sinterpretationType
Action
screateLocalVarScope
false
ssaveReturn
false
sdescriptors
xworker.lang.actions.Actions/@GroovyAction
@xworker.doc.structures.Module/@MenuSet/@menu/@actions/@httpDo
sname
httpDo
sisSynchronized
false
sthrowException
true
suseOtherAction
false
svarScope
Local
sdisableGlobalContext
false
Scode
#$@text#$@
//通过替换menuPath参数，使用ModuleWeb执行
request.setAttribute("menuPath", self.metadata.path);
def moduleWeb = world.get("xworker.orgweb.ModuleWeb/@index");
moduleWeb.doAction("httpDo", actionContext);
#$@text#$@
sinitBreakPoint
false
ssuccessBreakPoint
false
sexceptionBreakPoint
false
seditBreakPoint
false
sinterpretationType
Action
sdescriptors
xworker.lang.actions.Actions/@GroovyAction
sth_createIndex
false
@xworker.doc.structures.Module/@MenuSet/@menu/@menu
sname
menu
slabel
菜单
sdescriptors
xworker.lang.MetaDescriptor3/@thing
sextends
xworker.doc.structures.Module/@MenuSet/@menu
smany
true
seditCols
2
sinitialization
false
smodifier
public
sinheritDescription
true
sth_createIndex
false
sregistMyChilds
false
sth_mark
false
@xworker.doc.structures.Module/@MenuSet/@MenuSet
sname
MenuSet
slabel
菜单集合
sdescriptors
xworker.lang.MetaDescriptor3/@thing
sextends
xworker.doc.structures.Module/@MenuSet
smany
true
seditCols
2
sinitialization
false
smodifier
public
sinheritDescription
false
sth_createIndex
false
sth_mark
false
