You need to sign in to do that
Don't have an account?
AUCTUS Administrator
Problem while encoding string to url standards for URL Hack
Hi eversyone,
short description of what I am aiming to achieve:
I have a Flow which has a variable (or more if I get it to work). This flow is rendered in a Visualforce Page controlled by a controller I wrote.
I want the Users to run the Flow over a Link, select multiple multipicklist values and then to click on finish. Then they should be redirected to a report with an URL Hack. The Variable of the Flow whould then be one of the criterias of the report filter.
If they select: BnB Manager and Specialist
The output of the field looks like: BnB Manager, Specialist
In the Controller I want to get: BnB%20Manager%2C%20Specialist.
This is the VFP:
Whenever I use the strTemp = strTemp.replaceAll('\\s+', '%20');
I can safe the controller, but I get this error while running the VFP:
Attempt to de-reference a null object
Ein unerwarteter Fehler ist aufgetreten. Ihre Entwicklungsorganisation wurde benachrichtigt.
Many thanks in advance :) and wishing you all a merry christmas time.
Best
Sam
short description of what I am aiming to achieve:
I have a Flow which has a variable (or more if I get it to work). This flow is rendered in a Visualforce Page controlled by a controller I wrote.
I want the Users to run the Flow over a Link, select multiple multipicklist values and then to click on finish. Then they should be redirected to a report with an URL Hack. The Variable of the Flow whould then be one of the criterias of the report filter.
If they select: BnB Manager and Specialist
The output of the field looks like: BnB Manager, Specialist
In the Controller I want to get: BnB%20Manager%2C%20Specialist.
This is the VFP:
<apex:page controller="ExpertflowController" showHeader="true" standardStylesheets="true" language="de"> <flow:interview name="ExpertQueue" interview="{!ExpertInterview}" finishLocation="{!prFinishLocation}" /> </apex:page>And the controller:
public class ExpertflowController{ public Flow.Interview.ExpertQueue ExpertInterview {get;set;} public PageReference prFinishLocation { get { PageReference prRef = new PageReference('/00O240000048JoX?pv0=' + strOutputVariable); prRef.setRedirect(true); return prRef; } set { prFinishLocation = value; } } public String strOutputVariable { get { String strTemp = ''; if(ExpertInterview != null) { strTemp = string.valueOf(ExpertInterview.Input); } return strTemp; } set { strOutputVariable = value; } } }
Whenever I use the strTemp = strTemp.replaceAll('\\s+', '%20');
I can safe the controller, but I get this error while running the VFP:
Attempt to de-reference a null object
Ein unerwarteter Fehler ist aufgetreten. Ihre Entwicklungsorganisation wurde benachrichtigt.
Many thanks in advance :) and wishing you all a merry christmas time.
Best
Sam
All Answers
Thanks for help.
I still have hope, someone can tell me why its not working :(
At least I don't get any error message any more, but it does still not replace the blank spaces with "%20".