File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes How to stop page refresh when hit enter button from rich:inputNumberSpinner field? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to stop page refresh when hit enter button from rich:inputNumberSpinner field?" Watch "How to stop page refresh when hit enter button from rich:inputNumberSpinner field?" New topic
Author

How to stop page refresh when hit enter button from rich:inputNumberSpinner field?

Eswar Nec
Ranch Hand

Joined: May 02, 2010
Posts: 105
I use rich:inputNumberSpinner tag.

The problem is :

I set cursor focus(position) to inside of rich:inputNumberSpinner field, then i hit the enter button from my keyboard, that time page will be automatically refresh.

But i don't need page refresh when i hit the enter button from my keyboard. (Cursor Focus rich:inputNumberSoinner)

The code :

spinnerTagTest.jsp



I also use rich:hotKey for that inputNumberSpinner field. But Page refreshed.



And i check anotherway using javasccript, but page refreshed.

The specific tag and javascript is :



Here i use one alert message inside of stopPageRefresh().
But i hit enter button, first page refreshing and then alert message displayed.

Help me about this.

Thanks in advance.


Wake up! Don't let your smile be snatched away by anybody!
Regards, Eswar
 
Consider Paul's rocket mass heater.
 
subject: How to stop page refresh when hit enter button from rich:inputNumberSpinner field?