• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Form Selfsubmit in JSF

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Is there a way to submit a form by it self in jsf aftre certain time?
The form has to invoke a backing bean method or needs to redirect the url to another url by it self.

I am trying to logout the application using an intermedaite page.intermediate page basically forwards the request to another url and if the user clicks the backbutton the javascript function aleays forwards the page using history.forward.

Can any body help in resolving this issue?

Thanks
Ven
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use a timer in a javascript to click a hidden submit button after 2 seconds:

setTimeout('submitJob();', 2000)

function submitJob() {
document.getElementById('backgroundJobForm:btnHideSubmit').click();
}

The btnHideSubmit button can invoke a backing bean action in the usual manner:

action="#{backgroundJobBean.onSubmitButtonPress}"




Bob
[ January 11, 2008: Message edited by: Bob Good ]
 
Venkata
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Bob.

I tried this option.Here is my scenarion.

I am trying to logging out the user from webseal session from a link the application.If i directly use response.redirect and the url/pkmslogout it does the task. But if the user clicks back button they can see all the data which they browsed through. I don't want this functionality when theylogged out but ineed this when they are in the application.That iswhay i can not use cache expiry techniques in jspspage. I wanted to first send the intermediate page when they click the signout and the this page auto submits after few milliseconds and the action method will be called by java script function and the action does the rest of the thing to logout. But even though my action is executed my intermedaite page is not registered in the history so that when the user clicks the backbutton it directly goes to the previous page not the intermediate page.If the application goes there i can forse the browser to go forward.

Hope i explained enough to under stand my issue. If this is not clear pls le me know.

Thanks
Ven
 
reply
    Bookmark Topic Watch Topic
  • New Topic