2
我正在使用Hybris 5.6,并且试图在保存/重载/删除按钮旁边的编辑器区域添加一个按钮。Hybris HMC:在保存按钮旁边的ToolBarChip/Editor窗口中添加一个按钮
如何在下面的示例中添加按钮到ToolBarChip?
我正在使用Hybris 5.6,并且试图在保存/重载/删除按钮旁边的编辑器区域添加一个按钮。Hybris HMC:在保存按钮旁边的ToolBarChip/Editor窗口中添加一个按钮
如何在下面的示例中添加按钮到ToolBarChip?
这是相当可能的新动作(标签)添加到HMC,的工具栏但是它不是那么推荐,因为它可能会导致,而迁移一些问题。
<type name="AbstractOrder" mode="append">
<organizer mode="append" >
<editor>
<tab name="payment_and_delivery" position="2" mode="append">
<section name="deliveryadministration" mode="append" >
<table>
<tr>
<td width="16px">
</td>
<td>
<!-- here is the interesting part -->
<action type="item"
classname="com.foo.bar.MyNewAction"
name="action.my_new_action"
toolbaricon="my_new_action"
icon="images/icons/my_new_action_icon.gif"
autosave="true"
showtoolbarlabel="true"
hidebutton="true"
/>
</td>
</tr>
</table>
</section>
</tab>
</editor>
</organizer>
</type>
MyNewAction.java
新的类,从ItemAction
延伸,并实现该方法ActionResult perform(ActionEvent event)
:public MyNewAction extends ItemAction {
@Override
public ActionResult perform(ActionEvent actionEvent) throws JaloBusinessException {
//what the new action should do here ...
}
}
注意:你可以覆盖其他有趣的方法是触发而动作具有像:boolean needConfirmation()
或String getConfirmationMessage()
......
结果会是这样:
谢谢,它效果很好:)我只是有一些问题:为什么'payment_and_delivery'和'deliveryadministration'? “位置2”是什么意思? –
这意味着这个新的'Action按钮'属于Tab:'Payment and Delivery'中的Section:'Delivery',这只是一个例子,使'hidebutton =“false”'并且明白我的意思。 –
好吧,我明白了。你知道只有在某些事情是真的时才能显示按钮吗? –