📄 propertymessageresources.html
字号:
<BR>
Load the messages associated with the specified Locale key.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_org.apache.struts.util.MessageResources"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class org.apache.struts.util.<A HREF="../../../../org/apache/struts/util/MessageResources.html">MessageResources</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../org/apache/struts/util/MessageResources.html#escape(java.lang.String)">escape</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#getConfig()">getConfig</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#getFactory()">getFactory</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#getMessage(java.util.Locale, java.lang.String, java.lang.Object)">getMessage</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#getMessage(java.util.Locale, java.lang.String, java.lang.Object[])">getMessage</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#getMessage(java.util.Locale, java.lang.String, java.lang.Object, java.lang.Object)">getMessage</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#getMessage(java.util.Locale, java.lang.String, java.lang.Object, java.lang.Object, java.lang.Object)">getMessage</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#getMessage(java.util.Locale, java.lang.String, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object)">getMessage</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#getMessage(java.lang.String)">getMessage</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#getMessage(java.lang.String, java.lang.Object)">getMessage</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#getMessage(java.lang.String, java.lang.Object[])">getMessage</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#getMessage(java.lang.String, java.lang.Object, java.lang.Object)">getMessage</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#getMessage(java.lang.String, java.lang.Object, java.lang.Object, java.lang.Object)">getMessage</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#getMessage(java.lang.String, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object)">getMessage</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#getMessageResources(java.lang.String)">getMessageResources</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#getReturnNull()">getReturnNull</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#isEscape()">isEscape</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#isPresent(java.util.Locale, java.lang.String)">isPresent</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#isPresent(java.lang.String)">isPresent</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#localeKey(java.util.Locale)">localeKey</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#log(java.lang.String)">log</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#log(java.lang.String, java.lang.Throwable)">log</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#messageKey(java.util.Locale, java.lang.String)">messageKey</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#messageKey(java.lang.String, java.lang.String)">messageKey</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#setEscape(boolean)">setEscape</A>, <A HREF="../../../../org/apache/struts/util/MessageResources.html#setReturnNull(boolean)">setReturnNull</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="locales"><!-- --></A><H3>
locales</H3>
<PRE>
protected java.util.HashMap <B>locales</B></PRE>
<DL>
<DD>The set of locale keys for which we have already loaded messages, keyed by the value calculated in <code>localeKey()</code>.</DL>
<HR>
<A NAME="log"><!-- --></A><H3>
log</H3>
<PRE>
protected static final org.apache.commons.logging.Log <B>log</B></PRE>
<DL>
<DD>The <code>Log</code> instance for this class.</DL>
<HR>
<A NAME="messages"><!-- --></A><H3>
messages</H3>
<PRE>
protected java.util.HashMap <B>messages</B></PRE>
<DL>
<DD>The cache of messages we have accumulated over time, keyed by the value calculated in <code>messageKey()</code>.</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="PropertyMessageResources(org.apache.struts.util.MessageResourcesFactory, java.lang.String)"><!-- --></A><H3>
PropertyMessageResources</H3>
<PRE>
public <B>PropertyMessageResources</B>(<A HREF="../../../../org/apache/struts/util/MessageResourcesFactory.html">MessageResourcesFactory</A> factory, java.lang.String config)</PRE>
<DL>
<DD>Construct a new PropertyMessageResources according to the specified parameters.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>factory</CODE> - The MessageResourcesFactory that created us<DD><CODE>config</CODE> - The configuration parameter for this MessageResources</DL>
</DD>
</DL>
<HR>
<A NAME="PropertyMessageResources(org.apache.struts.util.MessageResourcesFactory, java.lang.String, boolean)"><!-- --></A><H3>
PropertyMessageResources</H3>
<PRE>
public <B>PropertyMessageResources</B>(<A HREF="../../../../org/apache/struts/util/MessageResourcesFactory.html">MessageResourcesFactory</A> factory, java.lang.String config, boolean returnNull)</PRE>
<DL>
<DD>Construct a new PropertyMessageResources according to the specified parameters.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>factory</CODE> - The MessageResourcesFactory that created us<DD><CODE>config</CODE> - The configuration parameter for this MessageResources<DD><CODE>returnNull</CODE> - The returnNull property we should initialize with</DL>
</DD>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getMessage(java.util.Locale, java.lang.String)"><!-- --></A><H3>
getMessage</H3>
<PRE>
public java.lang.String <B>getMessage</B>(java.util.Locale locale, java.lang.String key)</PRE>
<DL>
<DD>Returns a text message for the specified key, for the default Locale. A null string result will be returned by this method if no relevant message resource is found for this key or Locale, if the <code>returnNull</code> property is set. Otherwise, an appropriate error message will be returned. <p> This method must be implemented by a concrete subclass.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/struts/util/MessageResources.html#getMessage(java.util.Locale, java.lang.String)">getMessage</A></CODE> in class <CODE><A HREF="../../../../org/apache/struts/util/MessageResources.html">MessageResources</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>locale</CODE> - The requested message Locale, or <code>null</code> for the system default Locale<DD><CODE>key</CODE> - The message key to look up<DT><B>Returns:</B><DD>text message for the specified key and locale</DL>
</DD>
</DL>
<HR>
<A NAME="loadLocale(java.lang.String)"><!-- --></A><H3>
loadLocale</H3>
<PRE>
protected void <B>loadLocale</B>(java.lang.String localeKey)</PRE>
<DL>
<DD>Load the messages associated with the specified Locale key. For this implementation, the <code>config</code> property should contain a fully qualified package and resource name, separated by periods, of a series of property resources to be loaded from the class loader that created this PropertyMessageResources instance. This is exactly the same name format you would use when utilizing the <code>java.util.PropertyResourceBundle</code> class.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>localeKey</CODE> - Locale key for the messages to be retrieved</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PropertyMessageResources.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/apache/struts/util/ModuleUtils.html"><B>PREV CLASS</B></A>
<A HREF="../../../../org/apache/struts/util/PropertyMessageResourcesFactory.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="PropertyMessageResources.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -