You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by sh...@apache.org on 2001/03/30 11:14:20 UTC

cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/modules/screens Home.java

shesmer     01/03/30 01:14:20

  Modified:    src/java/org/apache/jetspeed/modules/screens Home.java
  Log:
  Configurable maximize control by Tom Adams
  
  Revision  Changes    Path
  1.13      +23 -15    jakarta-jetspeed/src/java/org/apache/jetspeed/modules/screens/Home.java
  
  Index: Home.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/screens/Home.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Home.java	2001/03/07 06:44:25	1.12
  +++ Home.java	2001/03/30 09:14:18	1.13
  @@ -93,7 +93,8 @@
   The Jetspeed home page
   
   @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -@version $Id: Home.java,v 1.12 2001/03/07 06:44:25 taylor Exp $
  +@author <a href="mailto:tom@PIsoftware.com">Tom Adams</a>
  +@version $Id: Home.java,v 1.13 2001/03/30 09:14:18 shesmer Exp $
   */
   public class Home extends BaseJetspeedScreen {
       
  @@ -101,16 +102,17 @@
       Portlet pathinfo name
       */
       public static final String PORTLET = "portlet";
  -    
  +
       /**
       Layout pathinfo name
       */
       public static final String LAYOUT = "layout";
   
       /**
  -    Control to be used for maximized portlet display
  +    Default control to be used for maximized portlet display
       */
  -    public static final String MAX_CONTROL_NAME = "org.apache.jetspeed.portal.controls.FullScreenControl";  
  +    public static final String DEFAULT_MAXIMIZED_CONTROL_NAME =
  +        "org.apache.jetspeed.portal.controls.FullScreenControl";
   
       /**
       Build the output from the Home screen
  @@ -118,7 +120,7 @@
       public ConcreteElement doBuild( RunData rundata ) {
   
           CapabilityMap cm = CapabilityMapFactory.getCapabilityMap( rundata );
  -        
  +
           /* From now on, each request for a default(-user) page is passed to method 'getPSMLContent()'.
              For each request-type, there is a .psml file, which describes the content/style
              of the appropriate page, either for wml or for html. If the user has selected a
  @@ -146,16 +148,16 @@
   
               //the set here should be one control and one portlet
               PortletSet set = this.getPortletSet( rundata );
  -            
  +
               return set.getContent( rundata );
  -            
  +
           } catch (PortletException e) {
               Log.error( e );
               return null;
           }
   
       }
  -    
  +
   
       /**
       Get the desired content from PSML
  @@ -233,16 +235,22 @@
   
           Portlet portlet = PortletFactory.getPortlet( entry );
   
  -        /* Set the controller type explicitely.*/
  -        PortletControl control = PortletControlFactory.getPortletControl( MAX_CONTROL_NAME, portlet );
  +        // get the controller out of the jetspeed resources properties file
  +        String controllerClassname = JetspeedResources.getString(
  +            JetspeedResources.PORTLETCONTROL_MAXIMIZED_CLASSNAME_KEY,
  +            DEFAULT_MAXIMIZED_CONTROL_NAME);
  +
  +        /* Set the controller type explicitly.*/
  +        PortletControl control =
  +            PortletControlFactory.getPortletControl( controllerClassname, portlet );
   
           control.setWidth( "100%" );
  -        
  -        ps.addPortlet( control ); 
  -        
  +
  +        ps.addPortlet( control );
  +
           return ps;
  -        
  +
       }
  -   
  +
   }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org