• 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

submit only with inputText and without valueChangeListener

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody,

i need some help for a problem I can't solved.

To submit a formular I can only used an inputText because of a barcode scanner. I start with the following code



This code is working but I don't need a valueChangeListener. An ActionListener would be better, because I need every input also twice the same.

The element inputText don't offer an actionListener, so what can I do?

Can someone help me, please?

Bye Jana
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Because it is just an input element, not some action element.
Add a h:commandButton to the form and specify the actionListener in there.
 
Jana Wetzel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Bauke,

That's the problem. I can't use a button because I have only a barcode scanner as input. No mouse, no keyboard.

Does a solution exist without button or commandLink?

Thanks for your help.

Bye Jana
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, continue misusing the valueChangeEvent then. That's the easiest way.
If you want the event to happen during the invoke application phase, so that it would behave like during actionListener, then you need to queue the event.

Something like
 
Jana Wetzel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Bauke,

i misused the commandButton now



Now the inputText do what I want.

Thanks for your help.

Bye Jana
 
When I was younger I felt like a man trapped inside a woman’s body. Then I was born. My twin is a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic