Hi
How can we set the value of a bean variable through java script on load?
I have tried doing this by setting the value onLoad but it doesnt reflect untill the page is submitted.
Is there any way out?
By definition, the bean can't be changed until something is submitted. JSF beans are located in the server, not in the client. To cause the server to change any object inside itself, you have to submit a request to the server.
You can submit a "behind the scenes" request, however. That's what AJAX is all about.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
The fastest and most reliable components of any system are those that are not there. Tiny ad: