|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.context.JcmsMessage
public class JcmsMessage
Wrapper class for message(s) to be displayed to the user in the GUI.
In order for the message to be visible, JSP doMessageBox.jsp
must be
invoked, either in the current request when using JcmsContext.addMsg(javax.servlet.http.HttpServletRequest, JcmsMessage)
,
or in any request of the session when using JcmsContext.addMsgSession(javax.servlet.http.HttpServletRequest, JcmsMessage)
.
Example, when used inside any Java Bean or FormHandler extending JcmsContext
or any
of its subclass ( JcmsJspContext
, JcmsFormHandler
...) :
addMsg( new JcmsMessage(Level.WARN, glp("jcmsplugin.myplugin.msg.warn.missing-something")) );Example when used in any other class :
JcmsContext.addMsg(request, new JcmsMessage(Level.WARN, JcmsUtil.glp(userLang, "jcmsplugin.myplugin.msg.warn.missing-something")) );
Nested Class Summary | |
---|---|
static class |
JcmsMessage.Level
Criticity Level of message being displayed to the User. |
Constructor Summary | |
---|---|
JcmsMessage(JcmsMessage.Level level,
String message)
Creates a new JcmsMessage with the specified level and message |
|
JcmsMessage(String id,
JcmsMessage.Level level,
String message)
Creates a new JcmsMessage with the specified level and message, and with a unique identifier. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getId()
Retrieves the id of this JcmsMessage, if any. |
JcmsMessage.Level |
getLevel()
|
String |
getMessage()
|
void |
setId(String id)
|
void |
setLevel(JcmsMessage.Level level)
|
void |
setMessage(String message)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JcmsMessage(JcmsMessage.Level level, String message)
level
- the criticity levelmessage
- the message, must already be I18Nedpublic JcmsMessage(String id, JcmsMessage.Level level, String message)
id
- an identifier of this message, can be nulllevel
- the criticity levelmessage
- the message, must already be I18NedMethod Detail |
---|
public String getId()
public void setId(String id)
public JcmsMessage.Level getLevel()
public void setLevel(JcmsMessage.Level level)
public String getMessage()
public void setMessage(String message)
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |