Grails – g:select, remoteFunction and multiple params

Here is an example of using two params in a remoteFunction call or any similar remote call in Grails, which can be extended to use more than two if needed by separating subsequent params with &

            render g.select(from:workCenters, name:”workCenterCode”, value:selectedValue.get(0).toString(), onChange:”${remoteFunction(controller:’processParamOverrides’,action:’mfgAreaList’,update:’mfgAreaLocDiv’,  params:’\’workCenterCode=\’+document.getElementById(\’workCenterCode\’).value+\’&endWcOpSeq=\’+document.getElementById(\’endWcOpSeq\’).value+\’&orderNum=\’+document.getElementById(\’orderNum\’).value’ )};”)

Advertisements

One thought on “Grails – g:select, remoteFunction and multiple params

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s