I need to pass the Id value to my controller to execute the action. Currently this is what I have in my controller.
def StartServer() {
amazonWebService.ec2.startInstances(new StartInstancesRequest([InstanceToStart]))
redirect action: index()
}
The InstanceToStart
value will come from the view. In my view I have a table with the following columns, Id and button:
i-333dced <Button>
i-dhdhdhd <Button>
i-er32ws <Button>
When I press the button I want the Id to pass and then execute my action. My button code is as follows:
<g:link action="StartServer">
<input type="button" value="Start Server" class="stopimg" id="startServer"/>
</g:link>