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 submit only with inputText and without valueChangeListener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "submit only with inputText and without valueChangeListener" Watch "submit only with inputText and without valueChangeListener" New topic
Author

submit only with inputText and without valueChangeListener

Jana Wetzel
Greenhorn

Joined: Mar 09, 2009
Posts: 4
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
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
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

Joined: Mar 09, 2009
Posts: 4
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

Joined: Oct 08, 2006
Posts: 2458
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

Joined: Mar 09, 2009
Posts: 4
Hello Bauke,

i misused the commandButton now



Now the inputText do what I want.

Thanks for your help.

Bye Jana
 
Don't get me started about those stupid light bulbs.
 
subject: submit only with inputText and without valueChangeListener