Primefaces 6.0RC2 inputNumber minValue

UI Components for JSF
Post Reply
ulkgun
Posts: 7
Joined: 30 Mar 2015, 23:12

29 Apr 2016, 23:11

Hi,

When a minValue specified for inputNumber, it becomes the initial value.

Example:

Code: Select all

<p:inputNumber value="" minValue="0" emptyValue="empty"/>
It renders a initial zero value. It should render empty value.

It was not the case for extensions:

Code: Select all

<pe:inputNumber value="" minValue="0" emptyValue="empty"/>
Thank you

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

29 Apr 2016, 23:50

it was a fix for another weird issue. my suggestion is to not use minValue as it doesn't work as expected for all cases.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

ulkgun
Posts: 7
Joined: 30 Mar 2015, 23:12

05 May 2016, 01:18

Hi,

Thanks for the response. I took the way of writing a custom validator.

But it is very confusing and impractical to show a default value of -99 on a non required field to the user.

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

05 May 2016, 10:42

should work for the upcoming version, i removed the old hack.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

ulkgun
Posts: 7
Joined: 30 Mar 2015, 23:12

06 May 2016, 13:20

Thank you very much! :D

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Majestic-12 [Bot] and 66 guests