InputNumber Bug

Community Driven Extensions Project
Post Reply
maxtorzito
Posts: 96
Joined: 19 Jan 2011, 17:00

30 Jan 2013, 22:25

When i use an InputNumber inside of a table like this:

Code: Select all

<h:form>
<p:dataTable....
   <p:column...>
        <pe:inputNumber value=#{bean.value}/>
   </p:column>
</p:dataTable>
</h:form>
If you set any number let say number 5, then if you press enter inside of the inputnumber component your value (5) is lost and the default value (0) of the int is put it inside of the input.

What im doing wrong??
Last edited by maxtorzito on 31 Jan 2013, 19:46, edited 1 time in total.

Primefaces 5.0
Primefaces Extensions 1.2.1
Omnifaces 1.8.1
JDK 1.7.0_25
MyFaces 2.1.15
Ubuntu
Apache TomEE 1.7.0 JAX-RS

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

31 Jan 2013, 00:31

are you using p:defaultCommand (or 'pe' equivalent) on the same page?
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

maxtorzito
Posts: 96
Joined: 19 Jan 2011, 17:00

31 Jan 2013, 02:50

No i dont. If i change the inputnumber to p:inputtext this works.

Primefaces 5.0
Primefaces Extensions 1.2.1
Omnifaces 1.8.1
JDK 1.7.0_25
MyFaces 2.1.15
Ubuntu
Apache TomEE 1.7.0 JAX-RS

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

31 Jan 2013, 03:09

what version of primefaces extensions are you using?
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

maxtorzito
Posts: 96
Joined: 19 Jan 2011, 17:00

31 Jan 2013, 18:54

Definitely this is a bug, im doing extensive tests with this component and i can see when the error is happend, the problem is not because is in the datatable, the problem is that if you press enter inside of the inputnumber and if you have a button (without default commanbutton, but of course your button has the type of submit by default) and press the Intro Key, the listener of the button is processed as a normal behavior but the value is never processed (even do if i use process, partial submit etc...). But if you lost the focus before press intro key (in any other component (like an input) and then press the same button or just press the intro key inside of the other input the value IS submitted, i guess because they do some logic only after the component losts its foucs, but in my case that inputnumber is the last input and there the user usually press the intro key here.

I use Primefaces 3.5.RC1 and PF. Extensions 0.6.2

Primefaces 5.0
Primefaces Extensions 1.2.1
Omnifaces 1.8.1
JDK 1.7.0_25
MyFaces 2.1.15
Ubuntu
Apache TomEE 1.7.0 JAX-RS

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

31 Jan 2013, 19:41

if there is not an issue for this on primefaces extension github, you may want to create the issue there. you can still search the old issue tracker for primefaces extension, and provide a reference to the old issue in the new issue tracker.

i don't use inputnumber. I remember when it was first requested and discussed in primefaces core forum. i rather use p:inputtext and validate via bean validation and/or write code to validate value. all that works as designed for me, and endusers already know what type of data to insert in the inputtext.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

fenoloco
Posts: 53
Joined: 23 Aug 2011, 23:25
Location: Uruguay
Contact:

05 Feb 2013, 00:56

Did you create a ticket about this problem?

The link https://github.com/primefaces-extension ... com/issues

Cheears

maxtorzito
Posts: 96
Joined: 19 Jan 2011, 17:00

05 Feb 2013, 16:59

fenoloco wrote:Did you create a ticket about this problem?

The link https://github.com/primefaces-extension ... com/issues

Cheears
Done


https://github.com/primefaces-extension ... /issues/59

Thanks for the URL.

Primefaces 5.0
Primefaces Extensions 1.2.1
Omnifaces 1.8.1
JDK 1.7.0_25
MyFaces 2.1.15
Ubuntu
Apache TomEE 1.7.0 JAX-RS

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests