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 ta...@apache.org on 2004/08/10 06:13:24 UTC

cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls Info.java

taylor      2004/08/09 21:13:24

  Modified:    src/java/org/apache/jetspeed/modules/actions/controls
                        Info.java
  Log:
  override default jetspeed INFO mode with JSR 168 Help Mode
  
  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.6       +14 -3     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Info.java
  
  Index: Info.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Info.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Info.java	23 Feb 2004 02:50:53 -0000	1.5
  +++ Info.java	10 Aug 2004 04:13:24 -0000	1.6
  @@ -19,6 +19,8 @@
   // Turbine stuff
   import org.apache.turbine.modules.Action;
   import org.apache.turbine.util.RunData;
  +import org.apache.jetspeed.om.profile.Entry;
  +import org.apache.jetspeed.services.resources.FusionResources;
   import org.apache.jetspeed.services.rundata.JetspeedRunData;
   
   /**
  @@ -29,6 +31,8 @@
    */
   public class Info extends Action
   {
  +    private static final String J2_ENTITY = FusionResources.getString(FusionResources.J2_ENTITY);  
  +    
       public void doPerform( RunData rundata ) throws Exception
       {
   
  @@ -39,9 +43,16 @@
               return;
           }
   
  -         JetspeedRunData jdata = (JetspeedRunData)rundata;
  -         jdata.setJs_peid(peid);
  -
  +        JetspeedRunData jdata = (JetspeedRunData)rundata;
  +        jdata.setJs_peid(peid);
  +        Entry entry = jdata.getProfile().getDocument().getEntryById(peid);
  +        if (entry != null)
  +        {
  +            if (null != entry.getParameter(J2_ENTITY))
  +            {
  +                    return; // JSR 168 portlet, let it handle its own Help Mode
  +            }
  +        }
           // redirect to the info template
           rundata.setScreenTemplate("Info");
       }
  
  
  

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