@ James
Yes, we can use scriptlets or el expressions to retrieve values from a model.
Ok assume that, in your example, we are getting the string "whatever" from a java service after we submit the form.
I then have to pass this string "whatever" to a js function.
Assume myFunction1() is js function called after onchange event of a drop down.
Eg:
function myFunction1(){
this.formName.submit() // this will submit the form, a service gets called, service puts the string "whatever" into a model, and then we use EL to retrieve it eg: var result=${model.returnValue}
var result=${model.returnValue}
loadFile(result) //loadFile is another js function, ie. predefined in the api and its argument is the latest string retrieved from the service. Now the problem is after saying this.formName.submit(), the control never returns to the myFunction1()
}
Hope I have made the problem clear. I know we could do this using AJAX but we do not want to use AJAX.
Please let me know if you think there is another way of solving this problem.
Thanks for taking the effort to solve it.
Any suggestions are welcome.
Thanks