You need to sign in to do that
Don't have an account?
Andries.Neyens
outputlink and Salesforce1
Seems that the outputlink has a strange behavior in Salesforce1,
given the following scenario:
<apex:page controller="Salesforce1Bug" showChat="false" applyHtmlTag="false" applyBodyTag="false" sidebar="false" showHeader="false" title="Is this by design?" docType="html-5.0" standardStylesheets="false" >
<html>
<head>
<title>Is this by design?</title>
</head>
<body>
Parameter: <apex:outputtext value="{!Param}"/>
<br/>
<apex:outputLink value="/apex/Salesforce1Bug?parameter=something%20something">This is a working link
</apex:outputLink>
<br/>
<apex:outputLink value="/apex/Salesforce1Bug">This is not a working link
<apex:param name="parameter" value="the dark side" />
</apex:outputLink>
<br/>
</body>
</html>
</apex:page>
and
public with sharing class Salesforce1Bug {
public String getParam()
{
return ApexPages.currentPage().getParameters().get('parameter');
}
}
This works perfectly in the browser, but if you access this page in Salesforce1 you will see that the second link will not work and the encoding is a bit dodgy?
Anyone an idea what the difference is?
given the following scenario:
<apex:page controller="Salesforce1Bug" showChat="false" applyHtmlTag="false" applyBodyTag="false" sidebar="false" showHeader="false" title="Is this by design?" docType="html-5.0" standardStylesheets="false" >
<html>
<head>
<title>Is this by design?</title>
</head>
<body>
Parameter: <apex:outputtext value="{!Param}"/>
<br/>
<apex:outputLink value="/apex/Salesforce1Bug?parameter=something%20something">This is a working link
</apex:outputLink>
<br/>
<apex:outputLink value="/apex/Salesforce1Bug">This is not a working link
<apex:param name="parameter" value="the dark side" />
</apex:outputLink>
<br/>
</body>
</html>
</apex:page>
and
public with sharing class Salesforce1Bug {
public String getParam()
{
return ApexPages.currentPage().getParameters().get('parameter');
}
}
This works perfectly in the browser, but if you access this page in Salesforce1 you will see that the second link will not work and the encoding is a bit dodgy?
Anyone an idea what the difference is?
<script type="text/javascript">
function sForce1Navigate(url) {
if( (typeof sforce != 'undefined') && (sforce != null) ) {
sforce.one.navigateToURL(url);
}
return false;
}
</script>
<apex:outputLink onclick="sForce1Navigate('/apex/Salesforce1Bug?parameter=something%20something');" value="/apex/Salesforce1Bug?parameter=something%20something">This is a working link now</apex:outputLink>
this link will work in the browser and in Salesforce1,
Only thing remaining is the space that is converted to a +-sign