Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8819419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:21:13+00:00 2026-06-14T05:21:13+00:00

Its normal when i use a DoubleBox in a Editor to edit a double

  • 0

Its normal when i use a DoubleBox in a Editor to edit a double property (RequestFactoryEditorDriver)
if i clear the value of the box i get a null pointer exception?

If so how can i validate a DoubleBox with the JSR 303 Validation?

My code looks something like this:

 @DecimalMin(value="0.0", message="decimalMin:0.0", groups = {ImpuestoGroup.class,    ImpuestoIepsGroup.class})
  public double getTasaImpuesto();

 <g:DoubleBox ui:field="tasaImpuesto"></g:DoubleBox>
 @UiField DoubleBox tasaImpuesto;

When i call the driver.flush() need to check the constraints i have this results:

if i put a value diferent than number i get the on the List the bad value
if i put a lower than 0.0 value i can set the constraints to the EditorDriver with driver.setConstraintViolations(constraints);

When i leave blank the field i expect a List with a bad value or the constraint but not a null pointer exception.

The line i get my atention is this one:

 Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'value_0' of null
at Unknown.$doubleValue(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@21:38447)

Seems that DoubleBox cannot handle the null value.

Please help me. Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:21:15+00:00Added an answer on June 14, 2026 at 5:21 am

    Answered on Google Groups, copied here for convenience:

    DoubleBox uses DoubleParser. DoubleParser returns null if the value is the empty string, and otherwise uses a NumberFormat, and throws a ParserException if it cannot parse. Your edited object’s property is of type double, not java.lang.Double, so when the field is empty, getValue() returns null, and the Editor framework tries to unbox the null to put it into your double property, hence the NullPointerException. With any illegal value, DoubleParser throws; in that case, the ValueBoxEditor returns the last known value, which explains why it doesn’t throw in that case.

    Request for enhancement: http://code.google.com/p/google-web-toolkit/issues/detail?id=7783

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use this jQuery code to set the mouse pointer to its busy state
I was just wondering if its normal for an app to a have one
How does upshot.js handles DateTime objects? As it seems its just creating normal strings
I'm searching for a button control that will AutoSize its image. Normal button controls
Here a lot of people are confused, Normal class stores its data in the
can i use jquery date picker with usercontrol of ASP.Net..?/ i tried but its
I wonder if its normal practice to write such kind of code in wpf
So, I realize this is out of the normal use case of Hibernate, but...
I use the following to scale a view to 3x its original size: [pageShadowView
Apparently, you cannot use the normal + operator to append strings in jsp...at least

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.