示例代码
预设代码用法示例
文档操作模型中的编辑访问控制操作
编辑访问控制是文档信息页面上操作列表中的可用操作。该操作包含于在 <Windchill>\codebase\actionmodels.xml
<!-- list used on document details page -->
<model name="docs details page actions">
<action name="oldedit" type="document"/>
<action name="download" type="document"/>
<action name="route" type="workflow"/>
<action name="setState" type="lifecycle"/>
<action name="createSubscription" type="subscription"/>
<action name="checkout" type="object"/>
<action name="checkin" type="document"/>
<action name="undocheckout" type="object"/>
<action name="rollupIterations" type="object"/>
<action name="update" type="document"/>
<action name="rename" type="document"/>
<action name="ManageSecurity" type="accessPermission"/>
<action name="delete" type="object"/>
<action name="bookmarkIt" type="bookmark"/>
<action name="create_deli" type="deliverable"/>
<action name="cut" type="object"/>
<action name="copy" type="object"/>
<action name="export" type="object"/>
<action name="viewInProductView" type="document"/>
<action name="pdmCheckInApply" type="object"/>
<action name="SBSendToPdm" type="sandbox"/>
<action name="sandboxUndoCheckoutDetails" type="object"/>
<action name="removeShare" type="object"/>
<action name="EDA_COMPARE" type="EDAcompare"/>
<action name="VALIDATION_MANAGER" type="EDAcompare"/>
<action name="SETUP_FILE" type="EDAcompare"/>
<action name="wtObjCompare" type="ocmp"/>
</model>
中定义的“文档详细信息页面操作”操作模型中。
创建文档向导中的访问控制步骤
创建文档向导是访问控制 (作为创建向导中的步骤) 示例。
源文件:wcEnterprise\DocumentManagement\src_web\netmarkets\jsp\document\create.jsp
<%@ taglib prefix="jca"
uri="http://www.ptc.com/windchill/taglib/components" %>
<%@ taglib prefix="docmgnt"
uri="http://www.ptc.com/windchill/taglib/docmgnt" %>
<%@ include file="/netmarkets/jsp/components/beginWizard.jspf"%>
<%@ include
file="/netmarkets/jsp/components/includeWizBean.jspf"%>
<jca:initializeItem operation="${createBean.create}"/>
<docmgnt:validateNameJSTag/>
<jca:wizard title="${param.titleString}">
<jca:wizardStep action="setContextWizStep" type="object"/>
<jca:wizardStep action="defineItemWizStep" type="object"/>
<jca:wizardStep action="setAttributesWizStep" type="object"
/>
<jca:wizardStep action="attachments_step" type="attachments"
/>
<jca:wizardStep action="setAccessControlWizStep"
type="object"
/>
</jca:wizard>
<jca:action actionName="fileSelectionAndUploadApplet"
actionType="attachments" />
<script type="text/javascript">
setUserSubmitFunction(submitFileContent);
</script>
<%@ include file="/netmarkets/jsp/util/end.jspf"%>
"setAccessControlWizStep" 的定义位于源文件 <Windchill>\codebase\config\actions\Security-actions.xml 中,该文件可定义:
<action name="setAccessControlWizStep"
id="setAccessControlWizStep" preloadWizardPage="false">
<command
class="com.ptc.core.security.forms.UpdatePermissionsFormDelegate" method=""
windowType="wizard_step"/>
</action>
这对您有帮助吗?