📄 scopedattributeelresolver.html
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A><<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/servlet/jsp/el/ScopedAttributeELResolver.html#getType(javax.el.ELContext, java.lang.Object, java.lang.Object)">getType</A></B>(<A HREF="../../../../javax/el/ELContext.html" title="class in javax.el">ELContext</A> context, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> base, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> property)</CODE><BR> If the base object is <code>null</code>, returns <code>Object.class</code> to indicate that any type is valid to set for a scoped attribute.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/servlet/jsp/el/ScopedAttributeELResolver.html#getValue(javax.el.ELContext, java.lang.Object, java.lang.Object)">getValue</A></B>(<A HREF="../../../../javax/el/ELContext.html" title="class in javax.el">ELContext</A> context, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> base, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> property)</CODE><BR> If the base object is <code>null</code>, searches the page, request, session and application scopes for an attribute with the given name and returns it, or <code>null</code> if no attribute exists with the current name.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/servlet/jsp/el/ScopedAttributeELResolver.html#isReadOnly(javax.el.ELContext, java.lang.Object, java.lang.Object)">isReadOnly</A></B>(<A HREF="../../../../javax/el/ELContext.html" title="class in javax.el">ELContext</A> context, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> base, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> property)</CODE><BR> If the base object is <code>null</code>, returns <code>false</code> to indicate that scoped attributes are never read-only.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/servlet/jsp/el/ScopedAttributeELResolver.html#setValue(javax.el.ELContext, java.lang.Object, java.lang.Object, java.lang.Object)">setValue</A></B>(<A HREF="../../../../javax/el/ELContext.html" title="class in javax.el">ELContext</A> context, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> base, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> property, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> val)</CODE><BR> If the base object is <code>null</code>, sets an existing scoped attribute to the new value, or creates a new scoped attribute if one does not exist by this name.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="ScopedAttributeELResolver()"><!-- --></A><H3>ScopedAttributeELResolver</H3><PRE>public <B>ScopedAttributeELResolver</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getValue(javax.el.ELContext, java.lang.Object, java.lang.Object)"><!-- --></A><H3>getValue</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getValue</B>(<A HREF="../../../../javax/el/ELContext.html" title="class in javax.el">ELContext</A> context, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> base, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> property)</PRE><DL><DD>If the base object is <code>null</code>, searches the page, request, session and application scopes for an attribute with the given name and returns it, or <code>null</code> if no attribute exists with the current name. <p>The <code>propertyResolved</code> property of the <code>ELContext</code> object must be set to <code>true</code> by this resolver before returning if base is <code>null</code>. If this property is not <code>true</code> after this method is called, the caller should ignore the return value.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/el/ELResolver.html#getValue(javax.el.ELContext, java.lang.Object, java.lang.Object)">getValue</A></CODE> in class <CODE><A HREF="../../../../javax/el/ELResolver.html" title="class in javax.el">ELResolver</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>context</CODE> - The context of this evaluation.<DD><CODE>base</CODE> - Only <code>null</code> is handled by this resolver. Other values will result in an immediate return.<DD><CODE>property</CODE> - The name of the scoped attribute to resolve.<DT><B>Returns:</B><DD>If the <code>propertyResolved</code> property of <code>ELContext</code> was set to <code>true</code>, then the scoped attribute; otherwise undefined.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if context is <code>null</code><DD><CODE><A HREF="../../../../javax/servlet/jsp/el/ELException.html" title="class in javax.servlet.jsp.el">ELException</A></CODE> - if an exception was thrown while performing the property or variable resolution. The thrown exception must be included as the cause property of this exception, if available.</DL></DD></DL><HR><A NAME="getType(javax.el.ELContext, java.lang.Object, java.lang.Object)"><!-- --></A><H3>getType</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A><<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>> <B>getType</B>(<A HREF="../../../../javax/el/ELContext.html" title="class in javax.el">ELContext</A> context, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> base, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> property)</PRE><DL><DD>If the base object is <code>null</code>, returns <code>Object.class</code> to indicate that any type is valid to set for a scoped attribute. <p>The <code>propertyResolved</code> property of the <code>ELContext</code> object must be set to <code>true</code> by this resolver before returning if base is <code>null</code>. If this property is not <code>true</code> after this method is called, the caller should ignore the return value.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/el/ELResolver.html#getType(javax.el.ELContext, java.lang.Object, java.lang.Object)">getType</A></CODE> in class <CODE><A HREF="../../../../javax/el/ELResolver.html" title="class in javax.el">ELResolver</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>context</CODE> - The context of this evaluation.<DD><CODE>base</CODE> - Only <code>null</code> is handled by this resolver. Other values will result in an immediate return.<DD><CODE>property</CODE> - The name of the scoped attribute to resolve.<DT><B>Returns:</B><DD>If the <code>propertyResolved</code> property of <code>ELContext</code> was set to <code>true</code>, then <code>Object.class</code>; otherwise undefined.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if context is <code>null</code><DD><CODE><A HREF="../../../../javax/servlet/jsp/el/ELException.html" title="class in javax.servlet.jsp.el">ELException</A></CODE> - if an exception was thrown while performing the property or variable resolution. The thrown exception must be included as the cause property of this exception, if available.</DL></DD></DL><HR><A NAME="setValue(javax.el.ELContext, java.lang.Object, java.lang.Object, java.lang.Object)"><!-- --></A><H3>setValue</H3><PRE>public void <B>setValue</B>(<A HREF="../../../../javax/el/ELContext.html" title="class in javax.el">ELContext</A> context, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> base, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> property, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> val)</PRE><DL><DD>If the base object is <code>null</code>, sets an existing scoped attribute to the new value, or creates a new scoped attribute if one does not exist by this name. <p>If the provided attribute name matches the key of an attribute in page scope, request scope, session scope, or application scope, the corresponding attribute value will be replaced by the provided value. Otherwise, a new page scope attribute will be created with the given name and value.</p> <p>The <code>propertyResolved</code> property of the <code>ELContext</code> object must be set to <code>true</code> by this resolver before returning if base is <code>null</code>. If this property is not <code>true</code> after this method is called,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -