| Author |
automatic form submission
|
Mike Halford
Ranch Hand
Joined: Jul 13, 2005
Posts: 31
|
|
can a form have a backing bean action method as an action, eg So that I can submit the form automatically.. eg or how else do I submit a form without user intervention?
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
No. The form tag will ultimately get translated into an HTTP POST request routed to the JSF dispatcher servlet. And, of course, when you do HTTP POST, the entire form's data gets sent, not just a single item. However check the JSF button tag docs. I'm pretty certain that I have done forms with multiple buttons where I did actions based on which button was clicked.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Mike Halford
Ranch Hand
Joined: Jul 13, 2005
Posts: 31
|
|
|
Thanks. I don't want a button though. I want to submit the form automatically.
|
 |
Rajeev Ravindran
Ranch Hand
Joined: Aug 27, 2002
Posts: 455
|
|
Are you against creating a button or you dont want to show the button on the page ? if case 2, create a button and make it invisible and use javascript to invoke button click action. hope it helps ! Thanks,
|
 |
Mike Halford
Ranch Hand
Joined: Jul 13, 2005
Posts: 31
|
|
Hi, I was going to go for the 'invisible button' option. The page with the form on is only transitory, the user only sees the page fleetingly unless the network is on a go slow. It just says 'Loading...' and then posts the request on automatically. I want it to be transparent, the user shouldn't have to do anything. The page is only there really because I can't get the initial POST request to populate a managed-bean with session scope, see my other question near by . So, as a workaround I'm putting the data into a request-scoped bean first and then copying that data into the session-scope
|
 |
 |
|
|
subject: automatic form submission
|
|
|