|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.tinyjee.maven.dim.extensions.MessageBoxParameterTransformer
public class MessageBoxParameterTransformer
The message box extension is implemented as a RequestParameterTransformer
that is triggered when the parameter
"message-box
" is set with the macro call. When "message-box=text to display
" is present, the transformer
sets "source
" to a bundled velocity template that performs the actual rendering.
Field Summary | |
---|---|
static String |
PARAM_BACKGROUND_COLOR
Optional parameter overriding the color of the message box background. |
static String |
PARAM_COLOR
Optional parameter overriding the border color of the message box. |
static String |
PARAM_ICON
Optional parameter setting a site resource path to the image that is used with the message box instead of the built-in SVG graphics. |
static String |
PARAM_MESSAGE_BOX
Enables this extension and sets the text to display inside the message box. |
static String |
PARAM_TEXT_COLOR
Optional parameter overriding the text color of the message box. |
static String |
PARAM_TYPE
Optional parameter specifying the type of message box to display. |
Fields inherited from interface org.tinyjee.maven.dim.spi.RequestParameterTransformer |
---|
TRANSFORMERS |
Constructor Summary | |
---|---|
MessageBoxParameterTransformer()
|
Method Summary | |
---|---|
void |
transformParameters(Map<String,Object> requestParams)
Transforms the specified request parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PARAM_MESSAGE_BOX
source
" or "source-class
" were
specified with the macro call. This behaviour ensures that the parameter "message-box
" can still be used
with ordinary macro calls where a source or source-class was set.
Markup: The message box is rendered as pure HTML and text is added to the box as-is.
As a consequence HTML can be used as markup inside the given message and it is also the only valid
markup that may be used here.
%{include|message-box=Hello <b>World!</b>}
can be used with the APT format,
to have "World!" formatted in strong text style.
public static final String PARAM_TYPE
public static final String PARAM_TEXT_COLOR
public static final String PARAM_COLOR
public static final String PARAM_BACKGROUND_COLOR
public static final String PARAM_ICON
%{include|icon=images/alert.png|message-box=This is an alert message}
Note: If no type
is specified, it will be set accordingly when the image path contains one of the
keywords "alert
" or "warn(ing)
" ("info" remains the default message box type).
Constructor Detail |
---|
public MessageBoxParameterTransformer()
Method Detail |
---|
public void transformParameters(Map<String,Object> requestParams)
RequestParameterTransformer
transformParameters
in interface RequestParameterTransformer
requestParams
- the request params to modify.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |