button - How to pass values from view to controller in grails -


i need pass id value controller execute action. have in controller.

    def startserver() {     amazonwebservice.ec2.startinstances(new startinstancesrequest([instancetostart]))     redirect action: index()     } 

the instancetostart value come view. in view have table following columns, id , button:

i-333dced <button> i-dhdhdhd <button> i-er32ws  <button> 

when press button want id pass , execute action. button code follows:

  <g:link action="startserver">   <input type="button" value="start server" class="stopimg" id="startserver"/>   </g:link> 

use above according need. bet samples/questions/answers here in related same requirement if search.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -