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

Why actionSupport can't send parameter?
Home page:
Controller:
Log:
Why actionSupport can't send parameter?
<apex:image styleClass="img" value="{!URLFOR($Resource.MainImage, 'MainImage/womansun.jpg' )}"> <apex:actionSupport event="onclick" action="{!goShopping}" > <apex:param assignTo="{!glasstype}" value="SUN" name="gtype" /> <apex:param assignTo="{!sex}" value="Woman" name="gsex" /> </apex:actionSupport> </apex:image>
Controller:
public PageReference goShopping() { System.debug(glasstype + sex); PageReference p=new PageReference('/apex/shopping'); return p; }
Log:
03:59:29.0 (12865001)|USER_DEBUG|[18]|DEBUG|nullnull
Why actionSupport can't send parameter?
Try for this code.
If you found this answer helpful then please mark it as best answer so it can help others.
Thanks
Akshay
https://developer.salesforce.com/forums/?id=906F000000094uSIAQ
Please try the below code. Hope this helps you.
<apex:commandLink action="{!goShopping}">
<apex:image styleClass="img" value="{!URLFOR($Resource.MainImage, 'MainImage/womansun.jpg' )}">
<apex:param assignTo="{!glasstype}" value="SUN" name="gtype" />
<apex:param assignTo="{!sex}" value="Woman" name="gsex" />
</apex:image>
</apex:commandLink>
public PageReference goShopping()
{
System.debug(glasstype + sex);
PageReference p=new PageReference('/apex/shopping');
return p;
}
Please select as best answer if it helps you.
Thank You,
Ajay Dubedi