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
RustyboyRustyboy 

Passing Parameters with Commandbutton WITHOUT Rerender

I have a command button on records within a PageBlockTable and want to pass a parameter to the controller. I am aware of the workaround with the Rerender attribute but I cannot use this because I am using an InputFile within my pageblock.

I have also tried a fix using ApexPages.currentPage().getParameters().get(someName) but that does not work either. Here is my current VF excerpt:
 
<apex:column headerValue="Re-Order">
     <apex:commandButton action="{!agendaSortTop}" value="T" title="Move this agenda item to the top of the list" disabled="{!(ag.Sequence__c == agendaFirstSeq)}" >
          <apex:param name="agendaSortTop" value="{!ag.id}"/>
     </apex:commandButton>
</apex:column>

and here is the controller trying to pick up the named parameter.
 
public pagereference agendaSortTop()
    {

       id agendaId = ApexPages.currentPage().getParameters().get('agendaSortTop');

        ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO, 
            'Agenda item "' + agendaId + '" to Top',''));  

        Return null;
    }
This returns a null value in the field

Any ideas?


PS: I cannot use a CommandLink because I need to be able to disable the button.
ashish sharma 188ashish sharma 188
Hi @RustyBoy. I am facing the same issue as I am trying to pass a value from my VF page to apex using apex:param and not using rerender. But I am getting null value on apex side. have you got solution for this issue? If yes, then please let me know.