Posting to a Fragment Controller

Platform Version: 1.11.2 OpenMRS Version: 2.2

While developing a custom fragment I am stuck on one thing.

How can I post data to the fragment controller? I tried using the following code in my .gsp fragment.

onclick="location.href='${ui.fragmentActionLink("myModule","fragmentname" ,"methodname", [patientId:] )}' 

This doesn’t work, its complaining that there is no method which mathches the signature as above.

Can you please help me to solve the error?

You don’t want to browse to the fragment action link (by doing location.href =), rather you want to use jQuery or similar like $.post(...).

That said, if you are getting an error about method signature, you want to make sure that the are no typos (including incorrect capitalization) in the module, fragment, and method names.