portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pau...@apache.org
Subject cvs commit: jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html Tool_jslink_examples.vm
Date Sun, 05 May 2002 03:07:11 GMT
paulsp      02/05/04 20:07:11

  Modified:    src/java/org/apache/jetspeed/util/template
                        BaseJetspeedLink.java JetspeedLink.java
                        TestJetspeedLink.java
               webapp/WEB-INF/templates/vm/portlets/html
                        Tool_jslink_examples.vm
  Log:
  o Add getLink() methods
  o Add getXxxx() methods that utilize getLink()
  o Depracate setXxx methods that are incorrectly names.  Use getXxx instead.
  o Added new methods to test
  o Update velocity example portlet
  
  Revision  Changes    Path
  1.9       +527 -212  jakarta-jetspeed/src/java/org/apache/jetspeed/util/template/BaseJetspeedLink.java
  
  Index: BaseJetspeedLink.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/util/template/BaseJetspeedLink.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- BaseJetspeedLink.java	27 Apr 2002 21:17:21 -0000	1.8
  +++ BaseJetspeedLink.java	5 May 2002 03:07:10 -0000	1.9
  @@ -86,7 +86,7 @@
    * rendering code. This is done currently in VelocityPortlet.</p>
    *
    * @author <a href="mailto:paulsp@apache.org">Paul Spencer</a>
  - * @version $Id: BaseJetspeedLink.java,v 1.8 2002/04/27 21:17:21 taylor Exp $
  + * @version $Id: BaseJetspeedLink.java,v 1.9 2002/05/05 03:07:10 paulsp Exp $
    */
   public class BaseJetspeedLink implements ApplicationTool, JetspeedLink
   {
  @@ -190,13 +190,15 @@
        *
        * @param peid of the portal element
        * @return DynamicURI to specific portal element
  +     *
  +     * @depracated Use getPortletById() or getPaneById()
        */
       public DynamicURI setPortalElement(String peid)
       {
           if (initDone == false)
               initLink();
           if (profile.getDocument().getEntryById( peid) != null)
  -            return setPortletById( peid);
  +            return getPortletById( peid);
           else
               return setPaneById(peid);
       }
  @@ -206,31 +208,24 @@
        *
        * @param peid of the portlet
        * @return DynamicURI to specific portlet
  +     *
  +     * @deprecated Use getPortletById()
        */
       public DynamicURI setPortletById(String peid)
       {
  -        try
  -        {
  -            DynamicURI uri = getRoot();
  -            if ((peid != null) && (peid.length() > 0))
  -                uri.addPathInfo( JetspeedResources.PATH_PORTLETID_KEY, peid);
  -            return uri;
  -        } catch (ProfileException e)
  -        {
  -            Log.error(e);
  -            return null;
  -        }
  +        return getPortletById( peid);
       }
       
       /**
        * Return link to the home page without user,
  -     * page, group, or role refrenances
  +     * page, group, role, template, action, media type, language, or country
  +     * in link.
        *
        * @return DynamicURI to the home page
        */
       public DynamicURI getHomePage()
       {
  -        return new DynamicURI( rundata);
  +        return getLink( JetspeedLink.DEFAULT,null,"",JetspeedLink.DEFAULT,null,"","","","","");
       }
       
       /**
  @@ -241,19 +236,7 @@
        */
       public DynamicURI getTemplate()
       {
  -        try
  -        {
  -            DynamicURI uri = getRoot();
  -            // Add current template to URI, if their is one
  -            String template = rundata.getRequestedTemplate();
  -            if (template != null)
  -                uri.addPathInfo( JetspeedResources.PATH_TEMPLATE_KEY, template);
  -            return uri;
  -        } catch (ProfileException e)
  -        {
  -            Log.error(e);
  -            return null;
  -        }
  +        return getLink( JetspeedLink.DEFAULT,null,"",JetspeedLink.DEFAULT,null,"",null,"","","");
       }
       
       /**
  @@ -261,28 +244,12 @@
        *
        * @param template to add to link
        * @return DynamicURI to specific portlet
  +     *
  +     * @depracated Use getTemplate()
        */
       public DynamicURI setTemplate(String template)
       {
  -        try
  -        {
  -            DynamicURI uri = getRoot();
  -            
  -            // Cleanup URI
  -            uri.removePathInfo( Profiler.PARAM_GROUP);
  -            uri.removePathInfo( Profiler.PARAM_ROLE);
  -            uri.removePathInfo( Profiler.PARAM_PAGE);
  -            uri.removePathInfo( Profiler.PARAM_USER);
  -            
  -            // Add current template to URI, if their is one
  -            if (template != null)
  -                uri.addPathInfo( JetspeedResources.PATH_TEMPLATE_KEY, template);
  -            return uri;
  -        } catch (ProfileException e)
  -        {
  -            Log.error(e);
  -            return null;
  -        }
  +        return getTemplate(template);
       }
       
       /**
  @@ -290,10 +257,12 @@
        *
        * @param action Desired action
        * @return DynamicURI that includes the desire action
  +     *
  +     * @depracated Use getAction()
        */
       public DynamicURI setAction(String action)
       {
  -        return setAction(action, (String) null);
  +        return getAction(action);
       }
       
       /**
  @@ -303,12 +272,12 @@
        * @param action Desired action
        * @param portlets to receive the action
        * @return DynamicURI that includes the desire action
  +     *
  +     * @depracated Use getAction()
        */
  -    public DynamicURI setAction(String action, Portlets portlet)
  +    public DynamicURI setAction(String action, Portlets portlets)
       {
  -        if (portlet != null)
  -            return setAction(action, portlet.getId());
  -        return setAction(action, (String) null);
  +        return getAction( action, (Portlets) portlets);
       }
       
       /**
  @@ -317,12 +286,12 @@
        * @param action Desired action
        * @param portlet to receive the action
        * @return DynamicURI that includes the desire action
  +     *
  +     * @depracated Use getAction()
        */
       public DynamicURI setAction(String action, Portlet portlet)
       {
  -        if (portlet != null)
  -            return setAction(action, portlet.getID());
  -        return setAction(action, (String) null);
  +        return getAction( action, (Portlet) portlet);
       }
       
       /**
  @@ -332,12 +301,12 @@
        * @param action Desired action
        * @param entry to receive the action
        * @return DynamicURI that includes the desire action
  +     *
  +     * @depracated Use getAction()
        */
       public DynamicURI setAction(String action, Entry entry)
       {
  -        if (entry != null)
  -            return setAction(action, entry.getId());
  -        return setAction(action, (String) null);
  +        return getAction( action, (Entry) entry);
       }
       
       /**
  @@ -345,29 +314,13 @@
        * by a PEID
        *
        * @param action Desired action
  -     * @param portlet to receive the action
  +     * @param peid Id of portlet to receive the action
        * @return DynamicURI that includes the desire action
  +     * @depracated Use getAction()
        */
       public DynamicURI setAction(String action, String peid)
       {
  -        try
  -        {
  -            DynamicURI uri = getRoot();
  -            
  -            // Add the action to URI, if their is one
  -            if (action != null)
  -                uri.addQueryData( JetspeedResources.PATH_ACTION_KEY, action);
  -            
  -            // Add the peid to URI, if their is one
  -            if ((peid != null) && (peid.length() > 0))
  -                uri.addPathInfo( JetspeedResources.PATH_PORTLETID_KEY, peid);
  -            
  -            return uri;
  -        } catch (ProfileException e)
  -        {
  -            Log.error(e);
  -            return null;
  -        }
  +        return getAction( action, (String) peid);
       }
       
       /**
  @@ -375,10 +328,12 @@
        *
        * @param group Desired group
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated Use getGroup()
        */
       public DynamicURI setGroup(String group)
       {
  -        return setGroup( group, null);
  +        return getGroup( group);
       }
       
       /**
  @@ -387,34 +342,12 @@
        * @param page Desired page
        * @param group Desired group
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated Use getGroup()
        */
       public DynamicURI setGroup(String group, String page)
       {
  -        try
  -        {
  -            DynamicURI uri = getRoot();
  -            
  -            // Cleanup URI
  -            uri.removePathInfo( Profiler.PARAM_GROUP);
  -            uri.removePathInfo( Profiler.PARAM_ROLE);
  -            uri.removePathInfo( Profiler.PARAM_PAGE);
  -            uri.removePathInfo( Profiler.PARAM_USER);
  -            
  -            // Add Path items to URI
  -            if ((group != null) && (group.length() > 0))
  -                uri.addPathInfo( Profiler.PARAM_GROUP, group);
  -            
  -            if ((page != null) && (page.length() > 0))
  -                uri.addPathInfo( Profiler.PARAM_PAGE, page);
  -            else
  -                uri.removePathInfo( Profiler.PARAM_PAGE);
  -            
  -            return uri;
  -        } catch (ProfileException e)
  -        {
  -            Log.error(e);
  -            return null;
  -        }
  +        return getGroup( group, page);
       }
       
       /**
  @@ -422,10 +355,12 @@
        * current user, group, or role.
        *
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated Use getPage()
        */
       public DynamicURI setPage()
       {
  -        return setPage( null);
  +        return getPage();
       }
       
       /**
  @@ -434,26 +369,12 @@
        *
        * @param page Desired page
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated Use getPage()
        */
       public DynamicURI setPage(String page)
       {
  -        try
  -        {
  -            DynamicURI uri = getRoot();
  -            
  -            // Cleanup URI
  -            uri.removePathInfo( Profiler.PARAM_PAGE);
  -            
  -            // Add Path items to URI
  -            if ((page != null) && (page.length() > 0))
  -                uri.addPathInfo( Profiler.PARAM_PAGE, page);
  -            
  -            return uri;
  -        } catch (ProfileException e)
  -        {
  -            Log.error(e);
  -            return null;
  -        }
  +        return getPage(page);
       }
       
       /**
  @@ -461,43 +382,27 @@
        * current user, group, or role.
        *
        * @param page Desired page
  -     * @param pane Desired pane
  +     * @param paneName Desired pane name
        * @return DynamicURI that to the desired page
  +     * @depracated Use getPage()
        */
       public DynamicURI setPage(String page, String paneName)
       {
  -        try
  -        {
  -            DynamicURI uri = getRoot();
  -            
  -            // Cleanup URI
  -            uri.removePathInfo( Profiler.PARAM_PAGE);
  -            
  -            // Add Path items to URI
  -            if ((page != null) && (page.length() > 0))
  -                uri.addPathInfo( Profiler.PARAM_PAGE, page);
  -            
  -            if ((paneName != null) && (paneName.length() > 0))
  -                uri.addPathInfo(JetspeedResources.PATH_PANENAME_KEY, paneName);
  -
  -            return uri;
  -        } catch (ProfileException e)
  -        {
  -            Log.error(e);
  -            return null;
  -        }
  +        return getPage( page, paneName);
       }
  -
  -
  +    
  +    
       /**
        * Return a link to a default page for the role
        *
        * @param role Desired role
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated use getRole()
        */
       public DynamicURI setRole(String role)
       {
  -        return setRole(role, null);
  +        return getRole(role);
       }
       
       /**
  @@ -506,34 +411,12 @@
        * @param role Desired role
        * @param page Desired page
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated use getRole()
        */
       public DynamicURI setRole(String role, String page)
       {
  -        try
  -        {
  -            DynamicURI uri = getRoot();
  -            
  -            // Cleanup URI
  -            uri.removePathInfo( Profiler.PARAM_GROUP);
  -            uri.removePathInfo( Profiler.PARAM_ROLE);
  -            uri.removePathInfo( Profiler.PARAM_PAGE);
  -            uri.removePathInfo( Profiler.PARAM_USER);
  -            
  -            // Add Path items to URI
  -            if ((role != null) && (role.length() > 0))
  -                uri.addPathInfo( Profiler.PARAM_ROLE, role);
  -            
  -            if ((page != null) && (page.length() > 0))
  -                uri.addPathInfo( Profiler.PARAM_PAGE, page);
  -            else
  -                uri.removePathInfo( Profiler.PARAM_PAGE);
  -            
  -            return uri;
  -        } catch (ProfileException e)
  -        {
  -            Log.error(e);
  -            return null;
  -        }
  +        return getRole( role, page);
       }
       
       /**
  @@ -541,10 +424,12 @@
        *
        * @param user Desired user
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated Use getUser()
        */
       public DynamicURI setUser(String user)
       {
  -        return setUser(user, null);
  +        return getUser(user);
       }
       
       /**
  @@ -553,27 +438,191 @@
        * @param page Desired page
        * @param user Desired user
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated  Use getUser()
        */
       public DynamicURI setUser(String user, String page)
       {
  +        return getUser( user, page);
  +    }
  +    
  +    /**
  +     * Return a link to a specific pane using the pane's id
  +     *
  +     * @param paneId of the Pane
  +     * @return URI to specific portlet
  +     *
  +     * @depracated Use getPaneById()
  +     */
  +    public DynamicURI setPaneById(String paneId)
  +    {
  +        return getPaneById( paneId);
  +    }
  +    
  +    /**
  +     * Return a link to a specific pane using the pane's id
  +     *
  +     * @param paneName Name of the Pane
  +     * @return URI to specific portlet
  +     * @depracated Uset getPaneByName()
  +     */
  +    public DynamicURI setPaneByName(String paneName)
  +    {
  +        return getPaneByName( paneName);
  +    }
  +    
  +    /**
  +     * Return a link to a desired page.  This is allows the inclusion of a Group/Role/User,
  +     * page, template, action, media type, language, and country.
  +     *
  +     * @param rootType Type of root PSML docuument.  The should be one of the following:
  +     *                <dl>
  +     *                  <dt>JetspeedLink.CURRENT</dt><dd>The link will retain the current Group/Role/User referance. rootValue is not used</dd>
  +     *                  <dt>JetspeedLink.DEFAULT</dt><dd>Default Group, Role, or User. rootValue is not used</dd>
  +     *                  <dt>JetspeedLink.GROUP</dt><dd>Link will be to a Group PSML.  rootValue is a Group Name</dd>
  +     *                  <dt>JetspeedLink.ROLE</dt><dd>Link will be to a Role PSML.  rootValue is a Role Name</dd>
  +     *                  <dt>JetspeedLink.USER</dt><dd>Link will be to a User PSML.  rootValue is a User Name</dd>
  +     *                </dl>
  +     * @param rootValue  See description of rootType
  +     * @param pageName  Name of page. null = default page
  +     * @param elementType <dl>
  +     *                  <dt>JetspeedLink.CURRENT</dt><dd>The link will retain the current Pane/Portlet referance. elementValue is not used</dd>
  +     *                  <dt>JetspeedLink.DEFAULT</dt><dd>The link will NOT referance a pane or portlet. elementValue is not used</dd>
  +     *                  <dt>JetspeedLink.PANE_ID</dt><dd>Link will be to a Pane using it's ID.  elementValue is a Pane's ID</dd>
  +     *                  <dt>JetspeedLink.PANE_NAME</dt><dd>Link will be to a Pane using it's Name.  elementValue is a Pane's Name</dd>
  +     *                  <dt>JetspeedLink.PORTLET_ID</dt><dd>Link will be to a Portlet using it's ID.  elementValue is a Portlet's ID</dd>
  +     *                  <dt>JetspeedLink.PORTLET_NAME</dt><dd>Link will be to a Portlet using it's Name.  elementValue is a Portlet's Name</dd>
  +     *                </dl>
  +     * @param elementValue  See description of elementType
  +     * @param actionName Name of action. If no action is desired use JetspeedLink.NO_ACTION.
  +     * @param templateName Name of template. If no template is desired use JetspeedLink.NO_TEMPLATE.
  +     * @param mediaType Desired media type. null = default media type
  +     * @param language Desired language. null = default language
  +     * @param country Desired country.  null = default language
  +     * @return URI to specific portlet
  +     */
  +    public DynamicURI getLink(int rootType, String rootValue, String pageName, int elementType, String elementValue, String actionName, String templateName, String mediaType, String language, String country)
  +    {
  +        String uriPathType = null;
  +        String uriPathElement = null;
           try
           {
               DynamicURI uri = getRoot();
               
  -            // Cleanup URI
  -            uri.removePathInfo( Profiler.PARAM_GROUP);
  -            uri.removePathInfo( Profiler.PARAM_ROLE);
  -            uri.removePathInfo( Profiler.PARAM_PAGE);
  -            uri.removePathInfo( Profiler.PARAM_USER);
  -            
  -            // Add Path items to URI
  -            if ((user != null) && (user.length() > 0))
  -                uri.addPathInfo( Profiler.PARAM_USER, user);
  -            
  -            if ((page != null) && (page.length() > 0))
  -                uri.addPathInfo( Profiler.PARAM_PAGE, page);
  -            else
  +            // Set Group/Role/User in path
  +            switch (rootType)
  +            {
  +                case JetspeedLink.DEFAULT:
  +                case JetspeedLink.CURRENT:
  +                    break;
  +                case JetspeedLink.GROUP:
  +                    uriPathType = Profiler.PARAM_GROUP;
  +                    break;
  +                case JetspeedLink.ROLE:
  +                    uriPathType = Profiler.PARAM_ROLE;
  +                    break;
  +                case JetspeedLink.USER:
  +                    uriPathType = Profiler.PARAM_USER;
  +                    break;
  +            }
  +            
  +            if (rootType != JetspeedLink.CURRENT )
  +            {
  +                // Cleanup URI
  +                uri.removePathInfo( Profiler.PARAM_GROUP);
  +                uri.removePathInfo( Profiler.PARAM_ROLE);
  +                uri.removePathInfo( Profiler.PARAM_USER);
  +                
  +                if ((rootType != JetspeedLink.DEFAULT ) && (rootValue != null) && (rootValue.trim().length() > 0))
  +                    uri.addPathInfo( uriPathType, rootValue);
  +            }
  +            
  +            // Set Page in path
  +            if (pageName != null)
  +            {
                   uri.removePathInfo( Profiler.PARAM_PAGE);
  +                if (pageName.trim().length() > 0)
  +                {
  +                    uri.addPathInfo( Profiler.PARAM_PAGE, pageName);
  +                }
  +            }
  +            
  +            // Set Portlet/Pane in path
  +            switch (elementType)
  +            {
  +                case JetspeedLink.CURRENT:
  +                case JetspeedLink.DEFAULT:
  +                    break;
  +                case JetspeedLink.PANE_ID:
  +                    uriPathElement = JetspeedResources.PATH_PANEID_KEY;
  +                    break;
  +                case JetspeedLink.PANE_NAME:
  +                    uriPathElement = JetspeedResources.PATH_PANENAME_KEY;
  +                    break;
  +                case JetspeedLink.PORTLET_ID:
  +                    uriPathElement = JetspeedResources.PATH_PORTLETID_KEY;
  +                    break;
  +                case JetspeedLink.PORTLET_NAME:
  +                    uriPathElement = JetspeedResources.PATH_PORTLET_KEY;
  +                    break;
  +            }
  +            
  +            if (elementType != JetspeedLink.CURRENT )
  +            {
  +                // Remove Group/Role/User in URI
  +                uri.removePathInfo( JetspeedResources.PATH_PANEID_KEY);
  +                uri.removePathInfo( JetspeedResources.PATH_PANENAME_KEY);
  +                uri.removePathInfo( JetspeedResources.PATH_PORTLETID_KEY);
  +                uri.removePathInfo( JetspeedResources.PATH_PORTLET_KEY);
  +                
  +                if ((elementType != JetspeedLink.DEFAULT ) && (elementValue != null) && (elementValue.length() > 0))
  +                    uri.addPathInfo( uriPathElement, elementValue);
  +            }
  +            
  +            // Set Template in path
  +            if (templateName != null)
  +            {
  +                if (templateName.length() > 0)
  +                    uri.addPathInfo( JetspeedResources.PATH_TEMPLATE_KEY, templateName);
  +                else
  +                    uri.removePathInfo( JetspeedResources.PATH_TEMPLATE_KEY);
  +            }
  +            
  +            // Set Action in path
  +            if (actionName != null)
  +            {
  +                if (actionName.length() > 0)
  +                    uri.addQueryData( JetspeedResources.PATH_ACTION_KEY, actionName);
  +                else
  +                    uri.removeQueryData( JetspeedResources.PATH_ACTION_KEY);
  +            }
  +            
  +            // Set MediaType in path
  +            if (mediaType != null)
  +            {
  +                if (mediaType.length() > 0)
  +                    uri.addPathInfo( Profiler.PARAM_MEDIA_TYPE, mediaType);
  +                else
  +                    uri.removePathInfo( Profiler.PARAM_MEDIA_TYPE);
  +            }
  +            
  +            // Set Language in path
  +            if (language != null)
  +            {
  +                if (language.length() > 0)
  +                    uri.addPathInfo( Profiler.PARAM_LANGUAGE, language);
  +                else
  +                    uri.removePathInfo( Profiler.PARAM_LANGUAGE);
  +            }
  +            
  +            // Set Country in path
  +            if (country != null)
  +            {
  +                if (mediaType.length() > 0)
  +                    uri.addPathInfo( Profiler.PARAM_COUNTRY, country);
  +                else
  +                    uri.removePathInfo( Profiler.PARAM_COUNTRY);
  +            }
               
               return uri;
           } catch (ProfileException e)
  @@ -582,48 +631,263 @@
               return null;
           }
       }
  +    public DynamicURI getLink(int rootType, String rootValue, String pageName, int elementType, String elementValue, String actionName, String templateName, String mediaType, String language)
  +    {
  +        return getLink(rootType, rootValue, pageName, elementType, elementValue, actionName, templateName, mediaType, language, null);
  +    }
  +    
  +    public DynamicURI getLink(int rootType, String rootValue, String pageName, int elementType, String elementValue, String actionName, String templateName, String mediaType)
  +    {
  +        return getLink(rootType, rootValue, pageName, elementType, elementValue, actionName, templateName, mediaType, null, null);
  +    }
  +    
  +    public DynamicURI getLink(int rootType, String rootValue, String pageName, int elementType, String elementValue, String actionName, String templateName)
  +    {
  +        return getLink(rootType, rootValue, pageName, elementType, elementValue, actionName, actionName, null, null, null);
  +    }
  +    
  +    public DynamicURI getLink(int rootType, String rootValue, String pageName, int elementType, String elementValue, String actionName)
  +    {
  +        return getLink(rootType, rootValue, pageName, elementType, elementValue, actionName, null, null, null, null);
  +    }
  +    
  +    /**
  +     */    
  +    public DynamicURI getLink(int rootType, String rootValue, String pageName, int elementType, String elementValue)
  +    {
  +        return getLink(rootType, rootValue, pageName, elementType, elementValue, null, null, null, null, null);
  +    }
  +    
  +    /**
  +     * Return a link that includes an action
  +     *
  +     * @param action action
  +     * @return DynamicURI that includes the desire action
  +     */
  +    public DynamicURI getAction(String action)
  +    {
  +        return getLink( JetspeedLink.CURRENT, null, null, JetspeedLink.CURRENT, null, action, null, null, null, null);
  +    }
  +    
  +    /**
  +     * Return a link that includes an action to a specific portlet, as defined
  +     * by an entry
  +     *
  +     * @param action Desired action
  +     * @param entry to receive the action
  +     * @return DynamicURI that includes the desire action
  +     */
  +    public DynamicURI getAction(String action, Entry entry)
  +    {
  +        if ( entry != null)
  +            return getLink( JetspeedLink.CURRENT, null, null, JetspeedLink.PORTLET_ID, entry.getId(), null, action, null, null, null);
  +        else
  +            return getLink( JetspeedLink.CURRENT, null, null, JetspeedLink.PORTLET_ID, null, null, action, null, null, null);
  +    }
  +    
  +    /**
  +     * Return a link that includes an action to a specific portlet
  +     *
  +     * @param action Desired action
  +     * @param portlet to receive the action
  +     * @return DynamicURI that includes the desire action
  +     */
  +    public DynamicURI getAction(String action, Portlet portlet)
  +    {
  +        if ( portlet != null)
  +            return getLink( JetspeedLink.CURRENT, null, null, JetspeedLink.PORTLET_ID, portlet.getID(), action, null, null, null, null);
  +        else
  +            return getLink( JetspeedLink.CURRENT, null, null, JetspeedLink.PORTLET_ID, null, action, null, null, null, null);
  +    }
  +    
  +    /**
  +     * Return a link that includes an action to a specific portlet, as defined
  +     * by a portlets
  +     *
  +     * @param action Desired action
  +     * @param portlets to receive the action
  +     * @return DynamicURI that includes the desire action
  +     */
  +    public DynamicURI getAction(String action, Portlets portlets)
  +    {
  +        if ( portlets != null)
  +            return getLink( JetspeedLink.CURRENT, null, null, JetspeedLink.PORTLET_ID, portlets.getId(), action, null, null, null, null);
  +        else
  +            return getLink( JetspeedLink.CURRENT, null, null, JetspeedLink.PORTLET_ID, null, action, null, null, null, null);
  +    }
  +    
  +    /**
  +     * Return a link that includes an action to a specific portlet, as defined
  +     * by a PEID
  +     *
  +     * @param action Desired action
  +     * @param peid Id of the portlet to receive the action
  +     * @return DynamicURI that includes the desire action
  +     */
  +    public DynamicURI getAction(String action, String peid)
  +    {
  +        return getLink( JetspeedLink.CURRENT, null, null, JetspeedLink.PORTLET_ID, peid, action, null, null, null, null);
  +    }
  +    
  +    /**
  +     * Return a link to a default page for the group
  +     *
  +     * @param group Desired group
  +     * @return DynamicURI that to the default page for the group
  +     */
  +    public DynamicURI getGroup(String group)
  +    {
  +        return getLink( JetspeedLink.GROUP, group, "", JetspeedLink.DEFAULT, null, null,null,null,null,null);
  +    }
  +    
  +    /**
  +     * Return a link to a desired page for the group
  +     *
  +     * @param page Desired page
  +     * @param group Desired group
  +     * @return DynamicURI that to the desired group and page
  +     */
  +    public DynamicURI getGroup(String group, String page)
  +    {
  +        return getLink( JetspeedLink.GROUP, group, page, JetspeedLink.DEFAULT, null, null,null,null,null,null);
  +    }
  +    /**
  +     * Return a link to a default page for the
  +     * current user, group, or role.
  +     *
  +     * @return DynamicURI that to the default page
  +     */
  +    public DynamicURI getPage()
  +    {
  +        return getLink( JetspeedLink.CURRENT, null, "", JetspeedLink.DEFAULT, null, null,null,null,null,null);
  +    }
  +    
  +    /**
  +     * Return a link to a desired page for the
  +     * current user, group, or role.
  +     *
  +     * @param page Desired page
  +     * @return DynamicURI that to the desired page
  +     */
  +    public DynamicURI getPage(String page)
  +    {
  +        return getLink( JetspeedLink.CURRENT, null, page, JetspeedLink.DEFAULT, null, null,null,null,null,null);
  +    }
       
       /**
  +     * Return a link to a desired page and pane for the
  +     * current user, group, or role.
  +     *
  +     * @param page Desired page
  +     * @param paneName Name of the desired pane
  +     * @return DynamicURI that to the desired page
  +     */
  +    public DynamicURI getPage(String page, String paneName)
  +    {
  +        return getLink( JetspeedLink.CURRENT, null, page, JetspeedLink.PANE_NAME, paneName, null,null,null,null,null);
  +    }
  +    /**
        * Return a link to a specific pane using the pane's id
        *
        * @param paneId of the Pane
        * @return URI to specific portlet
        */
  -    public DynamicURI setPaneById(String paneId)
  +    public DynamicURI getPaneById(String paneId)
       {
  -        try
  -        {
  -            DynamicURI uri = getRoot();
  -            if ((paneId != null) && (paneId.length() > 0))
  -                uri.addPathInfo(JetspeedResources.PATH_PANEID_KEY, paneId);
  -            return uri;
  -        } catch (ProfileException e)
  -        {
  -            Log.error(e);
  -            return null;
  -        }
  +        return getLink( JetspeedLink.CURRENT, null, this.getPageName(), JetspeedLink.PANE_ID, paneId, null,null,null,null,null);
       }
       
       /**
        * Return a link to a specific pane using the pane's id
        *
  -     * @param paneId of the Pane
  +     * @param paneName Name of the Pane
        * @return URI to specific portlet
        */
  -    public DynamicURI setPaneByName(String paneName)
  +    public DynamicURI getPaneByName(String paneName)
       {
  -        try
  -        {
  -            DynamicURI uri = getRoot();
  -            if ((paneName != null) && (paneName.length() > 0))
  -                uri.addPathInfo(JetspeedResources.PATH_PANENAME_KEY, paneName);
  -            return uri;
  -        } catch (ProfileException e)
  -        {
  -            Log.error(e);
  -            return null;
  -        }
  +        return getLink( JetspeedLink.CURRENT, null, this.getPageName(), JetspeedLink.PANE_NAME, paneName, null,null,null,null,null);
       }
  +    
  +    /**
  +     * Return an link to a specific portlet using the portet's id
  +     *
  +     * @param peid of the portlet
  +     * @return DynamicURI to specific portlet
  +     */
  +    public DynamicURI getPortletById(String peid)
  +    {
  +        return getLink( JetspeedLink.CURRENT, null, this.getPageName(), JetspeedLink.PORTLET_ID, peid, null,null,null,null,null);
  +    }
  +    /**
  +     * Add a portlet reference in the link.
  +     *
  +     * Note: This must be used with caution, since a portlet may exist may times
  +     * in a PSML.  setPortletById() is the perfered method.
  +     *
  +     * @param portletName the name of the portlet to link to
  +     * @return a DynamicURI referencing the named portlet
  +     */
  +    public DynamicURI getPortletByName(String portletName)
  +    {
  +        return getLink( JetspeedLink.CURRENT, null, this.getPageName(), JetspeedLink.PORTLET_NAME, portletName, null,null,null,null,null);
  +    }
  +    /**
  +     * Return a link to a default page for the role
  +     *
  +     * @param role Desired role
  +     * @return DynamicURI that to the desired page
  +     */
  +    public DynamicURI getRole(String role)
  +    {
  +        return getLink( JetspeedLink.ROLE, role, "", JetspeedLink.DEFAULT, null, null,null,null,null,null);
  +    }
  +    
  +    /**
  +     * Return a link to a desired page for the role
  +     *
  +     * @param role Desired role
  +     * @param page Desired page
  +     * @return DynamicURI that to the desired page
  +     */
  +    public DynamicURI getRole(String role, String page)
  +    {
  +        return getLink( JetspeedLink.ROLE, role, page, JetspeedLink.DEFAULT, null, null, null, null, null, null);
  +    }
  +    
  +    /**
  +     * Return a link to the template.
  +     *
  +     * @param template to add to link
  +     * @return DynamicURI to specific portlet
  +     */
  +    public DynamicURI getTemplate(String template)
  +    {
  +        return getLink( JetspeedLink.CURRENT, null, null, JetspeedLink.DEFAULT, null, null, template, null, null, null);
  +    }
  +    
  +    /**
  +     * Return a link to a default page for the user
  +     *
  +     * @param user Desired user
  +     * @return DynamicURI that to the desired page
  +     */
  +    public DynamicURI getUser(String user)
  +    {
  +        return getLink( JetspeedLink.USER, user, "", JetspeedLink.DEFAULT, null, null,null,null,null,null);
  +    }
  +    
  +    /**
  +     * Return a link to a desired page for the user
  +     *
  +     * @param page Desired page
  +     * @param user Desired user
  +     * @return DynamicURI that to the desired page
  +     */
  +    public DynamicURI getUser(String user, String page)
  +    {
  +        return getLink( JetspeedLink.USER, user, page, JetspeedLink.DEFAULT, null, null,null,null,null,null);
  +    }
  +    
       private void initLink()
       {
           if (initDone == true)
  @@ -654,8 +918,7 @@
       private DynamicURI getRoot() throws ProfileException
       {
           DynamicURI uri = null;
  -        if (initDone == false)
  -            initLink();
  +        initLink();
           if (locator != null)
               uri = Profiler.makeDynamicURI(rundata, locator);
           
  @@ -699,6 +962,7 @@
        */
       public boolean getAnonymous()
       {
  +        initLink();
           try
           {
               return locator.getAnonymous();
  @@ -716,6 +980,7 @@
        */
       public String getCountry()
       {
  +        initLink();
           try
           {
               return locator.getCountry();
  @@ -733,6 +998,7 @@
        */
       public String getGroupName()
       {
  +        initLink();
           try
           {
               return locator.getGroupName();
  @@ -750,6 +1016,7 @@
        */
       public String getLanguage()
       {
  +        initLink();
           try
           {
               return locator.getLanguage();
  @@ -767,6 +1034,7 @@
        */
       public String getMediaType()
       {
  +        initLink();
           try
           {
               return locator.getMediaType();
  @@ -782,8 +1050,9 @@
        *
        * @return Page name of PSML, or null if no Page name
        */
  -    public String getPage()
  +    public String getPageName()
       {
  +        initLink();
           try
           {
               return locator.getName();
  @@ -801,6 +1070,7 @@
        */
       public String getRoleName()
       {
  +        initLink();
           try
           {
               return locator.getRoleName();
  @@ -818,6 +1088,7 @@
        */
       public String getUserName()
       {
  +        initLink();
           try
           {
               return locator.getUserName();
  @@ -826,6 +1097,50 @@
               Log.error(e);
               return null;
           }
  +    }
  +    
  +    /**
  +     * The following methods used by Velocity to get value of constants
  +     */
  +    public static int getCURRENT()
  +    {
  +        return JetspeedLink.CURRENT;
  +    }
  +    public static int getDEFAULT()
  +    {
  +        return JetspeedLink.DEFAULT;
  +    }
  +    public static int getGROUP()
  +    {
  +        return JetspeedLink.GROUP;
  +    }
  +    public static int getPANE_ID()
  +    {
  +        return JetspeedLink.PANE_ID;
  +    }
  +    public static int getPANE_NAME()
  +    {
  +        return JetspeedLink.PANE_NAME;
  +    }
  +    public static int getPORTLET_ID()
  +    {
  +        return JetspeedLink.PORTLET_ID;
  +    }
  +    public static int getPORTLET_NAME()
  +    {
  +        return JetspeedLink.PORTLET_NAME;
  +    }
  +    public static int getROLE()
  +    {
  +        return JetspeedLink.ROLE;
  +    }
  +    public static int getUSER()
  +    {
  +        return JetspeedLink.USER;
  +    }
  +    public static String getDEFAULT_PAGE()
  +    {
  +        return "";
       }
       
       /**
  
  
  
  1.8       +257 -14   jakarta-jetspeed/src/java/org/apache/jetspeed/util/template/JetspeedLink.java
  
  Index: JetspeedLink.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/util/template/JetspeedLink.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JetspeedLink.java	27 Apr 2002 21:17:21 -0000	1.7
  +++ JetspeedLink.java	5 May 2002 03:07:10 -0000	1.8
  @@ -73,10 +73,21 @@
    * rendering code. This is done currently in VelocityPortlet.</p>
    *
    * @author <a href="mailto:paulsp@apache.org">Paul Spencer</a>
  - * @version $Id: JetspeedLink.java,v 1.7 2002/04/27 21:17:21 taylor Exp $
  + * @version $Id: JetspeedLink.java,v 1.8 2002/05/05 03:07:10 paulsp Exp $
    */
  -public interface JetspeedLink
  -{
  +public interface JetspeedLink {
  +    
  +    public static int CURRENT = 101;
  +    public static int DEFAULT = 102;
  +    public static int GROUP = 201;
  +    public static int ROLE = 202;
  +    public static int USER = 203;
  +    public static int PANE_ID = 301;
  +    public static int PANE_NAME = 302;
  +    public static int PORTLET_ID = 303;
  +    public static int PORTLET_NAME = 304;
  +    
  +    
       /**
        * Adds a name=value pair to the path_info string.
        *
  @@ -104,8 +115,8 @@
       
       /**
        * Return link to the home page without user,
  -     * page, group, or role refrenances
  -     *
  +     * page, group, role, template, action, media type, language, or country
  +     * in link.
        * @return DynamicURI to the home page
        */
       public DynamicURI getHomePage();
  @@ -166,7 +177,7 @@
        *
        * @return Page name of PSML, or null if no Page name
        */
  -    public String getPage();
  +    public String getPageName();
       
       /**
        * Return Role name of the PSML file
  @@ -188,6 +199,163 @@
        * @param action action
        * @return DynamicURI that includes the desire action
        */
  +    public DynamicURI getAction(String action);
  +    
  +    /**
  +     * Return a link that includes an action to a specific portlet, as defined
  +     * by an entry
  +     *
  +     * @param action Desired action
  +     * @param entry to receive the action
  +     * @return DynamicURI that includes the desire action
  +     */
  +    public DynamicURI getAction(String action, Entry entry);
  +    
  +    /**
  +     * Return a link that includes an action to a specific portlet, as defined
  +     * by a portlet
  +     *
  +     * @param action Desired action
  +     * @param portlet to receive the action
  +     * @return DynamicURI that includes the desire action
  +     */
  +    public DynamicURI getAction(String action, Portlet portlet);
  +    
  +    /**
  +     * Return a link that includes an action to a specific portlet, as defined
  +     * by a portlets
  +     *
  +     * @param action Desired action
  +     * @param portlet to receive the action
  +     * @return DynamicURI that includes the desire action
  +     */
  +    public DynamicURI getAction(String action, Portlets portlet);
  +    
  +    /**
  +     * Return a link that includes an action to a specific portlet, as defined
  +     * by a PEID
  +     *
  +     * @param action Desired action
  +     * @param peid Id of portlet to receive the action
  +     * @return DynamicURI that includes the desire action
  +     */
  +    public DynamicURI getAction(String action, String peid);
  +
  +    /**
  +     * Return a link to a default page for the group
  +     *
  +     * @param group Desired group
  +     * @return DynamicURI that to the desired page
  +     */
  +    public DynamicURI getGroup(String group);
  +    
  +    /**
  +     * Return a link to a desired page for the group
  +     *
  +     * @param page Desired page
  +     * @param group Desired group
  +     * @return DynamicURI that to the desired page
  +     */
  +    public DynamicURI getGroup(String group, String page);
  +    
  +    /**
  +     * Return a link to a default page for the
  +     * current user, group, or role.
  +     *
  +     * @return DynamicURI that to the desired page
  +     */
  +    public DynamicURI getPage();
  +    
  +    /**
  +     * Return a link to a desired page for the
  +     * current user, group, or role.
  +     *
  +     * @param page Desired page
  +     * @return DynamicURI that to the desired page
  +     */
  +    public DynamicURI getPage(String page);
  +    
  +    /**
  +     * Return a link to a desired page and pane for the
  +     * current user, group, or role.
  +     *
  +     * @param page Desired page
  +     * @param paneName Name of desired pane
  +     * @return DynamicURI that to the desired page
  +     */
  +    public DynamicURI getPage(String page, String paneName);
  +    
  +    /**
  +     * Return an link to a specific portlet using the portet's id
  +     *
  +     * @param peid of the portlet
  +     * @return DynamicURI to specific portlet
  +     *
  +     *
  +     * @deprecated Use getPortletById()
  +     */
  +    public DynamicURI getPortletById(String peid);
  +    
  +    /**
  +     * Add a portlet reference in the link.
  +     *
  +     * Note: This must be used with caution, since a portlet may exist may times
  +     * in a PSML.  setPortletById() is the perfered method.
  +     *
  +     * @param portletName the name of the portlet to link to
  +     * @return a DynamicURI referencing the named portlet for easy link construction in template
  +     */
  +    public DynamicURI getPortletByName(String portletName);
  +    
  +    /**
  +     * Return a link to a default page for the role
  +     *
  +     * @param role Desired role
  +     * @return DynamicURI that to the desired page
  +     */
  +    public DynamicURI getRole(String role);
  +    
  +    /**
  +     * Return a link to a desired page for the role
  +     *
  +     * @param role Desired role
  +     * @param page Desired page
  +     * @return DynamicURI that to the desired page
  +     */
  +    public DynamicURI getRole(String role, String page);
  +    
  +    /**
  +     * Return a link to the template.
  +     *
  +     * @param template to add to link
  +     * @return DynamicURI to specific portlet
  +     */
  +    public DynamicURI getTemplate(String template);
  +    
  +    /**
  +     * Return a link to a default page for the user
  +     *
  +     * @param user Desired user
  +     * @return DynamicURI that to the desired page
  +     */
  +    public DynamicURI getUser(String user);
  +    
  +    /**
  +     * Return a link to a desired page for the user
  +     *
  +     * @param page Desired page
  +     * @param user Desired user
  +     * @return DynamicURI that to the desired page
  +     */
  +    public DynamicURI getUser(String user, String page);
  +
  +    /**
  +     * Return a link that includes an action
  +     *
  +     * @param action action
  +     * @return DynamicURI that includes the desire action
  +     * @deprecated Use getAction()
  +     */
       public DynamicURI setAction(String action);
       
       /**
  @@ -197,9 +365,11 @@
        * @param action Desired action
        * @param entry to receive the action
        * @return DynamicURI that includes the desire action
  +     *
  +     * @depracated use getAction()
        */
       public DynamicURI setAction(String action, Entry entry);
  -
  +    
       /**
        * Return a link that includes an action to a specific portlet, as defined
        * by a portlet
  @@ -207,16 +377,20 @@
        * @param action Desired action
        * @param portlet to receive the action
        * @return DynamicURI that includes the desire action
  +     *
  +     * @depracated use getAction()
        */
       public DynamicURI setAction(String action, Portlet portlet);
  -
  +    
       /**
        * Return a link that includes an action to a specific portlet, as defined
        * by a portlets
        *
        * @param action Desired action
  -     * @param portlets to receive the action
  +     * @param portlet to receive the action
        * @return DynamicURI that includes the desire action
  +     *
  +     * @depracated use getAction()
        */
       public DynamicURI setAction(String action, Portlets portlet);
       
  @@ -225,6 +399,8 @@
        *
        * @param group Desired group
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated use getGroup()
        */
       public DynamicURI setGroup(String group);
       
  @@ -234,6 +410,8 @@
        * @param page Desired page
        * @param group Desired group
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated use getGroup()
        */
       public DynamicURI setGroup(String group, String page);
       
  @@ -242,6 +420,8 @@
        * current user, group, or role.
        *
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated use getPage()
        */
       public DynamicURI setPage();
       
  @@ -251,6 +431,8 @@
        *
        * @param page Desired page
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated use getPage()
        */
       public DynamicURI setPage(String page);
       
  @@ -259,16 +441,20 @@
        * current user, group, or role.
        *
        * @param page Desired page
  -     * @param pane Desired pane
  +     * @param paneName Name of desired pane
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated use getPage()
        */
       public DynamicURI setPage(String page, String paneName);
  -
  +    
       /**
        * Return an link to a specific portlet using the portet's id
        *
        * @param peid of the portlet
        * @return DynamicURI to specific portlet
  +     *
  +     * @depracated use getPortletById()
        */
       public DynamicURI setPortletById(String peid);
       
  @@ -277,6 +463,8 @@
        *
        * @param peid of the portal element
        * @return DynamicURI to specific portal element
  +     *
  +     * @depracated use getPortletById or getPaneById()
        */
       public DynamicURI setPortalElement(String peid);
       
  @@ -288,14 +476,18 @@
        *
        * @param portletName the name of the portlet to link to
        * @return a DynamicURI referencing the named portlet for easy link construction in template
  +     *
  +     * @depracated use getPortletByName()
        */
       public DynamicURI setPortletByName(String portletName);
  -
  +    
       /**
        * Return a link to a default page for the role
        *
        * @param role Desired role
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated use getRole()
        */
       public DynamicURI setRole(String role);
       
  @@ -305,6 +497,8 @@
        * @param role Desired role
        * @param page Desired page
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated use getRole()
        */
       public DynamicURI setRole(String role, String page);
       
  @@ -313,6 +507,8 @@
        *
        * @param template to add to link
        * @return DynamicURI to specific portlet
  +     *
  +     * @depracated use getTemplate()
        */
       public DynamicURI setTemplate(String template);
       
  @@ -321,6 +517,8 @@
        *
        * @param user Desired user
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated use getUser()
        */
       public DynamicURI setUser(String user);
       
  @@ -330,6 +528,8 @@
        * @param page Desired page
        * @param user Desired user
        * @return DynamicURI that to the desired page
  +     *
  +     * @depracated use getUser()
        */
       public DynamicURI setUser(String user, String page);
       
  @@ -339,12 +539,13 @@
        * @return a URL, as a string, the the root page or pane.
        */
       public String toString();
  -
  +    
       /**
        * Return a link to a specific pane using the pane's id
        *
        * @param paneId of the Pane
  -     * @return  URI to specific portlet
  +     * @return URI to specific portlet
  +     * @deprecated Use getPaneById()
        */
       public DynamicURI setPaneById(String paneId);
       
  @@ -362,7 +563,49 @@
        * not be fixed
        *
        * @param portlet the name of the active portlet
  +     * @deprecated Use getLink() or getAction() or getPortletById() or getPortletByName().
        */
       public void setPortlet(Portlet portlet);
  +    
  +    /**
  +     * Return a link to a desired page.  This is allows the inclusion of a Group/Role/User,
  +     * page, template, action, media type, language, and country.
  +     *
  +     * @param rootType Type of root PSML docuument.  The should be one of the following:
  +     *                 <dl>
  +     *                   <dt>JetspeedLink.CURRENT</dt><dd>The link will retain the current Group/Role/User referance. rootValue is not used</dd>
  +     *                   <dt>JetspeedLink.DEFAULT</dt><dd>Default Group, Role, or User. rootValue is not used</dd>
  +     *                   <dt>JetspeedLink.GROUP</dt><dd>Link will be to a Group PSML.  rootValue is a Group Name</dd>
  +     *                   <dt>JetspeedLink.ROLE</dt><dd>Link will be to a Role PSML.  rootValue is a Role Name</dd>
  +     *                   <dt>JetspeedLink.USER</dt><dd>Link will be to a User PSML.  rootValue is a User Name</dd>
  +     *                 </dl>
  +     * @param rootValue  See description of rootType
  +     * @param pageName  Name of page. null = default page
  +     * @param elementType
  +     *                 <dl>
  +     *                   <dt>JetspeedLink.CURRENT</dt><dd>The link will retain the current Pane/Portlet referance. elementValue is not used</dd>
  +     *                   <dt>JetspeedLink.DEFAULT</dt><dd>The link will NOT referance a pane or portlet. elementValue is not used</dd>
  +     *                   <dt>JetspeedLink.PANE_ID</dt><dd>Link will be to a Pane using it's ID.  elementValue is a Pane's ID</dd>
  +     *                   <dt>JetspeedLink.PANE_NAME</dt><dd>Link will be to a Pane using it's Name.  elementValue is a Pane's Name</dd>
  +     *                   <dt>JetspeedLink.PORTLET_ID</dt><dd>Link will be to a Portlet using it's ID.  elementValue is a Portlet's ID</dd>
  +     *                   <dt>JetspeedLink.PORTLET_NAME</dt><dd>Link will be to a Portlet using it's Name.  elementValue is a Portlet's Name</dd>
  +     *                 </dl>
  +     * @param elementValue  See description of elementType
  +     * @param actionName Name of action. If no action is desired use JetspeedLink.NO_ACTION.
  +     * @param templateName Name of template. If no template is desired use JetspeedLink.NO_TEMPLATE.
  +     * @param mediaType Desired media type. null = default media type
  +     * @param language Desired language. null = default language
  +     * @param country Desired country.  null = default language
  +     * @return  URI to specific portlet
  +     */    
  +    public DynamicURI getLink(int rootType, String rootValue, String pageName, int elementType, String elementValue, String actionName, String templateName, String mediaType, String language, String country);
  +    /**
  +     * @see # org.apache.jetspeed.util.template.JetspeedLink.getLink( int, String, String, int, String, String, String, String, String, String
  +     */    
  +    public DynamicURI getLink(int rootType, String rootValue, String pageName, int elementType, String elementValue, String actionName, String templateName, String mediaType, String language);
  +    public DynamicURI getLink(int rootType, String rootValue, String pageName, int elementType, String elementValue, String actionName, String templateName, String mediaType);
  +    public DynamicURI getLink(int rootType, String rootValue, String pageName, int elementType, String elementValue, String actionName, String templateName);
  +    public DynamicURI getLink(int rootType, String rootValue, String pageName, int elementType, String elementValue, String actionName);
  +    public DynamicURI getLink(int rootType, String rootValue, String pageName, int elementType, String elementValue);
       
   }
  
  
  
  1.5       +93 -8     jakarta-jetspeed/src/java/org/apache/jetspeed/util/template/TestJetspeedLink.java
  
  Index: TestJetspeedLink.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/util/template/TestJetspeedLink.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestJetspeedLink.java	14 Apr 2002 16:49:09 -0000	1.4
  +++ TestJetspeedLink.java	5 May 2002 03:07:10 -0000	1.5
  @@ -76,6 +76,7 @@
   import org.apache.jetspeed.om.profile.PSMLDocument;
   import org.apache.jetspeed.services.Profiler;
   import org.apache.jetspeed.services.JetspeedSecurity;
  +import org.apache.jetspeed.services.resources.JetspeedResources;
   import org.apache.jetspeed.services.rundata.JetspeedRunData;
   import org.apache.jetspeed.util.template.JetspeedLink;
   import org.apache.jetspeed.util.template.JetspeedLinkFactory;
  @@ -93,7 +94,7 @@
    * TestJespeedLink
    *
    * @author <a href="paulsp@apache.org">Paul Spencer</a>
  - * @version $Id: TestJetspeedLink.java,v 1.4 2002/04/14 16:49:09 paulsp Exp $
  + * @version $Id: TestJetspeedLink.java,v 1.5 2002/05/05 03:07:10 paulsp Exp $
    */
   public class TestJetspeedLink extends ServletTestCase
   {
  @@ -185,7 +186,7 @@
       public void beginGroupLink(WebRequest theRequest)
       {
           theRequest.setURL(TEST_HOST, TEST_CONTEXT, TEST_SERVLET
  -        , "/group/apache" , null);
  +        , "/" + Profiler.PARAM_GROUP + "/apache" , null);
           System.out.println("post set URL = " + theRequest.getURL());
       }
       
  @@ -213,7 +214,7 @@
           String link = jsLink.toString();
           System.out.println("Group link = " + link);
           assertTrue( "Verifing group Link", 
  -          link.startsWith("http://" + TEST_HOST + TEST_CONTEXT + TEST_SERVLET +"/group/apache"));
  +          link.startsWith("http://" + TEST_HOST + TEST_CONTEXT + TEST_SERVLET +"/" + Profiler.PARAM_GROUP + "/apache"));
   
           // Generatate and output thre page
           TurbineTestUtilities.generatePage(rundata);
  @@ -232,7 +233,7 @@
       public void beginPageLink(WebRequest theRequest)
       {
           theRequest.setURL(TEST_HOST, TEST_CONTEXT, TEST_SERVLET
  -        , "/page/news" , null);
  +        , "/" + Profiler.PARAM_PAGE + "/news" , null);
           System.out.println("post set URL = " + theRequest.getURL());
       }
       
  @@ -260,7 +261,7 @@
           String link = jsLink.toString();
           System.out.println("Page Link = " + link);
           assertTrue( "Verifing page Link", 
  -          link.startsWith("http://" + TEST_HOST + TEST_CONTEXT + TEST_SERVLET +"/page/news"));
  +          link.startsWith("http://" + TEST_HOST + TEST_CONTEXT + TEST_SERVLET +"/" + Profiler.PARAM_PAGE + "/news"));
           
           // Generatate and output thre page
           TurbineTestUtilities.generatePage(rundata);
  @@ -277,7 +278,7 @@
       public void beginGroupPage(WebRequest theRequest)
       {
           theRequest.setURL(TEST_HOST, TEST_CONTEXT, TEST_SERVLET
  -        , "/group/apache/page/news" , null);
  +        , "/" + Profiler.PARAM_GROUP + "/apache/" + Profiler.PARAM_PAGE + "/news" , null);
           System.out.println("post set URL = " + theRequest.getURL());
       }
       
  @@ -305,7 +306,7 @@
           String link = jsLink.toString();
           System.out.println("Group/Page Link = " + link);
           assertTrue( "Verifing group/page Link", 
  -          link.startsWith("http://" + TEST_HOST + TEST_CONTEXT + TEST_SERVLET +"/group/apache/page/news"));
  +          link.startsWith("http://" + TEST_HOST + TEST_CONTEXT + TEST_SERVLET +"/" + Profiler.PARAM_GROUP + "/apache/" + Profiler.PARAM_PAGE + "/news"));
           
           // Generatate and output thre page
           TurbineTestUtilities.generatePage(rundata);
  @@ -322,7 +323,7 @@
       public void beginGroupPage2(WebRequest theRequest)
       {
           theRequest.setURL(TEST_HOST, TEST_CONTEXT, TEST_SERVLET
  -        , "/group/apache/page/news" , null);
  +        , "/" + Profiler.PARAM_GROUP + "/apache/" + Profiler.PARAM_PAGE + "/news" , null);
           System.out.println("post set URL = " + theRequest.getURL());
       }
       
  @@ -361,6 +362,7 @@
           // Make sure 2 calls to toString() return the same value
           jetspeedLink = JetspeedLinkFactory.getInstance(rundata);
           assertEquals( "jsLink = jetspeedLink", jetspeedLink.toString(), jetspeedLink.toString());
  +        JetspeedLinkFactory.putInstance(jsLink);
   
           // Generatate and output thre page
           TurbineTestUtilities.generatePage(rundata);
  @@ -370,6 +372,89 @@
           RunDataFactory.putRunData(rundata);
       }
       public void endGroupPage2(org.apache.cactus.WebResponse theResponse)
  +    {
  +        System.out.println("text = " + theResponse.getText().length());
  +    }
  +    
  +    
  +    public void beginGetLink(WebRequest theRequest)
  +    {
  +        theRequest.setURL(TEST_HOST, TEST_CONTEXT, TEST_SERVLET
  +        , "/" + Profiler.PARAM_GROUP + "/apache/" + Profiler.PARAM_PAGE + "/news/" + JetspeedResources.PATH_PORTLETID_KEY + "/p_1234/" + JetspeedResources.PATH_TEMPLATE_KEY + "/test/" + Profiler.PARAM_MEDIA_TYPE + "/wml/" + Profiler.PARAM_LANGUAGE + "/es/" + Profiler.PARAM_COUNTRY + "/GB" , null);
  +        System.out.println("post set URL = " + theRequest.getURL());
  +    }
  +    
  +    /**
  +     * Test the User link
  +     * @throws Exception
  +     */
  +    public void testGetLink() throws Exception
  +    {
  +        JetspeedLink jetspeedLink = null;
  +        
  +        // Create the RunData object to be used during testing.
  +        RunData rundata = RunDataFactory.getRunData( request, response, config );
  +        assertNotNull( "Got rundata", rundata);
  +        TurbineTestUtilities.setupRunData(rundata);
  +        
  +        // Get and populate the context
  +        Context context = TurbineVelocity.getContext(rundata);
  +        assertNotNull( "Got context", context);
  +        TurbinePull.populateContext( context, rundata);
  +        
  +        // Verify tool are in the context
  +        JetspeedLink jsLink = (JetspeedLink) context.get("jslink");
  +        assertNotNull( "Got jslink from context", jsLink);
  +        
  +        // Generate the link from JetspeedLink
  +        jetspeedLink = JetspeedLinkFactory.getInstance(rundata);
  +        String baseLink = new String("http://" + TEST_HOST + TEST_CONTEXT + TEST_SERVLET);
  +        String currentLink = new String( baseLink + "/" + Profiler.PARAM_GROUP + "/" + jetspeedLink.getGroupName() + "/" + Profiler.PARAM_PAGE + "/" + jetspeedLink.getPageName());
  + 
  +        assertEquals( "Testing getGroupName()", "apache" , jetspeedLink.getGroupName() );
  +        assertEquals( "Testing getPageName()", "news.psml" , jetspeedLink.getPageName() );
  +        assertNull( "Testing getRoleName()", jetspeedLink.getRoleName() );
  +        assertNull( "Testing getUserName()", jetspeedLink.getUserName() );
  +
  +        // Test conveniance methods
  +        assertEquals( "Testing getAction(actionName)", currentLink + "?" + JetspeedResources.PATH_ACTION_KEY + "=myAction", jetspeedLink.getAction("myAction").toString());
  +        assertEquals( "Testing getAction(actionName, peid)", currentLink + "/" + JetspeedResources.PATH_PORTLETID_KEY + "/actionpeid?" + JetspeedResources.PATH_ACTION_KEY + "=myAction1", jetspeedLink.getAction("myAction1","actionpeid").toString() );
  +        assertEquals( "Testing getGroup(groupName)", baseLink + "/" + Profiler.PARAM_GROUP + "/myGroup", jetspeedLink.getGroup("myGroup").toString());
  +        assertEquals( "Testing getGroup(groupName,pageName)", baseLink + "/" + Profiler.PARAM_GROUP + "/myGroup1/" + Profiler.PARAM_PAGE + "/myGroupPage", jetspeedLink.getGroup("myGroup1","myGroupPage").toString());
  +        assertEquals( "Testing getHomePage()", baseLink , jetspeedLink.getHomePage().toString() );
  +        assertEquals( "Testing getRole(roleName)", baseLink + "/" + Profiler.PARAM_ROLE + "/myRole", jetspeedLink.getRole("myRole").toString());
  +        assertEquals( "Testing getRole(roleName,pageName)", baseLink + "/" + Profiler.PARAM_ROLE + "/myRole1/" + Profiler.PARAM_PAGE + "/myRolePage", jetspeedLink.getRole("myRole1","myRolePage").toString());
  +        assertEquals( "Testing getTemplate(templateName)", currentLink  + "/" + JetspeedResources.PATH_TEMPLATE_KEY + "/myTemplate", jetspeedLink.getTemplate("myTemplate").toString());
  +        assertEquals( "Testing getTemplate()", currentLink , jetspeedLink.getTemplate().toString() );
  +        assertEquals( "Testing getUser(userName)", baseLink + "/" + Profiler.PARAM_USER + "/myUser", jetspeedLink.getUser("myUser").toString());
  +        assertEquals( "Testing getUser(userName,PageName)", baseLink + "/" + Profiler.PARAM_USER + "/myUser1/" + Profiler.PARAM_PAGE + "/myUserPage", jetspeedLink.getUser("myUser1","myUserPage").toString());
  +
  +        // Test getLink()
  +        assertEquals( "Testing getLink() with default & nulls", baseLink + "/" + Profiler.PARAM_PAGE + "/" + jetspeedLink.getPageName(), jetspeedLink.getLink(JetspeedLink.DEFAULT, null, null, JetspeedLink.DEFAULT, null, null).toString().toString() );
  +        assertEquals( "Testing getLink() with current & nulls", baseLink + "/" + Profiler.PARAM_GROUP + "/" + jetspeedLink.getGroupName()+ "/" + Profiler.PARAM_PAGE + "/" + jetspeedLink.getPageName(), jetspeedLink.getLink(JetspeedLink.CURRENT, null, null, JetspeedLink.CURRENT, null, null).toString().toString() );
  +        assertEquals( "Testing getLink() with default & nulls + media/language/country", baseLink + "/" + Profiler.PARAM_PAGE + "/" + jetspeedLink.getPageName() + "/" + Profiler.PARAM_MEDIA_TYPE + "/" + "html"+ "/" + Profiler.PARAM_LANGUAGE + "/" + "en" + "/" + Profiler.PARAM_COUNTRY + "/" + "US", jetspeedLink.getLink(JetspeedLink.DEFAULT, null, null, JetspeedLink.DEFAULT, null, null, null, "html", "en", "US").toString().toString() );
  +
  +/*
  +        System.out.println("Named action jetspeedLink = " + jetspeedLink.getLink(JetspeedLink.CURRENT, null, null, JetspeedLink.CURRENT, null, null).toString());
  +        System.out.println("Named action jetspeedLink = " + jetspeedLink.getLink(JetspeedLink.DEFAULT, null, null, JetspeedLink.DEFAULT, null, "myTemplate", "myAction", "xml", "es", "FR").toString());
  +        System.out.println("Named action jetspeedLink = " + jetspeedLink.getLink(JetspeedLink.DEFAULT, null, null, JetspeedLink.PORTLET_ID, "myPeid", "myTemplate", "myAction", "xml", "es", "FR").toString());
  +        System.out.println("Named action jetspeedLink = " + jetspeedLink.getLink(JetspeedLink.DEFAULT, null, null, JetspeedLink.PORTLET_ID, "myPeid").toString());
  +        System.out.println("Named action jetspeedLink = " + jetspeedLink.getLink(JetspeedLink.DEFAULT, null, null, JetspeedLink.PORTLET_NAME, "myPortletName").toString());
  +        System.out.println("Named action jetspeedLink = " + jetspeedLink.getLink(JetspeedLink.DEFAULT, null, null, JetspeedLink.PORTLET_ID, "myPeid").toString());
  +        System.out.println("Named action jetspeedLink = " + jetspeedLink.getLink(JetspeedLink.CURRENT, null, null, JetspeedLink.PANE_ID, "myPortletName").toString());
  +        System.out.println("Named action jetspeedLink = " + jetspeedLink.getLink(JetspeedLink.CURRENT, null, null, JetspeedLink.PANE_NAME, "myPortletName").toString());
  +        System.out.println("HomePage action jetspeedLink = " + jetspeedLink.getLink(JetspeedLink.DEFAULT, null, "", JetspeedLink.DEFAULT, null ).toString());
  +*/
  +        JetspeedLinkFactory.putInstance(jsLink);
  +        
  +        // Generatate and output thre page
  +        TurbineTestUtilities.generatePage(rundata);
  +        TurbineTestUtilities.outputPage(rundata);
  +        
  +        // Return the used RunData to the factory for recycling.
  +        RunDataFactory.putRunData(rundata);
  +    }
  +    public void endGetLink(org.apache.cactus.WebResponse theResponse)
       {
           System.out.println("text = " + theResponse.getText().length());
       }
  
  
  
  1.3       +127 -33   jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html/Tool_jslink_examples.vm
  
  Index: Tool_jslink_examples.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html/Tool_jslink_examples.vm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Tool_jslink_examples.vm	22 Apr 2002 02:54:42 -0000	1.2
  +++ Tool_jslink_examples.vm	5 May 2002 03:07:11 -0000	1.3
  @@ -1,5 +1,16 @@
   <div>
  -  <table cellpadding="2" cellspacing="0" border="1" width="50%">
  +<center>
  +  <table cellpadding="2" cellspacing="0" border="1" width="600">
  +    <tr>
  +      <td>
  +        Below are examples of using $jslink with Velocity.  Only the syntax of the URLs is valid, so do
  +        not expect them to return a page.
  +      </td>
  +    </tr>
  +  </table>
  +</center>
  +<br>
  +  <table cellpadding="2" cellspacing="0" border="1" width="100%">
       <tr>
         <th>Variable</th>
         <th>Value</th>
  @@ -23,8 +34,8 @@
         <td>$jslink.Template</td>
       </tr>
       <tr>
  -      <td>jslink.setTemplate("myScreen")</td>
  -      <td>$jslink.setTemplate("myScreen")</td>
  +      <td>jslink.getTemplate("myScreen")</td>
  +      <td>$jslink.getTemplate("myScreen")</td>
       </tr>
       <tr>
         <th colspan="2"><center>Path and Query item on URL</center></th>
  @@ -38,6 +49,10 @@
         <td>$jslink.addQueryData("QueryData","Data_value")</td>
       </tr>
       <tr>
  +      <td>jslink.getAction("myAction").addQueryData("QueryData","Data_value")</td>
  +      <td>$jslink.getAction("myAction").addQueryData("QueryData","Data_value")</td>
  +    </tr>
  +    <tr>
         <th colspan="2"><center>Actions items in the URL</center></th>
       </tr>
       <tr>
  @@ -45,69 +60,70 @@
         <td>$jslink.ActionKey</td>
       </tr>
       <tr>
  -      <td>jslink.setAction("save")</td>
  -      <td>$jslink.setAction("save")</td>
  +      <td>jslink.getAction("save")</td>
  +      <td>$jslink.getAction("save")</td>
       </tr>
       <tr>
  -      <td>jslink.setAction("update","p12345")</td>
  -      <td>$jslink.setAction("update","p12345")</td>
  +      <td>jslink.getAction("update","p12345")</td>
  +      <td>$jslink.getAction("update","p12345")</td>
       </tr>
       <tr>
  -      <td>jslink.setAction("update",\$portlet)</td>
  -      <td>$jslink.setAction("update",$portlet)</td>
  +      <td>jslink.getAction("update",\$portlet)</td>
  +      <td>$jslink.getAction("update",$portlet)</td>
       </tr>
       <tr>
         <th colspan="2"><center>Group/Role/User/Page element on URL</center></th>
       </tr>
  +
       <tr>
  -      <td>jslink.setGroup("Warehouse")</td>
  -      <td>$jslink.setGroup("Warehouse")</td>
  +      <td>jslink.getGroup("Warehouse")</td>
  +      <td>$jslink.getGroup("Warehouse")</td>
       </tr>
       <tr>
  -      <td>jslink.setGroup("lab","LabHome")</td>
  -      <td>$jslink.setGroup("lab","LabHome")</td>
  +      <td>jslink.getGroup("lab","LabHome")</td>
  +      <td>$jslink.getGroup("lab","LabHome")</td>
       </tr>
       <tr>
  -      <td>jslink.setRole("manager")</td>
  -      <td>$jslink.setRole("manager")</td>
  +      <td>jslink.getRole("manager")</td>
  +      <td>$jslink.getRole("manager")</td>
       </tr>
       <tr>
  -      <td>jslink.setRole("clerk","ClerkHome")</td>
  -      <td>$jslink.setRole("clerk","ClerkHome")</td>
  +      <td>jslink.getRole("clerk","ClerkHome")</td>
  +      <td>$jslink.getRole("clerk","ClerkHome")</td>
       </tr>
       <tr>
  -      <td>jslink.setUser("joe")</td>
  -      <td>$jslink.setUser("joe")</td>
  +      <td>jslink.getUser("joe")</td>
  +      <td>$jslink.getUser("joe")</td>
       </tr>
       <tr>
  -      <td>jslink.setUser("sam","sam_home")</td>
  -      <td>$jslink.setUser("sam","sam_home")</td>
  +      <td>jslink.getUser("sam","sam_home")</td>
  +      <td>$jslink.getUser("sam","sam_home")</td>
       </tr>
       <tr>
  -      <td>jslink.setPage("myPage")</td>
  -      <td>$jslink.setPage("myPage")</td>
  +      <td>jslink.getPage("myPage")</td>
  +      <td>$jslink.getPage("myPage")</td>
       </tr>
       <tr>
         <th colspan="2"><center>Pane items in the URL</center></th>
       </tr>
       <tr>
  -      <td>jslink.setPaneById("P_12345")</td>
  -      <td>$jslink.setPaneById("P_12345")</td>
  +      <td>jslink.getPaneById("P_12345")</td>
  +      <td>$jslink.getPaneById("P_12345")</td>
       </tr>
       <tr>
  -      <td>jslink.setPaneByName("pane_1")</td>
  -      <td>$jslink.setPaneByName("pane_1")</td>
  +      <td>jslink.getPaneByName("pane_1")</td>
  +      <td>$jslink.getPaneByName("pane_1")</td>
       </tr>
       <tr>
         <th colspan="2"><center>Portlet items in the URL</center></th>
       </tr>
       <tr>
  -      <td>jslink.setPortletById("P_56789_1234")</td>
  -      <td>$jslink.setPortletById("P_56789_1234")</td>
  +      <td>jslink.getPortletById("P_56789_1234")</td>
  +      <td>$jslink.getPortletById("P_56789_1234")</td>
       </tr>
       <tr>
  -      <td>jslink.setPortletByName("portlet_2")</td>
  -      <td>$jslink.setPortletByName("portlet_2")</td>
  +      <td>jslink.getPortletByName("portlet_2")</td>
  +      <td>$jslink.getPortletByName("portlet_2")</td>
       </tr>
       <tr>
         <th colspan="2"><center>Information about the PSML Document</center></th>
  @@ -129,8 +145,8 @@
         <td>$jslink.UserName</td>
       </tr>
       <tr>
  -      <td>jslink.Page</td>
  -      <td>$jslink.Page</td>
  +      <td>jslink.PageName</td>
  +      <td>$jslink.PageName</td>
       </tr>
       <tr>
         <td>jslink.MediaType</td>
  @@ -145,4 +161,82 @@
         <td>$jslink.Language</td>
       </tr>
     </table>
  +  <br>
  +  <table cellpadding="2" cellspacing="0" border="1" width="100%">
  +    <tr>
  +      <th colspan="2"><center>setLink()</center></th>
  +    </tr>
  +    <tr>
  +      <th colspan="2"align="left">Variable</th>
  +    <tr>
  +    </tr>
  +      <td width="10%">&nbsp;</td>
  +      <th align="left">Value</th>
  +    </tr>
  +
  +    <tr>
  +      <td colspan="2">$jslink.getLink(\$jslink.CURRENT,"abc", \$jslink.PageName, \$jslink.PANE_ID,"123","myAction","myTemplate","html","en","US")</td>
  +    </tr>
  +    <tr>
  +      <td width="10%">&nbsp;</td>
  +      <td>$jslink.getLink($jslink.CURRENT,"abc", $jslink.PageName, $jslink.PANE_ID,"123","myAction","myTemplate","html","en","US")</td>
  +    </tr>
  +
  +    <tr>
  +      <td colspan="2">\$jslink.getLink(\$jslink.CURRENT,"abc","", \$jslink.PANE_ID,"123","myAction","myTemplate","html","en","US")</td>
  +    </tr>
  +    <tr>
  +      <td width="10%">&nbsp;</td>
  +      <td>$jslink.getLink($jslink.CURRENT,"abc","", $jslink.PANE_ID,"123","myAction","myTemplate","html","en","US")</td>
  +    </tr>
  +
  +    <tr>
  +      <td colspan="2">\$jslink.getLink(\$jslink.DEFAULT,"def", \$jslink.DEFAULT_PAGE, \$jslink.PANE_NAME,"456","myAction","myTemplate","html","en","US")</td>
  +    </tr>
  +    <tr>
  +      <td width="10%">&nbsp;</td>
  +      <td>$jslink.getLink($jslink.DEFAULT,"def", $jslink.DEFAULT_PAGE, $jslink.PANE_NAME,"456","myAction","myTemplate","html","en","US")</td>
  +    </tr>
  +
  +    <tr>
  +      <td colspan="2">\$jslink.getLink(\$jslink.GROUP,"apache","news", \$jslink.PORTLET_ID,"789","myAction","myTemplate","html","en","US")</td>
  +    </tr>
  +    <tr>
  +      <td width="10%">&nbsp;</td>
  +      <td>$jslink.getLink($jslink.GROUP,"apache","news", $jslink.PORTLET_ID,"789","myAction","myTemplate","html","en","US")</td>
  +    </tr>
  +
  +    <tr>
  +      <td colspan="2">\$jslink.getLink(\$jslink.ROLE,"manager","status", \$jslink.PORTLET_NAME,"abc","myAction","myTemplate","html","en","US")</td>
  +    </tr>
  +    <tr>
  +      <td width="10%">&nbsp;</td>
  +      <td>$jslink.getLink($jslink.ROLE,"manager","status", $jslink.PORTLET_NAME,"abc","myAction","myTemplate","html","en","US")</td>
  +    </tr>
  +
  +    <tr>
  +      <td colspan="2">\$jslink.getLink(\$jslink.USER,"joe","birthdays",\$jslink.CURRENT,"def","Template","Action","html","en","US")</td>
  +    </tr>
  +    <tr>
  +      <td width="10%">&nbsp;</td>
  +      <td>$jslink.getLink($jslink.USER,"joe","birthdays",$jslink.CURRENT,"def","Template","Action","html","en","US")</td>
  +    </tr>
  +
  +    <tr>
  +      <td colspan="2">\$jslink.getLink(\$jslink.USER,"joe","birthdays",\$jslink.DEFAULT,"ghi","Template","Action","html","en","US")</td>
  +    </tr>
  +    <tr>
  +      <td width="10%">&nbsp;</td>
  +      <td>$jslink.getLink($jslink.USER,"joe","birthdays",$jslink.DEFAULT,"ghi","Template","Action","html","en","US")</td>
  +    </tr>
  +
  +    <tr>
  +      <td colspan="2">\$jslink.getLink(\$jslink.GROUP,"apache","news",301,"1234","Template","Action")</td>
  +    </tr>
  +    <tr>
  +      <td width="5%"></td>
  +      <td>$jslink.getLink($jslink.GROUP,"apache","news",301,"1234","Template","Action")</td>
  +    </tr>
  +  </table>
  +
   </div>
  
  
  

--
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