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
uxtx_timuxtx_tim 

accessing $CurrentPage parameters

I'm going through the Visualforce Developer's guide and trying to get my head around how to begin our app.  Right now im looking at $CurrentPage and what all can be done with that.  This is from the documentation:

 

"Using $CurrentPage you can access the query string parameters for the page by specifying the parameters attribute, after which you can access each individual parameter"

 

The example references id and cid.  What are the other parameters?  Is there a piece of documentation with a list of all the individual parameters for $CurrentPage?

 

aballardaballard

It's accessing the url parameters.  So what is there is up to you.   

 

A parameter named id is used by the standard controller to specifiy the record to use.   Standard pages uses a variety of (mostly undocumented)  query parameters, which might be useful if you are writing an override for a standard page. 

 

For your own pages you can define and use whatever query parameters you want.  

Pradeep_NavatarPradeep_Navatar

{!$CurrentPage.parameters.actUrl} in this syntax actUrl behaves as a query string parameter just like id

 

for example http://my-developer-edition.ap1.force.com/currentpage?actUrl=id

 

{!$CurrentPage.URL} gives the whole URL.                                             

uxtx_timuxtx_tim

ok - so can I set the whole url e.g. {!$CurrentPage.URL} = www.google.com  ?

 

what I'm trying to do is use an <apex:include component to include a page with a google visualization chart on it.  The chart looks at the url for it's chart values e.g.  

 

 

 salesforce instance + "/apex/GoogleTimeChart?signal=00000484&start=2011-1-28%200:0:0&end=2011-1-28%2023:59:59";  

 

 

im setting the parameters dynamically and that is working - but when I assign this value to an <apex:param it give me an error saying that the page ... can only contain alphanumeric characters, must begin with a letter, and must be unique. 

 

In other words, I can't pass the full string as a url.  

How do I get around this?

TLFTLF

I agree with you uxtx_tim.The documentation regarding the fields available via these Visualforce globals is lacking. What about cookies and headers? Are these accessible via $CurrentPage global variable? I've tried using {!$CurrentPage.headers.referer} to get the referer, but it won't compile. You can do this via the ApexPages.currentPage().getHeaders().get('referer'), so I thought it would be available in Visualforce. 

OyeCodeOyeCode
Just do this

selectedTab="{!$CurrentPage.parameters.tab}"

instead of

value="{!$CurrentPage.parameters.tab}"
Thanks,
OyeCode(Visit for More - http://www.OyeCode.com)