Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
  • salvin francis
  • Frits Walraven
  • Piet Souris

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

Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 :


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.
Do you want ants? Because that's how you get ants. And a tiny ads:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic