wood burning stoves 2.0*
The moose likes JSF and the fly likes Problem in invoking the action method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem in invoking the action method" Watch "Problem in invoking the action method" New topic

Problem in invoking the action method

Ranch Hand

Joined: Sep 07, 2007
Posts: 37
Hi All,

I have 10 jsf pages in my application and the managed beans for them are some in session scope and some in request scope.All pages are functioning fine except the the first page which is in session scope.after key in the input if i hit enter key it is not invoking the backing bean's action method. But it is working fine for other pages even though they are in session scope. If at all by pressing tab and focus on the submit button and hit enter or just mouse click on submit button is working fine . Why is this failing only when hit enter this case? Am i missing any thing?
Any help is greatly appriciated.

David Karr

Joined: Jan 06, 2008
Posts: 12
I would suggest two things:

While developing an app, always implement a debugging LifeCycleListener that just prints out each phase. If you see it go directly from the validation phase to the response phase, then you know it failed validation somewhere. You should also have a "messages" element on your page, and probably on all of your fields, so you can see if something failed validation.
Ranch Hand

Joined: Sep 07, 2007
Posts: 37
Hi David,

Thanks for the reply. I haave a phase listerner to watch the life cycle of JSF and also i am doing someother stuff in this. I ran the program in debug mode too.If hit enter it directly going to phase listener than action method. But in other pages it is working fine.Any ideas?

Bob Good
Ranch Hand

Joined: Jan 09, 2008
Posts: 86
Try listening and catching the enter key as shown here:


Then click on the button that invokes the backing bean method:

I agree. Here's the link: http://aspose.com/file-tools
subject: Problem in invoking the action method
Similar Threads
Default Enter key and submit BUTTON
Browser Back button | Struts bridge
Losing data from submit using the enter key
Passing parameter between pages and populating page with values.
invoke js method