public class MessageStructureUtils extends Object
Constructor and Description |
---|
MessageStructureUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
addBlanks(String text)
Inserts into the string passed in, if spaces exist at the beginning and/or end,
so spacing is not lost in html translation.
|
static List<Component> |
parseMessage(String messageId,
String messageText,
List<Component> componentList,
View view,
boolean parseComponents)
Parses the message text passed in and returns the resulting rich message component structure.
|
static String |
translateStringMessage(String messageText)
Translate a message with special hooks described in MessageStructureUtils.parseMessage.
|
public MessageStructureUtils()
public static String translateStringMessage(String messageText)
messageText
- messageText with only String translateable tags included (no id or component index tags)parseMessage(java.lang.String, java.lang.String, java.util.List<org.kuali.rice.krad.uif.component.Component>, org.kuali.rice.krad.uif.view.View, boolean)
public static List<Component> parseMessage(String messageId, String messageText, List<Component> componentList, View view, boolean parseComponents)
If special characters [] are detected the message is split at that location. The types of features supported by the parse are (note that <> are not part of the content, they specify placeholders):
In addition to these settings, you can also specify data to send to the server in this fashion (space is required between settings and data):
[action=<action settings> data={key1: 'value 1', key2: value2}]messageId
- id of the messagemessageText
- message text to be parsedcomponentList
- the inlineComponent listview
- the current viewparseComponents
- true to parse componentsCopyright © 2005–2016 The Kuali Foundation. All rights reserved.