You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by robotdan <dj...@gmail.com> on 2011/04/15 18:51:03 UTC

href on previousButton on Portlet Selector portlet doesn't handle spaces consistently

I've observed a problem when creating a custom page with spaces in the name.

Steps to recreate what I'm seeing.

Using Jetspeed 2.2.0.

1) Create a custom page called "My Test"
2) Edit that page and click Add Portlet
3) While on the Portlet Selector page, hover over the previous button (green
arrow) and note the URL
       - "http://localhost:8080/jetspeed/portal/My+Test.psml"
       - This is the correct URL for this page
4) Click on a category filter, such as Tools, or Technology, or perform a
search, anything that causes the page to reload
5) Now, note the URL again by hovering over the previous button.
       - "http://roch-degroffd:8080/jetspeed/portal/My 20Test.psml"
6) Click the green arrow to return to your custom page, and you will return
to the 'Welcome to Jetspeed 2' page because the URL is invalid.

Assuming this is a bug.

The javascript in category-portlet-selector.vm attempts to set this URL
value when the page is reloaded, but it will just pick up the value from
'jsPagePath' which now has the incorrect value.

function getReturnPagePath()
{
   var jsPagePath = jetspeed.url.getQueryParameter(
document.location.href, "jspage" );
   if ( jsPagePath == null )
		jsPagePath = "$jspage";
   return jsPagePath;
}


Since it is correct the first time the page renders, perhaps the controller
is not handling the string correctly?

    org.apache.jetspeed.portlets.selector.CategoryPortletSelector


Any thoughts?  I recreated this in the stock Jetspeed 2.2.0 install.

Re: href on previousButton on Portlet Selector portlet doesn't handle spaces consistently

Posted by robotdan <dj...@gmail.com>.
Looks like my second URL didn't get copied correctly into the email.

For clarification.

Initial good URL:   http://localhost:8080/jetspeed/portal/My+Test.psml
After reload URL:  http://localhost:8080/jetspeed/portal/My Test.psml



On Fri, Apr 15, 2011 at 11:51 AM, robotdan <dj...@gmail.com> wrote:
>
> I've observed a problem when creating a custom page with spaces in the name.
>
> Steps to recreate what I'm seeing.
>
> Using Jetspeed 2.2.0.
>
> 1) Create a custom page called "My Test"
> 2) Edit that page and click Add Portlet
> 3) While on the Portlet Selector page, hover over the previous button (green arrow) and note the URL
>        - "http://localhost:8080/jetspeed/portal/My+Test.psml"
>        - This is the correct URL for this page
> 4) Click on a category filter, such as Tools, or Technology, or perform a search, anything that causes the page to reload
> 5) Now, note the URL again by hovering over the previous button.
>        - "http://roch-degroffd:8080/jetspeed/portal/My 20Test.psml"
> 6) Click the green arrow to return to your custom page, and you will return to the 'Welcome to Jetspeed 2' page because the URL is invalid.
>
> Assuming this is a bug.
>
> The javascript in category-portlet-selector.vm attempts to set this URL value when the page is reloaded, but it will just pick up the value from 'jsPagePath' which now has the incorrect value.
>
> function getReturnPagePath()
> {
>    var jsPagePath = jetspeed.url.getQueryParameter( document.location.href, "jspage" );
>    if ( jsPagePath == null )
> 		jsPagePath = "$jspage";
>    return jsPagePath;
> }
>
> Since it is correct the first time the page renders, perhaps the controller is not handling the string correctly?
>
>     org.apache.jetspeed.portlets.selector.CategoryPortletSelector
>
>
> Any thoughts?  I recreated this in the stock Jetspeed 2.2.0 install.
>
>

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