在以往的很多客制化项目中,客户都有要求能够基于“配置角色的操作”对客制化的action进行权限的配置。
以下是往“配置角色的操作”页面加入客制化action item的方法,请參考。
产品团队下,往“配置角色的操作”页面加入客制化action item的方法
1.首先在custom-actions.xml中定义一个新的action时,必须给action定义一个uicomponent (可以直接设置为跟action name一样)
<objecttype name="product" class="" resourceBundle="ext.cssc605.product.resource.productRB">
<action name="reportManagement" uicomponent="reportManagement" renderType="GENERAL">
<command url="netmarkets/jsp/ext/cssc605/product/reportManagement.jsp" windowType="page"/>
</action>
</objecttype>
2.在<WT_HOME>/codebase下,找出roleaccessprefs.xml
在该文件的相应section上,加上客制化uic的定义,如在<product labelId="productLabel">的最后加上
<!-- Customization Actions /Added by Leo Li-->
<uic name="loadCategory" order="900" enabled="true" defaultAll="true" defaultManager="true" defaultGuest="true" managerEnabled="true" guestEnabled="true"/>
<uic name="reportManagement" order="901" enabled="true" defaultAll="true" defaultManager="true" defaultGuest="true" managerEnabled="true" guestEnabled="true"/>
3.在<WT_HOME>/src/com/ptc/netmarkets/roleAccess下找出相关的rbInfo,roleAccessResource.rbInfo
追加上面定义的uic的显示名称
####################################
# Customization Report / Added by Leo Li
####################################
1064.value=Load Category
1064.constant=loadCategory
1065.value=Report Management
1065.constant=reportManagement