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
Jon Mountjoy_Jon Mountjoy_ 

Can I parameterize page component's "action" attribute?



ie. how can I pass a parameter to a "page" component's "action" method? 


I have a simple Visualforce page 


<apex:page controller="JoinController" action="{!go}"/>


 with a simple controller


public class JoinController {

public PageReference go() {
PageReference regPage = new PageReference('');

return regPage;



(It redirects, copying the HTML params)


What I'd prefer to do is parameterize go().   Can you recommend how I do that?  ie. I want to write this



<apex:page controller="JoinController" action="{!go}">
<apex:param assignTo="{!website}" value=""/>


 But param doesn't appear to be supported for a page component.  


Any ideas how I can solve this?









<apex:param> can be child component of following -: 


Check this link :

You can use onloadJS if you want to send some parameter onload of this page like -:

<script type="text/javascript"> window.onload = setupPage(test); </script>
<apex:actionFunction  name="setupPage" >
<apex:param assignTo="{!testvar}" value="{!testvar}" />