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
vanessa veronvanessa veron 

How I Set URL Parameter into Visualforce Page?

I have the URL:

URL= https://c.eu0.visual.force.com/apex/BBBBPg?mailPG2=popopopopop&minutePG2=00&nomJobPG2=MARIEEE&requetePG2=po

I would like to display the parameter nomJobPG2 into my inputText....
Is it possible???

OUTPUT TEXT --> IT WORK
<apex:outputText value="{!$CurrentPage.parameters.nomJobPG2}" id="nomJobOP" /><br />
    
    INPUT TEXT --> IT NOT WORK
Job Name.:&nbsp;<apex:inputText id="nomJobIP" value="{!nomJob}" /><br /><br />

* nomJob: variable into Apex class
global String nomJob{get;set;}

Thank you
Best Answer chosen by vanessa veron
Vamsi KrishnaVamsi Krishna
Hi,

you should initialise the variable nomJob to the url parameter value in your apex controller constructor
nomJob = ApexPages.currentPage().getParameters().get('nomJobPG2');
then it will showup in your visualforce page inputText section.

All Answers

Vamsi KrishnaVamsi Krishna
Hi,

you should initialise the variable nomJob to the url parameter value in your apex controller constructor
nomJob = ApexPages.currentPage().getParameters().get('nomJobPG2');
then it will showup in your visualforce page inputText section.
This was selected as the best answer
vanessa veronvanessa veron
THANK YOU VERY MUCH...

It work now!!!!

Thank you, thank you, thank you!!!!!!!!!