portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/util/template JetspeedTemplateLink.java
Date Mon, 11 Mar 2002 07:22:12 GMT
taylor      02/03/10 23:22:12

  Modified:    src/java/org/apache/jetspeed/modules/actions/controllers
                        PanedControllerAction.java
               src/java/org/apache/jetspeed/modules/actions/portlets
                        VelocityPortletAction.java
               src/java/org/apache/jetspeed/modules/actions/portlets/security
                        GroupBrowserAction.java GroupUpdateAction.java
                        PermissionBrowserAction.java
                        PermissionUpdateAction.java RoleBrowserAction.java
                        RolePermissionUpdateAction.java
                        RoleUpdateAction.java SecurityConstants.java
                        UserBrowserAction.java UserRoleUpdateAction.java
                        UserUpdateAction.java
               src/java/org/apache/jetspeed/portal BasePortletSet.java
                        PortletSet.java
               src/java/org/apache/jetspeed/portal/controllers
                        VelocityPortletController.java
               src/java/org/apache/jetspeed/portal/controls
                        AbstractPortletControl.java
               src/java/org/apache/jetspeed/util/template
                        JetspeedTemplateLink.java
  Log:
  - converted over security portlets to use portlet ids
  - cleaned up some bugs in template soft-redirects
  
  Revision  Changes    Path
  1.6       +22 -9     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controllers/PanedControllerAction.java
  
  Index: PanedControllerAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controllers/PanedControllerAction.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PanedControllerAction.java	9 Mar 2002 06:29:16 -0000	1.5
  +++ PanedControllerAction.java	11 Mar 2002 07:22:11 -0000	1.6
  @@ -85,7 +85,7 @@
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    *
  - * @version $Id: PanedControllerAction.java,v 1.5 2002/03/09 06:29:16 taylor Exp $
  + * @version $Id: PanedControllerAction.java,v 1.6 2002/03/11 07:22:11 taylor Exp $
    */
   public class PanedControllerAction extends RowColumnControllerAction
   {
  @@ -102,16 +102,29 @@
           PortletSet myPortlets = cont.getPortlets();
           PortletControllerConfig conf = cont.getConfig();
   
  -        String pane = cont.retrievePaneID(rundata, true);
  -        Portlet pp = myPortlets.getPortletByID(pane);
  -        if (null == pp)
  +        Portlet portlet = null;
  +        String paneID = null;
  +        String paneName = rundata.getParameters().getString( "js_panename" );
  +        if (null != paneName)        
           {
  -            pane = cont.retrievePaneID(rundata, false);
  -            pp = myPortlets.getPortletByID(pane);
  +            portlet = myPortlets.getPortletByName(paneName);
  +            if (portlet != null)
  +                paneID = portlet.getID();
           }
  -        context.put("pane", pp);
  -        
  -        cont.savePaneID(rundata,pane);
  +        if (null == portlet)
  +        {
  +            paneID = cont.retrievePaneID(rundata, true);
  +            portlet = myPortlets.getPortletByID(paneID);
  +            if (null == portlet)
  +            {
  +                paneID = cont.retrievePaneID(rundata, false);
  +                portlet = myPortlets.getPortletByID(paneID);
  +            }
  +
  +        }
  +        if (portlet != null)
  +            context.put("pane", portlet);        
  +        cont.savePaneID(rundata, paneID);
       }    
   
   }
  
  
  
  1.9       +22 -0     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/VelocityPortletAction.java
  
  Index: VelocityPortletAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/VelocityPortletAction.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- VelocityPortletAction.java	22 Jul 2001 20:31:11 -0000	1.8
  +++ VelocityPortletAction.java	11 Mar 2002 07:22:11 -0000	1.9
  @@ -76,6 +76,8 @@
    * 
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    * @author <a href="mailto:re_carrasco@bco011.sonda.cl">Roberto Carrasco</a>
  + *
  + * @version $Id: VelocityPortletAction.java,v 1.9 2002/03/11 07:22:11 taylor Exp $
    */
   public abstract class VelocityPortletAction extends VelocityAction
   {
  @@ -162,6 +164,9 @@
           Log.debug("VelocityAction: retrieved portlet: "+portlet);
           if (portlet != null)
           {
  +            //System.out.println("class = " + this.getClass().getName());
  +            //rundata.getUser().setTemp(this.getClass().getName(), portlet.getID());
  +
               // we're bein configured
               if  ( ( jdata.getMode()==jdata.CUSTOMIZE ) 
                   && (portlet.getName().equals(jdata.getCustomized().getName())) )
  @@ -183,6 +188,23 @@
               buildNormalContext( portlet, context, rundata);
           }        
       }
  +
  +    /**
  +     * Helper function for actions to get the portlet id.
  +     * Since actions are called before portal aggregation, the ids aren't available.
  +     * This function will fail on the very first aggregation for a session.
  +     *
  +     * @param data Turbine information.
  +     * @param template The template that will be executed next.
  +     */
  +     /*
  +    public String getPortletID(RunData rundata)
  +    {
  +       System.out.println("get portlet id class = " + this.getClass().getName());
  +
  +        return (String)rundata.getUser().getTemp(this.getClass().getName());
  +    }
  +       */
   
       /** 
        * Subclasses should override this method if they wish to
  
  
  
  1.2       +1 -1      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/GroupBrowserAction.java
  
  Index: GroupBrowserAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/GroupBrowserAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GroupBrowserAction.java	30 Jul 2001 06:20:49 -0000	1.1
  +++ GroupBrowserAction.java	11 Mar 2002 07:22:11 -0000	1.2
  @@ -75,7 +75,6 @@
   
   // jetspeed services
   import org.apache.jetspeed.services.JetspeedSecurity;
  -import org.apache.jetspeed.services.resources.JetspeedResources;
   
   // jetspeed velocity
   import org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction;
  @@ -86,6 +85,7 @@
    * This action sets up the template context for browsing of security groups in the Turbine database.
    * 
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  + * @version $Id: GroupBrowserAction.java,v 1.2 2002/03/11 07:22:11 taylor Exp $
    */
   
   public class GroupBrowserAction extends VelocityPortletAction
  
  
  
  1.3       +5 -26     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/GroupUpdateAction.java
  
  Index: GroupUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/GroupUpdateAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GroupUpdateAction.java	30 Jul 2001 06:44:27 -0000	1.2
  +++ GroupUpdateAction.java	11 Mar 2002 07:22:11 -0000	1.3
  @@ -72,7 +72,6 @@
   
   // jetspeed services
   import org.apache.jetspeed.services.JetspeedSecurity;
  -import org.apache.jetspeed.services.resources.JetspeedResources;
   
   // jetspeed velocity
   import org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction;
  @@ -83,6 +82,7 @@
    * This action sets up the template context for editing security groups in the Turbine database.
    * 
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  + * @version $Id: GroupUpdateAction.java,v 1.3 2002/03/11 07:22:11 taylor Exp $
    */
   
   public class GroupUpdateAction extends VelocityPortletAction
  @@ -196,7 +196,7 @@
               if (name == null || name.trim().length() == 0)
               {
                   DynamicURI duri = new DynamicURI (rundata);
  -                duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_GROUP_UPDATE);
  +                duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_GROUP_UPDATE);
                   duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_INVALID_ENTITY_NAME);
                   rundata.getResponse().sendRedirect(duri.toString());
                   rundata.getUser().setTemp(TEMP_GROUP, null);
  @@ -213,13 +213,6 @@
               ///
               JetspeedSecurity.addGroup(group, rundata);
   
  -            //
  -            // success -- bring user back to group browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_GROUP_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  -
           }
           catch (EntityExistsException e)
           {
  @@ -230,7 +223,7 @@
               // dup key found - display error message - bring back to same screen
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_GROUP_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_GROUP_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_ENTITY_ALREADY_EXISTS);
               rundata.getResponse().sendRedirect(duri.toString());
   
  @@ -263,13 +256,6 @@
               //
               JetspeedSecurity.saveGroup(group);
   
  -            //
  -            // success -- bring user back to group browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_GROUP_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  -
           }
           catch (Exception e)
           {
  @@ -280,7 +266,7 @@
               // error on update - display error message
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_GROUP_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_GROUP_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_UPDATE_FAILED);
               if (group != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, group.getName());
  @@ -318,13 +304,6 @@
               //
               JetspeedSecurity.removeGroup(group, rundata);
   
  -            //
  -            // success -- bring user back to group browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_GROUP_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  -
           }
           catch (Exception e)
           {
  @@ -335,7 +314,7 @@
               // error on delete - display error message
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_GROUP_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_GROUP_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_DELETE_FAILED);
               if (group != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, group.getName());
  
  
  
  1.2       +1 -1      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/PermissionBrowserAction.java
  
  Index: PermissionBrowserAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/PermissionBrowserAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PermissionBrowserAction.java	2 Jul 2001 07:33:44 -0000	1.1
  +++ PermissionBrowserAction.java	11 Mar 2002 07:22:11 -0000	1.2
  @@ -76,7 +76,6 @@
   
   // jetspeed services
   import org.apache.jetspeed.services.JetspeedSecurity;
  -import org.apache.jetspeed.services.resources.JetspeedResources;
   
   // jetspeed velocity
   import org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction;
  @@ -87,6 +86,7 @@
    * This action sets up the template context for browsing of permissions in the Turbine database. 
    * 
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  + * @version $Id: PermissionBrowserAction.java,v 1.2 2002/03/11 07:22:11 taylor Exp $
    */
   public class PermissionBrowserAction extends VelocityPortletAction
   {
  
  
  
  1.2       +5 -27     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/PermissionUpdateAction.java
  
  Index: PermissionUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/PermissionUpdateAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PermissionUpdateAction.java	2 Jul 2001 07:33:44 -0000	1.1
  +++ PermissionUpdateAction.java	11 Mar 2002 07:22:11 -0000	1.2
  @@ -72,7 +72,6 @@
   
   // jetspeed services
   import org.apache.jetspeed.services.JetspeedSecurity;
  -import org.apache.jetspeed.services.resources.JetspeedResources;
   
   // jetspeed velocity
   import org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction;
  @@ -83,6 +82,7 @@
    * This action sets up the template context for editing security permissions in the Turbine database. 
    * 
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  + * @version $Id: PermissionUpdateAction.java,v 1.2 2002/03/11 07:22:11 taylor Exp $
    */
   public class PermissionUpdateAction extends VelocityPortletAction
   {
  @@ -196,7 +196,7 @@
               if (name == null || name.trim().length() == 0)
               {
                   DynamicURI duri = new DynamicURI (rundata);
  -                duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_PERMISSION_UPDATE);
  +                duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_PERMISSION_UPDATE);
                   duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_INVALID_ENTITY_NAME);
                   rundata.getResponse().sendRedirect(duri.toString());
                   rundata.getUser().setTemp(TEMP_PERMISSION, null);
  @@ -213,13 +213,6 @@
               ///
               JetspeedSecurity.addPermission(permission);
   
  -            //
  -            // success -- bring user back to permission browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_PERMISSION_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  -
           }
           catch (EntityExistsException e)
           {
  @@ -230,7 +223,7 @@
               // dup key found - display error message - bring back to same screen
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_PERMISSION_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_PERMISSION_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_ENTITY_ALREADY_EXISTS);
               rundata.getResponse().sendRedirect(duri.toString());
   
  @@ -263,13 +256,6 @@
               //
               JetspeedSecurity.savePermission(permission);
   
  -            //
  -            // success -- bring user back to permission browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_PERMISSION_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  -
           }
           catch (Exception e)
           {
  @@ -280,7 +266,7 @@
               // error on update - display error message
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_PERMISSION_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_PERMISSION_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_UPDATE_FAILED);
               if (permission != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, permission.getName());
  @@ -317,14 +303,6 @@
               // remove the permission
               //
               JetspeedSecurity.removePermission(permission);
  -
  -            //
  -            // success -- bring user back to permission browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_PERMISSION_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  -
           }
           catch (Exception e)
           {
  @@ -335,7 +313,7 @@
               // error on delete - display error message
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_PERMISSION_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_PERMISSION_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_DELETE_FAILED);
               if (permission != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, permission.getName());
  
  
  
  1.4       +1 -1      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/RoleBrowserAction.java
  
  Index: RoleBrowserAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/RoleBrowserAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RoleBrowserAction.java	6 Jul 2001 08:44:14 -0000	1.3
  +++ RoleBrowserAction.java	11 Mar 2002 07:22:11 -0000	1.4
  @@ -76,7 +76,6 @@
   
   // jetspeed services
   import org.apache.jetspeed.services.JetspeedSecurity;
  -import org.apache.jetspeed.services.resources.JetspeedResources;
   
   // jetspeed velocity
   import org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction;
  @@ -87,6 +86,7 @@
    * This action sets up the template context for browsing of security roles in the Turbine database. 
    * 
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  + * @version $Id: RoleBrowserAction.java,v 1.4 2002/03/11 07:22:11 taylor Exp $
    */
   public class RoleBrowserAction extends VelocityPortletAction
   {
  
  
  
  1.2       +10 -12    jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/RolePermissionUpdateAction.java
  
  Index: RolePermissionUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/RolePermissionUpdateAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RolePermissionUpdateAction.java	6 Jul 2001 08:44:15 -0000	1.1
  +++ RolePermissionUpdateAction.java	11 Mar 2002 07:22:11 -0000	1.2
  @@ -82,18 +82,22 @@
   
   // jetspeed services
   import org.apache.jetspeed.services.JetspeedSecurity;
  -import org.apache.jetspeed.services.resources.JetspeedResources;
   
   // jetspeed velocity
   import org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction;
   import org.apache.jetspeed.portal.portlets.VelocityPortlet;
   
  -
  +import org.apache.jetspeed.portal.Portlet;
  +import org.apache.jetspeed.portal.PortletSet;
  +import org.apache.jetspeed.portal.PortletController;
  +import org.apache.jetspeed.portal.PanedPortletController;
  +                                       
   /**
    * This action sets up the template context for editing security permissions in the Turbine database
    * for a given role.
    * 
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  + * @version $Id: RolePermissionUpdateAction.java,v 1.2 2002/03/11 07:22:11 taylor Exp $
    */
   public class RolePermissionUpdateAction extends VelocityPortletAction
   {
  @@ -195,7 +199,7 @@
           {
               Log.error("RolePermissionBrowser: Failed to get entity: " + entityid );
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_ROLEPERMISSION_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_ROLEPERMISSION_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_MISSING_PARAMETER);
               rundata.getResponse().sendRedirect(duri.toString());
               return;
  @@ -205,7 +209,7 @@
           {
               Log.error("RolePermissionBrowser: Failed to get role: " + entityid );
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_ROLEPERMISSION_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_ROLEPERMISSION_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_MISSING_PARAMETER);
               rundata.getResponse().sendRedirect(duri.toString());
               return;
  @@ -221,7 +225,7 @@
               if (permissions == null || selected == null)
               {
                   DynamicURI duri = new DynamicURI (rundata);
  -                duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_ROLEPERMISSION_UPDATE);
  +                duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_ROLEPERMISSION_UPDATE);
                   duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_MISSING_PARAMETER);
                   rundata.getResponse().sendRedirect(duri.toString());
                   return;
  @@ -254,12 +258,6 @@
               rundata.getUser().setTemp(SecurityConstants.CONTEXT_PERMISSIONS, null);
               rundata.getUser().setTemp(SecurityConstants.CONTEXT_SELECTED, null);
    
  -            //
  -            // success -- bring user back to user browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_ROLE_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
   
           }
           catch (Exception e)
  @@ -271,7 +269,7 @@
               // error on update - display error message
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_ROLEPERMISSION_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_ROLEPERMISSION_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_UPDATE_FAILED);
               if (role != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, role.getName());
  
  
  
  1.5       +5 -26     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/RoleUpdateAction.java
  
  Index: RoleUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/RoleUpdateAction.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RoleUpdateAction.java	30 Jul 2001 06:44:27 -0000	1.4
  +++ RoleUpdateAction.java	11 Mar 2002 07:22:11 -0000	1.5
  @@ -72,7 +72,6 @@
   
   // jetspeed services
   import org.apache.jetspeed.services.JetspeedSecurity;
  -import org.apache.jetspeed.services.resources.JetspeedResources;
   
   // jetspeed velocity
   import org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction;
  @@ -83,6 +82,7 @@
    * This action sets up the template context for editing security roles in the Turbine database. 
    * 
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  + * @version $Id: RoleUpdateAction.java,v 1.5 2002/03/11 07:22:11 taylor Exp $
    */
   public class RoleUpdateAction extends VelocityPortletAction
   {
  @@ -195,7 +195,7 @@
               if (name == null || name.trim().length() == 0)
               {
                   DynamicURI duri = new DynamicURI (rundata);
  -                duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_ROLE_UPDATE);
  +                duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_ROLE_UPDATE);
                   duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_INVALID_ENTITY_NAME);
                   rundata.getResponse().sendRedirect(duri.toString());
                   rundata.getUser().setTemp(TEMP_ROLE, null);
  @@ -212,13 +212,6 @@
               ///
               JetspeedSecurity.addRole(role, rundata);
   
  -            //
  -            // success -- bring user back to role browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_ROLE_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  -
           }
           catch (EntityExistsException e)
           {
  @@ -229,7 +222,7 @@
               // dup key found - display error message - bring back to same screen
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_ROLE_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_ROLE_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_ENTITY_ALREADY_EXISTS);
               rundata.getResponse().sendRedirect(duri.toString());
   
  @@ -262,13 +255,6 @@
               //
               JetspeedSecurity.saveRole(role);
   
  -            //
  -            // success -- bring user back to role browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_ROLE_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  -
           }
           catch (Exception e)
           {
  @@ -279,7 +265,7 @@
               // error on update - display error message
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_ROLE_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_ROLE_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_UPDATE_FAILED);
               if (role != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, role.getName());
  @@ -317,13 +303,6 @@
               //
               JetspeedSecurity.removeRole(role, rundata);
   
  -            //
  -            // success -- bring user back to role browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_ROLE_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  -
           }
           catch (Exception e)
           {
  @@ -334,7 +313,7 @@
               // error on delete - display error message
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_ROLE_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_ROLE_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_DELETE_FAILED);
               if (role != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, role.getName());
  
  
  
  1.3       +13 -10    jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/SecurityConstants.java
  
  Index: SecurityConstants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/SecurityConstants.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SecurityConstants.java	6 Jul 2001 08:44:16 -0000	1.2
  +++ SecurityConstants.java	11 Mar 2002 07:22:11 -0000	1.3
  @@ -59,6 +59,7 @@
    * This class contains all the common constants used between data entry forms and browsers and actions
    * 
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  + * @version $Id: SecurityConstants.java,v 1.3 2002/03/11 07:22:11 taylor Exp $
    */
   public class SecurityConstants
   {
  @@ -94,25 +95,27 @@
       static final String CONTEXT_SELECTED = "selected";
   
       // user browser pane id
  -    static final String PANEID_USER_BROWSER = "User Browser";
  +    static final String PANEID_USER_BROWSER = "UserBrowser";
       // user form pane id
  -    static final String PANEID_USER_UPDATE = "User";
  +    static final String PANEID_USER_UPDATE = "UserForm";
       // role browser pane id
  -    static final String PANEID_ROLE_BROWSER = "Security Role Browser";
  +    static final String PANEID_ROLE_BROWSER = "RoleBrowser";
       // role form pane id
  -    static final String PANEID_ROLE_UPDATE = "Role";
  +    static final String PANEID_ROLE_UPDATE = "RoleForm";
       // permission browser pane id
  -    static final String PANEID_PERMISSION_BROWSER = "Permission Browser";
  +    static final String PANEID_PERMISSION_BROWSER = "PermissionBrowser";
       // permission form pane id
  -    static final String PANEID_PERMISSION_UPDATE = "Permission";
  +    static final String PANEID_PERMISSION_UPDATE = "PermissionForm";
       // group browser pane id
  -    static final String PANEID_GROUP_BROWSER = "Group Browser";
  +    static final String PANEID_GROUP_BROWSER = "GroupBrowser";
       // group form pane id
  -    static final String PANEID_GROUP_UPDATE = "Group";
  +    static final String PANEID_GROUP_UPDATE = "GroupForm";
       // user role form pane id
  -    static final String PANEID_USERROLE_UPDATE = "User Roles";
  +    static final String PANEID_USERROLE_UPDATE = "UserRoleForm";
       // role permission form pane id
  -    static final String PANEID_ROLEPERMISSION_UPDATE = "Role Permissions";
  +    static final String PANEID_ROLEPERMISSION_UPDATE = "PermissionBrowser";
  +
  +    static final String PANE_NAME = "js_panename";
   
       // 
       // Informational and Error Messages for Security Forms
  
  
  
  1.3       +1 -1      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/UserBrowserAction.java
  
  Index: UserBrowserAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/UserBrowserAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- UserBrowserAction.java	2 Jul 2001 07:33:45 -0000	1.2
  +++ UserBrowserAction.java	11 Mar 2002 07:22:11 -0000	1.3
  @@ -75,7 +75,6 @@
   
   // jetspeed services
   import org.apache.jetspeed.services.JetspeedSecurity;
  -import org.apache.jetspeed.services.resources.JetspeedResources;
   
   // jetspeed velocity
   import org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction;
  @@ -85,6 +84,7 @@
    * This action sets up the template context for browsing of users in the Turbine database. 
    * 
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  + * @version $Id: UserBrowserAction.java,v 1.3 2002/03/11 07:22:11 taylor Exp $
    */
   public class UserBrowserAction extends VelocityPortletAction
   {
  
  
  
  1.2       +5 -12     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/UserRoleUpdateAction.java
  
  Index: UserRoleUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/UserRoleUpdateAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UserRoleUpdateAction.java	6 Jul 2001 08:44:17 -0000	1.1
  +++ UserRoleUpdateAction.java	11 Mar 2002 07:22:11 -0000	1.2
  @@ -81,7 +81,6 @@
   
   // jetspeed services
   import org.apache.jetspeed.services.JetspeedSecurity;
  -import org.apache.jetspeed.services.resources.JetspeedResources;
   
   // jetspeed velocity
   import org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction;
  @@ -93,6 +92,7 @@
    * for a given user.
    * 
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  + * @version $Id: UserRoleUpdateAction.java,v 1.2 2002/03/11 07:22:11 taylor Exp $
    */
   public class UserRoleUpdateAction extends VelocityPortletAction
   {
  @@ -195,7 +195,7 @@
           {
               Log.error("UserRoleBrowser: Failed to get entity: " + entityid );
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USERROLE_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USERROLE_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_MISSING_PARAMETER);
               rundata.getResponse().sendRedirect(duri.toString());
               return;
  @@ -206,7 +206,7 @@
           {
               Log.error("UserRoleBrowser: Failed to get user: " + entityid );
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USERROLE_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USERROLE_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_MISSING_PARAMETER);
               rundata.getResponse().sendRedirect(duri.toString());
               return;
  @@ -221,7 +221,7 @@
               if (roles == null || selected == null)
               {
                   DynamicURI duri = new DynamicURI (rundata);
  -                duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USERROLE_UPDATE);
  +                duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USERROLE_UPDATE);
                   duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_MISSING_PARAMETER);
                   rundata.getResponse().sendRedirect(duri.toString());
                   return;
  @@ -258,13 +258,6 @@
               rundata.getUser().setTemp(SecurityConstants.CONTEXT_ROLES, null);
               rundata.getUser().setTemp(SecurityConstants.CONTEXT_SELECTED, null);
    
  -            //
  -            // success -- bring user back to user browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USER_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  -
           }
           catch (Exception e)
           {
  @@ -275,7 +268,7 @@
               // error on update - display error message
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USERROLE_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USERROLE_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_UPDATE_FAILED);
               if (user != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
  
  
  
  1.8       +10 -42    jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/UserUpdateAction.java
  
  Index: UserUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/UserUpdateAction.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- UserUpdateAction.java	25 Feb 2002 04:38:12 -0000	1.7
  +++ UserUpdateAction.java	11 Mar 2002 07:22:11 -0000	1.8
  @@ -93,10 +93,10 @@
   
   // jetspeed services
   import org.apache.jetspeed.services.TemplateLocator;
  +import org.apache.jetspeed.services.resources.JetspeedResources;
   
   // jetspeed security
   import org.apache.jetspeed.services.JetspeedSecurity;
  -import org.apache.jetspeed.services.resources.JetspeedResources;
   
   /**
    * This action sets up the template context for editing users in the Turbine database. 
  @@ -104,6 +104,7 @@
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    * @author <a href="mailto:kimptoc_mail@yahoo.com">Chris Kimpton</a>
    * @author <a href="mailto:paulsp@apache.org">Paul Spencer</a>
  + * @version $Id: UserUpdateAction.java,v 1.8 2002/03/11 07:22:11 taylor Exp $
    */
   public class UserUpdateAction extends VelocityPortletAction
   {
  @@ -153,7 +154,6 @@
           try
           {
               JetspeedUser user = null;
  -    
               /*
                * Grab the mode for the user form.
                */
  @@ -216,7 +216,7 @@
               if (name == null || name.trim().length() == 0)
               {
                   DynamicURI duri = new DynamicURI (rundata);
  -                duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USER_UPDATE);
  +                duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USER_UPDATE);
                   duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_INVALID_ENTITY_NAME);
                   rundata.getResponse().sendRedirect(duri.toString());
                   // save values that user just entered so they don't have to re-enter
  @@ -254,12 +254,6 @@
               ///
               JetspeedSecurity.addUser(user, password, rundata);
   
  -            //
  -            // success -- bring user back to browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USER_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
   
           }
           catch (EntityExistsException e)
  @@ -271,7 +265,7 @@
               // dup key found - display error message - bring back to same screen
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USER_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USER_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_ENTITY_ALREADY_EXISTS);
               rundata.getResponse().sendRedirect(duri.toString());
               // save values that user just entered so they don't have to re-enter
  @@ -341,12 +335,6 @@
   
               se.send();
   
  -            //
  -            // success -- bring user back to user browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USER_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
   
           } catch (Exception e)
           {
  @@ -357,7 +345,7 @@
               // error on update - display error message
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USER_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USER_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_UPDATE_FAILED);
               if (user != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
  @@ -430,13 +418,6 @@
   
               se.send();
   
  -            //
  -            // success -- bring user back to user browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USER_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  -
           } catch (Exception e)
           {
               // log the error msg
  @@ -446,7 +427,7 @@
               // error on update - display error message
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USER_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USER_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_UPDATE_FAILED);
               if (user != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
  @@ -480,7 +461,7 @@
               if (name == null || name.trim().length() == 0) 
               {
                   DynamicURI duri = new DynamicURI (rundata);
  -                duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USER_UPDATE);
  +                duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USER_UPDATE);
                   duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_INVALID_ENTITY_NAME);
                   if (user != null)
                       duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
  @@ -525,12 +506,6 @@
                   currentUser.setLastName(user.getLastName());                
                   currentUser.setEmail(user.getEmail());
               }
  -            //
  -            // success -- bring user back to user browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USER_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
   
           }
           catch (Exception e)
  @@ -542,7 +517,7 @@
               // error on update - display error message
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USER_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USER_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_UPDATE_FAILED);
               if (user != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
  @@ -576,7 +551,7 @@
               if (rundata.getUser().getUserName().equals(user.getUserName())) 
               {
                   DynamicURI duri = new DynamicURI (rundata);
  -                duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USER_UPDATE);
  +                duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USER_UPDATE);
                   duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_CANT_DELETE_CURRENT);
                   if (user != null)
                       duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
  @@ -593,13 +568,6 @@
               //    
               JetspeedSecurity.removeUser(user, rundata);
   
  -            //
  -            // success -- bring user back to user browser
  -            //
  -            DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USER_BROWSER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  -
           }
           catch (Exception e)
           {
  @@ -610,7 +578,7 @@
               // error on delete - display error message
               //
               DynamicURI duri = new DynamicURI (rundata);
  -            duri.addPathInfo(JetspeedResources.PATH_PANEL_KEY, SecurityConstants.PANEID_USER_UPDATE);
  +            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USER_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_DELETE_FAILED);
               if (user != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
  
  
  
  1.17      +19 -1     jakarta-jetspeed/src/java/org/apache/jetspeed/portal/BasePortletSet.java
  
  Index: BasePortletSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/BasePortletSet.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- BasePortletSet.java	9 Mar 2002 06:29:16 -0000	1.16
  +++ BasePortletSet.java	11 Mar 2002 07:22:11 -0000	1.17
  @@ -84,7 +84,7 @@
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    * @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  - * @version $Id: BasePortletSet.java,v 1.16 2002/03/09 06:29:16 taylor Exp $
  + * @version $Id: BasePortletSet.java,v 1.17 2002/03/11 07:22:11 taylor Exp $
    */
   public class BasePortletSet implements PortletSet, Portlet, PortletState
   {
  @@ -207,6 +207,24 @@
           {
               portlet = (Portlet)portlets.elementAt(ix);
               if (portlet.getID().equals(id))
  +                return portlet;
  +        }
  +        return null;
  +    }
  +
  +    /**
  +    Returns the Portlet with the given name
  +    */
  +    public Portlet getPortletByName(String name)
  +    {
  +        if (portlets == null)
  +            return null;
  +
  +        Portlet portlet = null;
  +        for (int ix=0; ix < portlets.size(); ix++)
  +        {
  +            portlet = (Portlet)portlets.elementAt(ix);
  +            if (portlet.getName().equals(name))
                   return portlet;
           }
           return null;
  
  
  
  1.25      +6 -1      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/PortletSet.java
  
  Index: PortletSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/PortletSet.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- PortletSet.java	6 Mar 2002 17:03:34 -0000	1.24
  +++ PortletSet.java	11 Mar 2002 07:22:11 -0000	1.25
  @@ -65,7 +65,7 @@
    * 
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    * @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  - * @version $Id: PortletSet.java,v 1.24 2002/03/06 17:03:34 taylor Exp $
  + * @version $Id: PortletSet.java,v 1.25 2002/03/11 07:22:11 taylor Exp $
    */
   public interface PortletSet extends Portlet
   {
  @@ -98,6 +98,11 @@
        * Returns the Portlet with the given id
        */
       public Portlet getPortletByID(String id);
  +
  +    /**
  +    Returns the Portlet with the given name
  +    */
  +    public Portlet getPortletByName(String name);
   
       /**
        * Returns the portlet set as an Enumeration
  
  
  
  1.7       +2 -0      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controllers/VelocityPortletController.java
  
  Index: VelocityPortletController.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controllers/VelocityPortletController.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- VelocityPortletController.java	30 Nov 2001 10:53:59 -0000	1.6
  +++ VelocityPortletController.java	11 Mar 2002 07:22:11 -0000	1.7
  @@ -78,6 +78,8 @@
    * 
    * @author <a href="mailto:re_carrasco@bco011.sonda.cl">Roberto Carrasco</a>
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
  + *
  + * @version $Id: VelocityPortletController.java,v 1.7 2002/03/11 07:22:11 taylor Exp $
    */
   public class VelocityPortletController extends AbstractPortletController
   {
  
  
  
  1.15      +25 -1     jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/AbstractPortletControl.java
  
  Index: AbstractPortletControl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/AbstractPortletControl.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- AbstractPortletControl.java	9 Mar 2002 06:29:17 -0000	1.14
  +++ AbstractPortletControl.java	11 Mar 2002 07:22:11 -0000	1.15
  @@ -91,7 +91,7 @@
    *
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    * @author <a href="mailto:sgala@apache.org">Santiago Gala</a>
  - * @version $Id: AbstractPortletControl.java,v 1.14 2002/03/09 06:29:17 taylor Exp $
  + * @version $Id: AbstractPortletControl.java,v 1.15 2002/03/11 07:22:11 taylor Exp $
    */
   public abstract class AbstractPortletControl extends AbstractPortlet
       implements PortletControl
  @@ -776,6 +776,30 @@
               {
                   portlet = (Portlet)e.nextElement();
                   if (portlet.getID().equals(id))
  +                    return portlet;
  +            }
  +            return portlet;
  +       }
  +       return null;
  +    }
  +
  +    /**
  +    Returns the Portlet with the given name
  +    */
  +    public Portlet getPortletByName(String name)
  +    {
  +        Portlet p = getPortlet();
  +         if (null == p) 
  +            return null;
  +
  +        if (p instanceof PortletSet)
  +        {
  +            Enumeration e = ((PortletSet)p).getPortlets();
  +            Portlet portlet = null;
  +            while ( e.hasMoreElements() )
  +            {
  +                portlet = (Portlet)e.nextElement();
  +                if (portlet.getName().equals(name))
                       return portlet;
               }
               return portlet;
  
  
  
  1.7       +23 -4     jakarta-jetspeed/src/java/org/apache/jetspeed/util/template/JetspeedTemplateLink.java
  
  Index: JetspeedTemplateLink.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/util/template/JetspeedTemplateLink.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JetspeedTemplateLink.java	5 Mar 2002 12:26:33 -0000	1.6
  +++ JetspeedTemplateLink.java	11 Mar 2002 07:22:12 -0000	1.7
  @@ -61,6 +61,7 @@
   import org.apache.turbine.services.pull.ApplicationTool;
   
   import org.apache.jetspeed.portal.Portlet;
  +import org.apache.jetspeed.portal.PortletSet;
   import org.apache.jetspeed.portal.PortletController;
   import org.apache.jetspeed.portal.PanedPortletController;
   
  @@ -78,7 +79,7 @@
    *
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    * @author <a href="mailto:sgala@apache.org">Santiago Gala</a>
  - * @version $Id: JetspeedTemplateLink.java,v 1.6 2002/03/05 12:26:33 sgala Exp $
  + * @version $Id: JetspeedTemplateLink.java,v 1.7 2002/03/11 07:22:12 taylor Exp $
    */
   public class JetspeedTemplateLink
       extends TemplateLink implements ApplicationTool
  @@ -251,9 +252,27 @@
       public DynamicURI setPanel(String panel)
       {
           Log.debug("JetspeedTemplateLink: setPanel(String):" + panel );
  -        removePathInfo(getPanelKey());
  -        removeQueryData(getPanelKey());
  -        return addPathInfo(getPanelKey(), panel);
  +        removePathInfo("js_pane");
  +        removeQueryData("js_pane");
  +        PortletController controller = activePortlet.getPortletConfig()
  +                                                        .getPortletSet()
  +                                                        .getController();
  +
  +       String id = null;
  +
  +        if (controller instanceof PanedPortletController)
  +        {
  +            PortletSet set = controller.getPortlets();
  +            Portlet portlet = null;
  +            if (null != set)
  +            {
  +                portlet = set.getPortletByName(panel);
  +            }
  +            if (portlet != null)
  +                id = portlet.getID();
  +        }
  +
  +        return addPathInfo("js_pane", id);
       }
       
       /** 
  
  
  

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


Mime
View raw message