InputNumber: attribute emptyValue not working as expected

Community Driven Extensions Project
Post Reply
RueKow
Posts: 331
Joined: 21 Jun 2011, 23:34
Location: Germany - Wiesbaden

02 Oct 2012, 12:35

I'm using InputNumer with emptyValue="empty". But empty input fields always display zero.

Code: Select all

<p:outputLabel for="inGewEdit5" value="Bruttolohnsumme" />
<pe:inputNumber value="#{meldungsuebersichtController.selectedMeldung.bruttolohnsumme}"
    decimalSeparator="," decimalPlaces="2" thousandSeparator="." emptyValue="empty"
    id="inGewEdit5" style="width:75px" />
All input fields are part of a dialog which is call from a datatable on selection.
Rüdiger

PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14

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

02 Oct 2012, 12:49

Please read the docu:

Controls empty input display behavior, options are empty, zero, sign (default empty)

"empty" as string is not allowed AFAICS.
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

RueKow
Posts: 331
Joined: 21 Jun 2011, 23:34
Location: Germany - Wiesbaden

02 Oct 2012, 13:36

I read the doku, but I don't understand how to use emptyValue attribute.
I tried with no attribute and with different values.

Code: Select all

<p:outputLabel for="inGewEdit4" value="Beschäftigungstage" />
<pe:inputNumber value="#{meldungsuebersichtController.selectedMeldung.beschaeftigungstage}"
	minValue="0" maxValue="31"
	id="inGewEdit4" style="width:25px" />
<p:outputLabel for="inGewEdit5" value="Bruttolohnsumme" />
<pe:inputNumber value="#{meldungsuebersichtController.selectedMeldung.bruttolohnsumme}"
	decimalSeparator="," decimalPlaces="2" thousandSeparator="." emptyValue=""
	id="inGewEdit5" style="width:75px" />
<p:outputLabel for="inGewEdit6" value="Gewährte Urlaubstage" />
<pe:inputNumber value="#{meldungsuebersichtController.selectedMeldung.urlaubstage}"
	minValue="0" maxValue="31" emptyValue="0"
	id="inGewEdit6" style="width:25px" />
<p:outputLabel for="inGewEdit7" value="Gewährte Urlaubsvergütung" />
<pe:inputNumber value="#{meldungsuebersichtController.selectedMeldung.urlaubsverguetung}"
	decimalSeparator="," decimalPlaces="2" thousandSeparator="." emptyValue="$"
	id="inGewEdit7" style="width:75px" />
And this is the result.
Image
Always zero values. What can I do to get my input fields empty?
Last edited by RueKow on 02 Oct 2012, 13:54, edited 1 time in total.
Rüdiger

PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14

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

02 Oct 2012, 13:51

Don't know if this should work but you could create an feature request.
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

RueKow
Posts: 331
Joined: 21 Jun 2011, 23:34
Location: Germany - Wiesbaden

02 Oct 2012, 14:10

Rüdiger

PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests