0

I have this pageBlockTable and I'm trying to pass the parameter in the command button to my extension.

<apex:pageBlockTable value="{!outstandingCTs}" var="task" id="taskTable" rowClasses="odd,even" styleClass="tableClass">    
    <apex:commandButton value="remove" action="{!deleteActionItem}">
        <apex:param name="taskIdparam"  value="{!task.Id}" assignTo="{!taskIdChosen}"/>
    </apex:commandButton>

Here is a some extension code (the standardController is a custom object):

    public String taskIdChosen {get; set;}

    public PageReference deleteActionItem (){
        System.debug('taskIdChosen: '+taskIdChosen);
        return null;
    }

What can I be missing? I've seen this as a solution many places but I cannot get it to work. taskIdChosen always is null.

This VF page is embedded on the page layout of the custom object. Not sure if that matters.

3

1 Answer 1

0

Yep it's a known bug. Use commandLink instead of commandButton. Thanks Rao!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .