please help me to pass form bean values to the script function
suresh sai
Ranch Hand
Joined: Jul 16, 2007
Posts: 62
posted
0
Hi All.,
I need to pass the form bean (struts) String array values to the script function.I have tried all the ways which I know.But I didnt get the solution.Here I am showing the scenario in short.
MyForm.java -------------
private String records[]; and their getters and setters.
MyJsp.jsp ------------ <script> function toDoList(records) { .......... return true; } </script> <body onloadfunction="return toDoList(records)"> <html:form> <html:hidden property="records"> </html:form> </body> for this one I am getting java script error---- records undefined. and also <body onloadfunction="return toDoList(<%= session.getAttirbute("records")%> "> for this one I am getting java script error---- ] expected at <body> but the values are setting in to the bean in both ways and in another one I am getting null like that. Please help me to solve the problem. Thanks in advance.