📄 strutsviewcommand.html
字号:
<A NAME="saveAttributes(javax.portlet.PortletRequest, com.ibm.portal.struts.command.ViewCommandExecutionContext, java.util.List, java.util.List)"><!-- --></A><H3>saveAttributes</H3><PRE>protected void <B>saveAttributes</B>(javax.portlet.PortletRequest request, <A HREF="../../../../../com/ibm/portal/struts/command/ViewCommandExecutionContext.html" title="class in com.ibm.portal.struts.command">ViewCommandExecutionContext</A> context, java.util.List namesToSave, java.util.List typesToSave)</PRE><DL><DD>Saves attributes from the request by name for later restoral when the command is executed.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>request</CODE> - The request object to save attributes from<DD><CODE>context</CODE> - the view command execution context<DD><CODE>namesToSave</CODE> - a list of the attribute names to save<DD><CODE>typesToSave</CODE> - a list of the types to save</DL></DD></DL><HR><A NAME="saveAttribute(javax.portlet.PortletRequest, java.lang.String)"><!-- --></A><H3>saveAttribute</H3><PRE>protected void <B>saveAttribute</B>(javax.portlet.PortletRequest request, java.lang.String name)</PRE><DL><DD>Saves the given request attribute for later restoral when the command is executed.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>request</CODE> - the request object to get attribute from<DD><CODE>name</CODE> - the name of the attribute to save</DL></DD></DL><HR><A NAME="saveAsAttribute(java.lang.String, java.lang.Object)"><!-- --></A><H3>saveAsAttribute</H3><PRE>protected void <B>saveAsAttribute</B>(java.lang.String name, java.lang.Object value)</PRE><DL><DD>Saves the given named object for later restoral as an attribute for when the command is executed.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - of attribute to save<DD><CODE>value</CODE> - the value to store</DL></DD></DL><HR><A NAME="saveAttributes(javax.portlet.PortletRequest, com.ibm.portal.struts.command.ViewCommandExecutionContext)"><!-- --></A><H3>saveAttributes</H3><PRE>public void <B>saveAttributes</B>(javax.portlet.PortletRequest request, <A HREF="../../../../../com/ibm/portal/struts/command/ViewCommandExecutionContext.html" title="class in com.ibm.portal.struts.command">ViewCommandExecutionContext</A> context)</PRE><DL><DD>Saves attributes from the request by name for later restoral when the command is executed.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>request</CODE> - The request object to save attributes from<DD><CODE>context</CODE> - the view command execution context</DL></DD></DL><HR><A NAME="getSavedAttributes()"><!-- --></A><H3>getSavedAttributes</H3><PRE>public java.util.Map <B>getSavedAttributes</B>()</PRE><DL><DD>Returns the saved attributes map. The saveAttributes method should be called before calling this method.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>returns the map of saved attributes.</DL></DD></DL><HR><A NAME="setSavedAttributes(java.util.Map)"><!-- --></A><H3>setSavedAttributes</H3><PRE>public void <B>setSavedAttributes</B>(java.util.Map attributeMap)</PRE><DL><DD>Sets the saved attributes map. Can set the attributes before execute is called which will repopulate the request object with the saved attributes.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attributeMap</CODE> - the map of attributes.</DL></DD></DL><HR><A NAME="setRemoveOnModeChange(boolean)"><!-- --></A><H3>setRemoveOnModeChange</H3><PRE>public void <B>setRemoveOnModeChange</B>(boolean value)</PRE><DL><DD>Allows setting a flag so that this command is removed when the Portal mode changes.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - true will cause this command to get removed</DL></DD></DL><HR><A NAME="getRemoveOnModeChange()"><!-- --></A><H3>getRemoveOnModeChange</H3><PRE>public boolean <B>getRemoveOnModeChange</B>()</PRE><DL><DD>Returns the state of removeOnModeChange.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>returns true if comamnd should be removed on mode change.</DL></DD></DL><HR><A NAME="getPrefix(javax.portlet.PortletRequest)"><!-- --></A><H3>getPrefix</H3><PRE>public java.lang.String <B>getPrefix</B>(javax.portlet.PortletRequest request)</PRE><DL><DD>Returns the prefix associated with this command.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>request</CODE> - the request object<DT><B>Returns:</B><DD>returns the prefix</DL></DD></DL><HR><A NAME="setPrefix(javax.portlet.PortletRequest, java.lang.String)"><!-- --></A><H3>setPrefix</H3><PRE>public void <B>setPrefix</B>(javax.portlet.PortletRequest request, java.lang.String prefix)</PRE><DL><DD>Sets the prefix associated with this command.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>request</CODE> - the request object<DT><B>Returns:</B><DD>String the prefix</DL></DD></DL><HR><A NAME="getContentType(javax.portlet.PortletRequest)"><!-- --></A><H3>getContentType</H3><PRE>public java.lang.String <B>getContentType</B>(javax.portlet.PortletRequest request)</PRE><DL><DD>Returns the content type associated with this command. The content type is the mime type that was determined from the request.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>request</CODE> - the portlet request<DT><B>Returns:</B><DD>returns the content type</DL></DD></DL><HR><A NAME="setContentType(javax.portlet.PortletRequest, java.lang.String)"><!-- --></A><H3>setContentType</H3><PRE>public void <B>setContentType</B>(javax.portlet.PortletRequest request, java.lang.String contentType)</PRE><DL><DD>Sets the content type associated with this command.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>request</CODE> - the portlet request<DD><CODE>contentType</CODE> - the content type</DL></DD></DL><HR><A NAME="execute(javax.portlet.RenderRequest, javax.portlet.RenderResponse, com.ibm.portal.struts.command.ViewCommandExecutionContext)"><!-- --></A><H3>execute</H3><PRE>public void <B>execute</B>(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, <A HREF="../../../../../com/ibm/portal/struts/command/ViewCommandExecutionContext.html" title="class in com.ibm.portal.struts.command">ViewCommandExecutionContext</A> executionContext) throws javax.portlet.PortletException</PRE><DL><DD>Executes the given command given the request and response objects. This implementation should be called by subclasses. The execute method is always called in the render phase of Portal, so the request and response objects are the RenderRequest and RenderResponse objects.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/ibm/portal/struts/command/IViewCommand.html#execute(javax.portlet.RenderRequest, javax.portlet.RenderResponse, com.ibm.portal.struts.command.ViewCommandExecutionContext)">execute</A></CODE> in interface <CODE><A HREF="../../../../../com/ibm/portal/struts/command/IViewCommand.html" title="interface in com.ibm.portal.struts.command">IViewCommand</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>request</CODE> - The request object<DD><CODE>executionContext</CODE> - the execution context object<DD><CODE>response</CODE> - the response object<DT><B>Throws:</B><DD><CODE>javax.portlet.PortletException</CODE> - if the request cannot be fulfilled</DL></DD></DL><HR><A NAME="addAttribute(java.lang.Object, java.util.List)"><!-- --></A><H3>addAttribute</H3><PRE>protected static void <B>addAttribute</B>(java.lang.Object attribute, java.util.List list)</PRE><DL><DD>Adds the attribute to the list. Caller is assumed to have synchronized the list.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attribute</CODE> - the attribute to add to the list<DD><CODE>list</CODE> - the array list to update</DL></DD></DL><HR><A NAME="removeAttribute(java.lang.Object, java.util.List)"><!-- --></A><H3>removeAttribute</H3><PRE>protected static void <B>removeAttribute</B>(java.lang.Object attribute, java.util.List list)</PRE><DL><DD>Removes the attribute from the list. Caller is assumed to have synchronized the list.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attribute</CODE> - the attribute<DD><CODE>list</CODE> - the array list to update</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=3 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"> <A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</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="../../../../../serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</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="../../../../../com/ibm/portal/struts/command/StrutsViewActionCommand.html" title="class in com.ibm.portal.struts.command"><B>PREV CLASS</B></A> <A HREF="../../../../../com/ibm/portal/struts/command/StrutsViewErrorCommand.html" title="class in com.ibm.portal.struts.command"><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="StrutsViewCommand.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 | <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><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -