You need to sign in to do that
Don't have an account?
rickyn
Parm and ActionSupport inside Outputlink not working
Hi,
I have a Param and ActionSupport Tag inside an Outputlink, and the value I assign is not being passed to the controller. Any thoughts? Thanks in advance.
<apex:outputpanel id="CategoryList"> <apex:outputlink id="SCLink">{!SCvalue.Name}
<apex:actionSupport event="onclick" action="{!showSC}" rerender="testtextline"> <apex:param assignTo="{!SelectedCategoryID}" value="{!SCvalue.ID}" name="SelectedCategoryID"/> </apex:actionSupport> </apex:outputlink> </apex:outputpanel> <apex:outputpanel id="testtextline"> <apex:outputtext >Test-{!SelectedCategoryID}</apex:outputtext> <!--Value starts as null and stays null after rerender--> </apex:outputpanel> Controller Snippet Public String SelectedCategoryID {get;set;} public PageReference showSC(){ system.debug('DEBUG: Entered Show SC and SelectedServiceCategoryID = ' + SelectedCategoryID); return null; }
What does SCValue.ID equate to when the page is rendered?
They equate to ID's.
I managed to get it to work within apex:form tags and the param outside the outputlink tag. I would like to avoid using the form tag to minimize view state. Is there any other way?
I think you may need the apex:form side of things to allow the apex:param to work correctly with the assignTo attribute. if you don't want to go that route, it would probably be better to simply construct a full URL as the link, e.g.