taylor      2004/04/09 10:48:20

  Added:       tutorial/xdocs/images image006-6.jpg
               tutorial/xdocs/6 modes.xml
  Log:
  converted 6.4 to xdocs

  

  PR:

  Obtained from:

  Submitted by: 

  Reviewed by:  

  CVS: ----------------------------------------------------------------------

  CVS: PR:

  CVS:   If this change addresses a PR in the problem report tracking

  CVS:   database, then enter the PR number(s) here.

  CVS: Obtained from:

  CVS:   If this change has been taken from another system, such as NCSA,

  CVS:   then name the system in this line, otherwise delete it.

  CVS: Submitted by:

  CVS:   If this code has been contributed to Apache by someone else; i.e.,

  CVS:   they sent us a patch or a new module, then include their name/email

  CVS:   address here. If this is your work then delete this line.

  CVS: Reviewed by:

  CVS:   If we are doing pre-commit code reviews and someone else has

  CVS:   reviewed your changes, include their name(s) here.

  CVS:   If you have not had it reviewed then delete this line.

  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed/tutorial/xdocs/images/image006-6.jpg
  
        <<Binary file>>
  
  
  1.1                  jakarta-jetspeed/tutorial/xdocs/6/modes.xml
  
  Index: modes.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>
      <author email="[EMAIL PROTECTED]">David Sean Taylor</author>
      <title>Portlet Modes</title>
    </properties>
  
  <body>
  
  <section name="Portlet Modes">
  <p>
  There are several portlet modes that Jetspeed supports:
  </p>
  <p>
  <ul>
  <li>1. View</li>
  <li>2. Customize (Edit)</li>
  <li>3. Print Friendly</li>
  <li>4. Info</li>
  <li>5. Minimize</li>
  <li>6. Maximize</li>
  </ul>
  </p>
  <p>
  <b>View mode</b> is just the normal mode of operation. 
  A request to display a portal page is considered the default or view mode. 
  The getContent method will be called on the portlet. 
  </p>
  <p>
  <b>Customize mode</b> is an important mode of operation. 
  The Portlet interface method 
  <a 
href='http://portals.apache.org/jetspeed-1/apidocs/org/apache/jetspeed/portal/Portlet.html#providesCustomization()'>providesCustomization</a>
   can be overridden 
  if you want to provide your own portlet customizer. 
  Otherwise, Jetspeed provides a default customizer when you go into edit mode. 
  If you are providing your own customization, 
  you will need to check for the current mode of the request in your 
  <a 
href='http://portals.apache.org/jetspeed-1/apidocs/org/apache/jetspeed/portal/Portlet.html#getContent()'>getContent</a>
  method. 
  Velocity portlets provide a more elegant way of handling customization covered 
  in the next section.
  </p>
  <p>
  <b>Maximize Mode</b> displays the selected portlet on the entire page. 
  All other portlets are not displayed. 
  </p>
  <p>
  <b>Print Friendly</b> is the same as View Mode, 
  but the portal engine does not display any controls around your portlet. 
  </p>
  <p>
  The other modes: Info, Close and Minimize do not make calls directly to your 
portlet. 
  Unfortunately, your portlet is not notified of this event, 
  but must check the request parameters to detect if it is being minimized. 
  Info mode simply displays some runtime information about your portlet in a maximized 
view. 
  The content generated for the portlet is controlled by Jetspeed. 
  Minimizing a portlet will only show the control of the portlet, but not the content. 
  There is also the Close action, which removes the portlet from the page. 
  All six of these mode actions and the close action can be displayed on the 
  control of a portlet:
  </p>
  <p>                    
  <img border='0' width='120' height='34' src="../images/image006-6.jpg"/>
  </p>
  <p>
  In order from right to left we have: 
  Customize, Print-Friendly, Info, Close, Minimize and Maximize.
  </p>
  <p>
  By checking 
  <a 
href='http://portals.apache.org/jetspeed-1/apidocs/org/apache/jetspeed/services/rundata/JetspeedRunData.html'>JetspeedRunData.getMode</a>,
 
  you can determine the mode of the current request:
  </p>
  <source>
  <![CDATA[
          switch (jrun.getMode())
          {
          case JetspeedRunData.NORMAL:
              text.append("MODE = VIEW");
              break;
          case JetspeedRunData.CUSTOMIZE:
              text.append("MODE = CUSTOMIZE");
              break;
          case JetspeedRunData.MAXIMIZE:
              text.append("MODE = MINIMIZE");
              break;
          default:
              text.append("MODE = UNKNOWN");
              break;
          }
  ]]>    
  </source>
  </section>
  </body>
  </document>
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to