You need to sign in to do that
Don't have an account?

Can I parameterize page component's "action" attribute?
Hi
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('http://wiki.developerforce.com/events/regular/registration.php');
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="http://wiki.developerforce.com/events/regular/registration.php"/>
</apex:page>
But param doesn't appear to be supported for a page component.
Any ideas how I can solve this?
Thanks,
Jon
<apex:actionFunction>
<apex:actionSupport>
<apex:commandLink>
<apex:outputLink>
<apex:outputText>
<flow:interview>
Check this link : https://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_param.htm
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}" />
</apex:actionFunction>