需求:卡片列表如果都放在同一个按钮组 会造成不能人为控制卡片有哪些按钮和列表有哪些按钮 所以最好分开
原配置文件如下:从界面布局总装开始.
<!-- 界面布局总装*********************************************************** -->
<bean id="container" class="nc.ui.uif2.TangramContainer" init-method="initUI">
<property name="tangramLayoutRoot">
<bean class="nc.ui.uif2.tangramlayout.node.TBNode">
<property name="tabs">
<list>
<bean class="nc.ui.uif2.tangramlayout.node.HSNode">
<property name="left">
<bean class="nc.ui.uif2.tangramlayout.node.CNode">
<property name="component">
<ref bean="viewa" />
</property>
</bean>
</property>
<property name="right">
<bean class="nc.ui.uif2.tangramlayout.node.CNode">
<property name="component">
<ref bean="billListView" />
</property>
</bean>
</property>
<property name="dividerLocation" value="215.0f" />
<property name="name" value="列表" />
</bean>
<bean class="nc.ui.uif2.tangramlayout.node.VSNode">
<property name="up">
<bean class="nc.ui.uif2.tangramlayout.node.CNode">
<property name="component">
<ref bean="viewb" />
</property>
</bean>
</property>
<property name="down">
<bean class="nc.ui.uif2.tangramlayout.node.CNode">
<property name="component">
<ref bean="billForm" />
</property>
</bean>
</property>
<property name="dividerLocation" value="43.0f" />
<property name="name" value="卡片" />
</bean>
</list>
</property>
<property name="name" value="cardLayout" />
<property name="showMode" value="CardLayout" />
</bean>
</property>
<property name="actions">
<list>
<ref bean="addAction" />
<ref bean="editAction" />
<ref bean="deleteScriptAction" />
<ref bean="defaultQueryAction" />
<ref bean="copyAction" />
<ref bean="separatorAction" />
<ref bean="defaultRefreshAction" />
<ref bean="separatorAction" />
<ref bean="commitScriptAction" />
<ref bean="unCommitScriptAction" />
<ref bean="approveScriptAction" />
<ref bean="uNApproveScriptAction" />
<ref bean="separatorAction" />
<ref bean="linkQueryAction" />
<ref bean="separatorAction" />
<ref bean="metaDataBasedPrintAction" />
<ref bean="metaDataBasedPrintActiona" />
<ref bean="outputAction" />
<ref bean="separatorAction" />
<ref bean="pFApproveStatusInfoAction" />
</list>
</property>
<property name="editActions">
<list>
<ref bean="saveScriptAction" />
<ref bean="cancelAction" />
</list>
</property>
<property name="model">
<ref bean="bmModel" />
</property>
<!--
<property name="model">
<ref bean="$vmObject.topActionDependModel"/>
</property>
-->
</bean>
调整结果:
<!-- 界面布局总装*********************************************************** -->
<bean id="container" class="nc.ui.uif2.TangramContainer" init-method="initUI">
<property name="tangramLayoutRoot">
<bean class="nc.ui.uif2.tangramlayout.node.TBNode">
<property name="tabs">
<list>
<bean class="nc.ui.uif2.tangramlayout.node.HSNode">
<property name="left">
<bean class="nc.ui.uif2.tangramlayout.node.CNode">
<property name="component">
<ref bean="viewa" />
</property>
</bean>
</property>
<property name="right">
<bean class="nc.ui.uif2.tangramlayout.node.CNode">
<property name="component">
<ref bean="billListView" />
</property>
</bean>
</property>
<property name="dividerLocation" value="215.0f" />
<property name="name" value="列表" />
</bean>
<bean class="nc.ui.uif2.tangramlayout.node.VSNode">
<property name="up">
<bean class="nc.ui.uif2.tangramlayout.node.CNode">
<property name="component">
<ref bean="viewb" />
</property>
</bean>
</property>
<property name="down">
<bean class="nc.ui.uif2.tangramlayout.node.CNode">
<property name="component">
<ref bean="billForm" />
</property>
</bean>
</property>
<property name="dividerLocation" value="43.0f" />
<property name="name" value="卡片" />
</bean>
</list>
</property>
<property name="name" value="cardLayout" />
<property name="showMode" value="CardLayout" />
</bean>
</property>
<property name="model">
<ref bean="bmModel" />
</property>
<!--
<property name="model">
<ref bean="$vmObject.topActionDependModel"/>
</property>
-->
</bean>
<!-- Actions -->
<bean id="toftpanelActionContributors" class="nc.ui.uif2.actions.ActionContributors">
<property name="contributors">
<list>
<ref bean="actionsOfList" />
<ref bean="actionsOfCard" />
</list>
</property>
</bean>
<!-- 列表显示下的按钮 -->
<bean id="actionsOfList" class="nc.ui.uif2.actions.StandAloneToftPanelActionContainer">
<constructor-arg ref="billListView" />
<property name="model" ref="bmModel" />
<property name="actions">
<list>
<ref bean="addAction" />
<ref bean="editAction" />
<ref bean="deleteScriptAction" />
<ref bean="defaultQueryAction" />
<ref bean="copyAction" />
<ref bean="separatorAction" />
<ref bean="defaultRefreshAction" />
<ref bean="separatorAction" />
<ref bean="commitScriptAction" />
<ref bean="unCommitScriptAction" />
<ref bean="approveScriptAction" />
<ref bean="uNApproveScriptAction" />
<ref bean="separatorAction" />
<ref bean="linkQueryAction" />
<ref bean="separatorAction" />
<ref bean="metaDataBasedPrintAction" />
<ref bean="metaDataBasedPrintActiona" />
<ref bean="outputAction" />
<ref bean="separatorAction" />
<ref bean="pFApproveStatusInfoAction" />
</list>
</property>
<property name="editActions">
<list>
<ref bean="saveScriptAction" />
<ref bean="cancelAction" />
</list>
</property>
</bean>
<!-- 卡片显示下的按钮 -->
<bean id="actionsOfCard" class="nc.ui.uif2.actions.StandAloneToftPanelActionContainer">
<constructor-arg ref="billForm" />
<property name="model" ref="bmModel" />
<property name="actions">
<list>
<ref bean="addAction" />
<ref bean="editAction" />
<ref bean="deleteScriptAction" />
<ref bean="defaultQueryAction" />
<ref bean="copyAction" />
<ref bean="separatorAction" />
<ref bean="defaultRefreshAction" />
<ref bean="separatorAction" />
<ref bean="commitScriptAction" />
<ref bean="unCommitScriptAction" />
<ref bean="approveScriptAction" />
<ref bean="uNApproveScriptAction" />
<ref bean="separatorAction" />
<ref bean="linkQueryAction" />
<ref bean="separatorAction" />
<ref bean="metaDataBasedPrintAction" />
<ref bean="metaDataBasedPrintActiona" />
<ref bean="outputAction" />
<ref bean="separatorAction" />
<ref bean="pFApproveStatusInfoAction" />
</list>
</property>
<property name="editActions">
<list>
<ref bean="saveScriptAction" />
<ref bean="cancelAction" />
</list>
</property>
</bean>