📄 portletresponse.html.svn-base
字号:
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key of the property to be returned to the portal<DD><CODE>value</CODE> - the value of the property to be returned to the portal<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if key is <code>null</code>.</DL></DD></DL><HR><A NAME="setProperty(java.lang.String, java.lang.String)"><!-- --></A><H3>setProperty</H3><PRE>void <B>setProperty</B>(java.lang.String key, java.lang.String value)</PRE><DL><DD>Sets a String property to be returned to the portal. <p> Response properties can be viewed as header values set for the portal application. If these header values are intended to be transmitted to the client they should be set before the response is committed. <p> This method resets all properties previously added with the same key.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the key of the property to be returned to the portal<DD><CODE>value</CODE> - the value of the property to be returned to the portal<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if key is <code>null</code>.</DL></DD></DL><HR><A NAME="encodeURL(java.lang.String)"><!-- --></A><H3>encodeURL</H3><PRE>java.lang.String <B>encodeURL</B>(java.lang.String path)</PRE><DL><DD>Returns the encoded URL of the resource, like servlets, JSPs, images and other static files, at the given path. <p> Portlets should encode all resource URLs pointing to resources in the portlet application via this method in order to ensure that they get served via the portal application. <p> Some portal/portlet-container implementation may require those URLs to contain implementation specific data encoded in it. Because of that, portlets should use this method to create such URLs. <p> The <code>encodeURL</code> method may include the session ID and other portal/portlet-container specific information into the URL. If encoding is not needed, it returns the URL unchanged. <p> Portlet developer should be aware that the returned URL might not be a well formed URL but a special token at the time the portlet is generating its content. Thus portlets should not add additional parameters on the resulting URL or expect to be able to parse the URL. As a result, the outcome of the encodeURL call may be different than calling encodeURL in the servlet world.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>path</CODE> - the URI path to the resource. This must be either an absolute URL (e.g. <code>http://my.co/myportal/mywebap/myfolder/myresource.gif</code>) or a full path URI (e.g. <code>/myportal/mywebap/myfolder/myresource.gif</code>).<DT><B>Returns:</B><DD>the encoded resource URL as string, may not be a valid URL<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if path doesn't have a leading slash or is not an absolute URL</DL></DD></DL><HR><A NAME="getNamespace()"><!-- --></A><H3>getNamespace</H3><PRE>java.lang.String <B>getNamespace</B>()</PRE><DL><DD>The value returned by this method should be prefixed or appended to elements, such as JavaScript variables or function names, to ensure they are unique in the context of the portal page. <p> The namespace value must be constant for the lifetime of the portlet window.<P><DD><DL><DT><B>Returns:</B><DD>the namespace</DL></DD></DL><HR><A NAME="addProperty(javax.servlet.http.Cookie)"><!-- --></A><H3>addProperty</H3><PRE>void <B>addProperty</B>(javax.servlet.http.Cookie cookie)</PRE><DL><DD>Adds a HTTP Cookie property to the response.<br> The portlet should note that the cookie may not make it to the client, but may be stored at the portal. <p> This method allows response properties to have multiple cookies. <p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>cookie</CODE> - the cookie to be added to the response<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if cookie is <code>null</code>.<DT><B>Since:</B></DT> <DD>2.0</DD></DL></DD></DL><HR><A NAME="addProperty(java.lang.String, org.w3c.dom.Element)"><!-- --></A><H3>addProperty</H3><PRE>void <B>addProperty</B>(java.lang.String key, org.w3c.dom.Element element)</PRE><DL><DD>Adds an XML DOM element property to the response. <p> If a DOM element with the provided key already exists the provided element will be stored in addition to the existing element under the same key. <p> If the element is <code>null</code> the key is removed from the response. <p> Response XML DOM element properties can be viewed as additional response document sections set for the portal application. If these header values are intended to be transmitted to the client they should be set before the response is committed.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the key of the property to be returned to the portal<DD><CODE>element</CODE> - the XML DOM element to be added to the response<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if key is <code>null</code>.<DT><B>Since:</B></DT> <DD>2.0</DD></DL></DD></DL><HR><A NAME="createElement(java.lang.String)"><!-- --></A><H3>createElement</H3><PRE>org.w3c.dom.Element <B>createElement</B>(java.lang.String tagName) throws org.w3c.dom.DOMException</PRE><DL><DD>Creates an element of the type specified to be used in the <A HREF="../../javax/portlet/PortletResponse.html#addProperty(java.lang.String, org.w3c.dom.Element)"><CODE>addProperty(String,Element)</CODE></A> method.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>tagName</CODE> - name of the element type to instantiate<DT><B>Returns:</B><DD>A new Element object with the nodeName attribute set to tagName, and localName, prefix, and namespaceURI set to null.<DT><B>Throws:</B><DD><CODE>org.w3c.dom.DOMException</CODE> - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <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/PortletResponse.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-files/index-1.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="../../javax/portlet/PortletRequestDispatcher.html" title="interface in javax.portlet"><B>PREV CLASS</B></A> <A HREF="../../javax/portlet/PortletSecurityException.html" title="class in javax.portlet"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?javax/portlet/PortletResponse.html" target="_top"><B>FRAMES</B></A> <A HREF="PortletResponse.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -