com.pow2.struts.util
Class MessageUtil

java.lang.Object
  extended bycom.pow2.struts.util.MessageUtil

public class MessageUtil
extends Object

Struts' MessageUtil Class

Author:
Luca Fossato

Constructor Summary
MessageUtil()
           
 
Method Summary
static String getMessage(PageContext pageContext, String messageKey)
          Gets the message string related to the messageKey key.
static String getMessage(PageContext pageContext, String messageKey, Object[] args)
          Gets the message string related to the messageKey key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageUtil

public MessageUtil()
Method Detail

getMessage

public static String getMessage(PageContext pageContext,
                                String messageKey)
Gets the message string related to the messageKey key.
This method is a wrapper for org.apache.struts.util.RequestUtils.message(javax.servlet.jsp.PageContext pageContext, java.lang.String bundle, java.lang.String locale, java.lang.String key) ; it uses the default MESSAGES_KEY and LOCALE_KEY values set by org.apache.struts.Action.

Parameters:
pageContext - the pageContext object
messageKey - the message key
Returns:
the message string related to the messageKey key, or null if any error occurs

getMessage

public static String getMessage(PageContext pageContext,
                                String messageKey,
                                Object[] args)
Gets the message string related to the messageKey key.
This method is a wrapper for org.apache.struts.util.RequestUtils.message(javax.servlet.jsp.PageContext pageContext, java.lang.String bundle, java.lang.String locale, java.lang.String key, java.lang.Object[] args) ; it uses the default MESSAGES_KEY and LOCALE_KEY values set by org.apache.struts.Action.

Parameters:
pageContext - the pageContext object
messageKey - the message key
args - replacement parameters for this message
Returns:
the message string related to the messageKey key, or null if any error occurs


Copyright © 2002-2004 Power Of Two S.R.L. All Rights Reserved.