-
1. Re: Post Datatable data
rabelenda Jan 30, 2009 8:18 AM (in response to rabelenda)Is there any way to add a java script code to the page from the backing bean?
-
2. Re: Post Datatable data
nbelaevski Jan 30, 2009 12:57 PM (in response to rabelenda)Hi,
Sure, use this:<script type="text/javascript">#{bean.javascriptCode}</script>
-
3. Re: Post Datatable data
rabelenda Jan 30, 2009 2:06 PM (in response to rabelenda)thanks I solved the problem, in some way. I created an outputText with escape="false", value="#{bean.myscript}" and rendered=#{bean.myscript!=null}". The script is auto generated when I click on the submit button of the form and using all the data of the datatable. The script creates a new form with method="post" and action="external Url" that does the post in a new window. I had to put the invocation of the script function in the onload method of the body of the html. The problem that I'm facing now is that I have a tree control with dynamic data load in it, after clicking the button (that invocates the actionListener) the tree control resets partially, it resets the values dinamically loaded but the structure (nodes) and some static text are kept, any ideas of what is happening? The backing bean isn't reseting the treeNode used as value of the tree control.