I am having issues using remote function updating a second g:select that is based off the selection of the first. I have tried multiple ways and would be willing to change my style to however can get this accomplished.
Following is parts of my attempt
GSP:
<div class="baitSelectionFields">
<div class ="manufactureSelect">
<g:select name="manuList" from="${manufactures}" optionValue="name"
onclick="${remoteFunction(action: 'loadStyles', update: 'styleSelection')}"/>
</div>
<div class="styleSelection" id="styleSelection">
</div>
</div>
Controller:
styles = Style.findAll()
for(int i = 0; i<styles.size(); i++){
println("Worked")
if(styles.get(i).getActive()==false){
styles.remove(i)
i--
}
}
String send = ("<g:select name=\"styleList\" from=\"${styles}\" optionValue=\"name\"/>")
redner send
Any advice or a point in a helpful direction would be awesome. I have been going through grails doc and it really doesnt seem to be helping.
Also here is my error messge
No signature of method: com.manifest.baitCreation.TypeController.redner()
The
<g:select />tag gets rendered server side. You can’t send it down as a string. What you may be able to do isrender g.select(name: "styleList", from: styles, optionValue: "name")