You need to sign in to do that
Don't have an account?
Piran
Using apex:outputLink when value already has a param, additional param not added correctly
We're calling apex:outputLink from within a component, passing in our Site's current URL (which already contains a parameter). The VF code looks like this:
<p>{!$CurrentPage.URL}</p>
<apex:outputLink value="{!$CurrentPage.URL}" styleClass="entryLink">
<apex:param name="id" value="{!entryId}" />
<apex:outputText value="{!entryTitle}" styleClass="entryTitle" />
</apex:outputLink>
The generated HTML source code looks like this:
<p>http://our-developer-edition.na6.force.com:80/apex/MySite__WebPage?page=Loop</p>
<a href="http://our-developer-edition.na6.force.com:80/apex/MySite__WebPage?page=Loop%3Fid=a0880000005PiWOAA0" class="entryLink"><span class="entryTitle">A Third Entry</span></a>
Surely that's the wrong escaping that's happened inside the href tag of the "&". Shouldn't the output look like this: (I've used bold to show the difference)
<p>http://our-developer-edition.na6.force.com:80/apex/MySite__WebPage?page=Loop</p>
<a href="http://our-developer-edition.na6.force.com:80/apex/MySite__WebPage?page=Loop&id=a0880000005PiWOAA0" class="entryLink"><span class="entryTitle">A Third Entry</span></a>
Is there a quick/safe way round this problem when you don't know if your outputLink's value contains parameters or not?
I have posted a similar question at SFSE: http://salesforce.stackexchange.com/q/14885/80