jford 2005/04/03 15:39:09 Modified: xdocs catalog.xml Added: xdocs portlet_config_GenericMVC.xml viewprocessors.xml Log: Added documentation for GenericMVCPortlet and viewprocessors Revision Changes Path 1.8 +3 -0 jakarta-jetspeed/xdocs/catalog.xml Index: catalog.xml =================================================================== RCS file: /home/cvs/jakarta-jetspeed/xdocs/catalog.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- catalog.xml 17 Mar 2004 21:27:50 -0000 1.7 +++ catalog.xml 3 Apr 2005 22:39:09 -0000 1.8 @@ -39,6 +39,9 @@ <li> <a href="portlet_config_Velocity.html">Velocity Portlet</a> </li> + <li> + <a href="portlet_config_GenericMVC.html">Generic MVC Portlet</a> + </li> <li> <a href="portlet_config_WebPagePortlet.html">Web Page Portlet</a> </li> 1.1 jakarta-jetspeed/xdocs/portlet_config_GenericMVC.xml Index: portlet_config_GenericMVC.xml =================================================================== <?xml version="1.0"?> <!-- Copyright 2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <document> <properties> <title>Portlet Configuration How To</title> <subtitle>GenericMVCPortlet</subtitle> <authors> <person name="Jeremy Ford" email="[EMAIL PROTECTED]"/> </authors> </properties> <body> <section name=''> <p> <font face="arial,helvetica,sanserif" size="+3"> <center><strong>Generic MVC Portlet</strong></center> </font> <br/> <font face="arial,helvetica,sanserif"> <center> <strong>Class Name : org.apache.jetspeed.portal.portlets.GenericMVCPortlet</strong> </center> </font> <br/> </p> </section> <section name='Description'> <p> Present content rendered via a the MVC pattern using a templating language(Velocity of JSP) in a portlet. </p> </section> <section name='Element: parameter'> <p> Only the template and viewtype parameters are required. If the "action" parameter is defined, the referenced class may require additional parameters. </p> <p> <a href="portlet_config_common.html#Element: parameter">Parameters common to many portlets.</a> </p> <table> <tr> <th>Parameter Name</th> <th>Description</th> </tr> <tr> <td colspan="1">viewtype</td> <td colspan="1">The type of View Processor to use. Currently, there are six <a href="viewprocessors.html">View Processors</a> to choose from. </td> </tr> <tr> <td colspan="1">action</td> <td colspan="1"> Name of action class, relative to <tt>org.apache.jetspeed.modules.actions</tt>. The class file is expected in <jetspeed_home>WEB-INF/classes/org/apache/jetspeed/modules/actions. <br/> This parameter is optional. </td> </tr> <tr> <td colspan="1">template</td> <td colspan="1"> Name of VM file. The file is expected in <jetspeed_home>WEB-INF/templates/vm/<em>media_type</em>. </td> </tr> </table> </section> <section name='Example of Registry Entry'> <source test=""><![CDATA[ <portlet-entry name="PortalSearch" hidden="false" type="ref" application="false" parent="GenericMVCPortlet"> <meta-info> <title>Search Portlet</title> <description>Sample Search Portlet to index and search web sites</description> </meta-info> <parameter name="template" value="search" hidden="true"/> <parameter name="viewtype" value="Velocity" hidden="true"/> <parameter name="action" value="portlets.SearchAction" hidden="true"/> <media-type ref="html"/> <category>search</category> </portlet-entry> ]]></source> </section> <!-- <section name='Example of use in Portal'> <p/> </section> --> <section name="Explanation of the Generic MVC Portlet's render/action phase"> </section> <section name='Example of Portlets'> <p> Jetspeed include the following example of Velocity porlets. </p> <table> <tr> <th>Portlet Name</th> <th>Description</th> </tr> <tr> <td colspan="1">HelloVelocity</td> <td colspan="1">Basic Velocity portlet</td> </tr> <tr> <td colspan="1">JSLINK Example</td> <td colspan="1"> Display the uses of $jslink </td> </tr> </table> </section> </body> </document> 1.1 jakarta-jetspeed/xdocs/viewprocessors.xml Index: viewprocessors.xml =================================================================== <?xml version="1.0"?> <!-- Copyright 2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <document> <properties> <title>Generic MVC Portlet View Processsors</title> <subtitle></subtitle> <authors> <person name="Jeremy Ford" email="[EMAIL PROTECTED]"/> </authors> </properties> <body> <section name="Description"> <p> View Processors are used by the GenericMVCPortlet to render content in the resulting page. Any templating engine could be potentially used as long as there is a corresponding ViewProcessor. Below is the list of ViewProcessors as well as guidelines on when they should be used. </p> </section> <section name="View Processors"> <subsection name="Velocity"> <p> View Processor that allows a velocity template to be used to render content. This processor dumps it's content directly to the servlet's output stream.a </p> </subsection> <subsection name="JSP"> <p> View Processor that allows a JSP template to be used to render content. This processor dumps it's content directly to the servlet's output stream.a </p> </subsection> <subsection name="BufferedVelocity"> <p> View Processor that allows a velocity template to be used to render content. This processor buffers the content so that during the render phase, a portlet's title can be set by an action. In order to see the title change immediately, it is suggested that you use the Buffered Simple Title Control. This control calls getContent on the portlet, allowing the portlet to change the title. It will then render the newly set title and the content that was buffered. </p> <p> **WARNING** Using the Buffered Simple Title Control without one of the Buffered* ViewProcessors could result in undesired behavior. Since the Velocity and JSP view processors write their content directly to the servlet output stream, it is possible that the content could be rendered before the title is rendered. </p> </subsection> <subsection name="BufferedJSP"> <p> View Processor that allows a JSP template to be used to render content. This processor buffers the content so that during the render phase, a portlet's title can be set by an action. In order to see the title change immediately, it is suggested that you use the Buffered Simple Title Control. This control calls getContent on the portlet, allowing the portlet to change the title. It will then render the newly set title and the content that was buffered. </p> <p> **WARNING** Using the Buffered Simple Title Control without one of the Buffered* ViewProcessors could result in undesired behavior. Since the Velocity and JSP view processors write their content directly to the servlet output stream, it is possible that the content could be rendered before the title is rendered. </p> </subsection> <subsection name="XSL"> <p> View Processor that renders an XML file with a specified stylesheet. Rendered output will be based on media type passed in by the browser. </p> </subsection> <subsection name="RSS"> <p> View Processor that renders an RSS file. This processor can obtain the title and description from the XML and set the porlet's title and description during it's render phase. </p> </subsection> </section> </body> </document>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]