+ Start a Discussion
nimdharnimdhar 

assignTo working with commandlink but not with commandButton

Hi,
<apex:commandLink  value="attach" action="{!attach}">
 <apex :param assignto="{!test}" value="{!location.id}"/>
</apex:commandLink>

And I have getter and setter methods in my controller. This works fine. But when I replace it with commandButton it is not working.

Thanks,
Nimdhar
Steve ChadbournSteve Chadbourn
I spent days on this and never managed to get assignto working with commandbutton. I assume this is a bug in visualforce. I ended up having to use param to pass the value (as in my reply to your other post).
dchasmandchasman
This is a known issue that has been fixed in Summer '08 (I posted about this a while back)
nimdharnimdhar
Hi Steve,

I don't understand even with this commandLink it passes Id sometimes  and sometimes I am getting null. I am not able to figure out what the problem is?

Thanks,
Nimdhar
MigMig
Hi,

Sorry to upload the thread. But still not working with commandButtons  !! :(