You need to sign in to do that
Don't have an account?
Receiving URL parameters
Hi,
I am having difficulty immediately storing a parameter passed through a URL.
Here's the VF:
<input type="hidden" name="key" value="{!uniqueID}"/>
Here's the controller:
Public String uniqueID = System.currentPagereference().getParameters().get('q');
Here's the URL:
xxx.visual.force.com/apex/sendfilepage?q=xxx
Here's the error:
Unknown property 'sendFileController.UniqueID
The case is I am sending a file to amazon s3 online storage using a POST request and the URL parameter is the name of the file. This error persists until I write Public String uniqueID {get; set;} at which point I get a visualforce error saying I have two objects with the same name. It compiles when I comment out the original uniqueID. Any idea how to get around this without setting uniqueID within a new method? Or how to run a method immediately upon page loading?
Thanks!
Max
uniqueID needs to be a property in order for a VF page to access it. You could just add an accessor:
All Answers
uniqueID needs to be a property in order for a VF page to access it. You could just add an accessor:
Thanks, that worked perfectly. I was wondering if you could possibly answer another question. I'm trying to pass a parameter through the URL of a page doing a POST request. The parameter is the name of a file I'm uploading to s3. I was hoping this would work <input name="file" type="file" fileName="{!fileName}"/> but the parameter comes up blank on the next page.