had torrents with a button that has an action. I have a few bits that I want to learn about its parameter. The Grails manual says it should be like this:
<g:actionSubmit action="action" value="${message(code: 'default.button.edit.label', default: 'Edit')}" params="['actionTaken':editPhone]"/>
I tried to use remotelink, submitButton, submitToRemote, but no one works. I always get null when I try to parse it in the controller:
def action= { def actionTaken = params.actionTaken def employeeId= params.employeeId MySession session = MySession.getMySession(request, params.employeeId) profileInstance = session.profileInstance switch(actionTaken) { case "editPhone" : isEditPhone=true break case "editEmail" : isEditEmail=true break } render(view:"profile", model:[profileInstance:session.profileInstance, isEditPhone:isEditPhone, isEditEmail:isEditEmail]) }
What am I missing? is my params code wrong? Is my parsing params code wrong? it just leads me into circles without progress. Help. thanks.
source share