gsp - Grails: Carry forward params on g:actionSubmit is clicked -


how carry forward parameters when g:actionsubmit button clicked?

here gsp code:

<g:checkbox name="msgcheck" checked="" value="${userinstance.emailid}"></g:checkbox> ... <g:actionsubmit class="update" action="delete" value="delete" params="${params}"></g:actionsubmit> 

here controller code:

def delete() {     try {         def user_list = params.msgcheck          //deleting user         //successful.          redirect(action: "list", params: params)     } catch (exception e) {         log.error("deleted exception---->>" + e.getmessage())     } } 

redirect missing params. wanted carry forward params on redirect.

the url before clicked on 'delete' g:actionsubmit button looks like:

http://localhost:8080/message/list?offset=10&max=100 

after 'delete' g:actionsubmit button clicked, url looks (and has parameters:

 http://localhost:8080/message/list?msgcheck=ga12%40user.com&msgcheck=&_action_domaindelete=delete&_msgcheck=&_msgcheck=&_msgcheck=&_msgcheck=&_msgcheck=&_msgcheck=&_msgcheck=&_msgcheck=&_msgcheck=&_msgcheck=&_msgcheck=&domainid=1&noofrows=100 

how carry forward parameter when g:actionsubmit button clicked?

i don't think can pass params actionsubmit in way. can use params attribute of g:form tag, like

<g:form params="${params}">     ... </g:form> 

or

<g:form params="[offset: params.offset, max: params.max]">     ... </g:form> 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -