项目是新建的(7.1.1),
通过Intellij CUBA插件创建了一个topMenu,自动生成的代码(继承的MainScreen),然后我加入了几个组件到 initialLayout
标签里,完整代码(ext-main-screen.xml)如下:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://schemas.haulmont.com/cuba/screen/window.xsd"
caption="mainMsg://application.caption">
<layout expand="foldersSplit">
<hbox id="titleBar"
stylename="c-app-menubar"
expand="mainMenu"
width="100%"
spacing="true"
margin="false;false;false;true">
<image id="logoImage"
align="MIDDLE_LEFT"
scaleMode="SCALE_DOWN"
stylename="c-app-icon"/>
<menu id="mainMenu"
align="MIDDLE_LEFT"/>
<ftsField id="ftsField"
align="MIDDLE_LEFT"/>
<userIndicator id="userIndicator"
align="MIDDLE_LEFT"/>
<timeZoneIndicator id="timeZoneIndicator"
align="MIDDLE_LEFT"/>
<hbox id="mainButtonsBox"
stylename="c-main-buttons"
align="MIDDLE_LEFT">
<newWindowButton id="newWindowButton"
icon="app/images/new-window.png"
description="mainMsg://newWindowBtnDescription"/>
<logoutButton id="logoutButton"
icon="app/images/exit.png"
description="mainMsg://logoutBtnDescription"/>
</hbox>
</hbox>
<split id="foldersSplit"
width="100%"
orientation="horizontal"
pos="200px">
<foldersPane id="foldersPane"
width="100%"
height="100%"/>
<workArea id="workArea"
width="100%"
height="100%">
<initialLayout id="initialLayout" spacing="true" margin="true" expand="portal">
<label value="欢迎!" stylename="huge gray1" align="MIDDLE_CENTER"/>
<fragment id="portal" screen="cy_PortalFragment"/>
</initialLayout>
</workArea>
</split>
</layout>
</window>
就是这个我设置的 id
为 portal
的 fragment 在角色的界面元素权限里面的树形菜单(topMenuMainScreen)里没有这个 portal
,请问这是什么问题呢,谢谢。
PS: portal(fragment)是自己加的,里面就一个label,然后角色的界面权限中这个Fragment也是授予了允许,即使我在界面元素权限里手动加入 id 为 portal 的组件后,匿名用户还是无法显示这个fragment
PS2: 我重启之后就能正确展示这个组件了,这个必须重启app才行么?