function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jimc507jimc507 

Using URLFOR with UrlRewriting [rewritten URL not displaying]

Hello,

 

I have written a UrlRewriter class and implemented the generateUrlFor().

The basic URL is :

http://domain.com/Page?param1=param1Val&param2=param2Val&param3=param3Val.

 

The rewriter takes the URL and rewrites it to http://domain.com//param1Val/PageName/param2Val?param3=param3Val

On the page I am using:

<apex:outputLink value="{!URLFOR($Page.CPDownloads, null, ['param1' = param1Val, 'param2' = param2Val, 'param3' = param3Val])}">{!$Label.Home_downloadDocuments}</apex:outputLink>

 

param1Val, param2Val, and param3val are all defined in the controller.

 

My tests run fine. I can see the output in the debug logs displaying the correct URL being sent to the new PageReference(url) and being returned. However, http://domain.com/Page?param1=param1Val&param2=param2Val&param3=param3Val is being displayed as the link on the page. 

 

If I only specify on parameter it works:

<apex:outputLink value="{!URLFOR($Page.CPDownloads, null, ['param1' = param1Val] )}">{!$Label.Home_downloadDocuments}</apex:outputLink>

 

http://domain.com/param1val/PageName

 

Has anyone seen this before or can tell me what I am missing?

 

Thanks in advance,

 

Jim