• Monika Kiran
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Not a great way to start off a Monday morning. I have a very simple piece of code that should pass a param to the page controller but it is not working at all. I have tried using assignTo as well as ApexPages.currentPage().getParameters() but neither approach has worked. Below is a simple page and controller to reproduce.

Page:
<apex:page controller="param" >
<apex:form>
<apex:commandButton value="Proceed to Upload" action="{!proceedToUpload}" id="uploadButton">
<apex:param name="uploadType" assignTo="{!uploadType}" value="org" id="param"/>
</apex:commandButton>
</apex:form>
</apex:page>


Controller:
public class param {

public String uploadType {get; set;}

public pageReference proceedToUpload(){
system.debug(uploadType);
system.debug(ApexPages.currentPage().getParameters().get('uploadType'));
system.debug(ApexPages.currentPage().getParameters());
return null;
}
}

 

Please tell me I am blind and this is a simple typo I have overlooked. If you don't mind could you try to reproduce this in your org.

Thanks,
Jason

Message Edited by TehNrd on 11-16-2009 11:43 AM
  • November 16, 2009
  • Like
  • 0