Page History
消息视图定义消息如何在Pulse信息中心里显示,并且用户可以对这个消息做什么。Magnolia的default
消息视图可以显示任何系统消息,并允许用户删除它们。在/modules/workflow/messageViews/workflow路径下
的workflow
消息视图为一个比较高级的样例。
Table of Contents |
---|
定义
以下就是在/modules/ui-admincentral/messageViews/default
里如何定义default
消息视图。您可以拷贝或扩展为您自己的视图的起始点。
Advanced Tables - Table Plus | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
节点:
actions
. 动作定义定义用户可以执行什么样的动作。例如,用户可以准许或拒绝一个已发布的页面。form
. 表单定义定义什么样的消息细节会在视图里显示,如发送者和对象。表单字段在消息视图里被绘制成静态文字,而不是可填写的字段。actionbar
. 动作栏定义引用在消息视图或其他地方定义的动作。动作栏在消息视图的旁边显示。
以下为default视图里消息看起来的样子。
在代码里使用视图
如果要在代码里使用您定制的消息视图,需要先在
Javadoc | ||
---|---|---|
|
Code Block | ||
---|---|---|
| ||
private sendMessageWithCustomView(String messageText) { final Message message = new Message(); message.setMessage(messageText); message.setType(MessageType.INFO); // Name of the view as defined in the configuration message.setView("myCustomView"); messagesManager.sendLocalMessage(message); } |
Overview
Content Tools