Skip to Content
avatar image
Former Member

Nullable InputField with Integer Simple Type

Hi all,

I have an InputField with a corresponding integer simple type that is not nullable. The inputfield has state required. The problem is, when the user removes all characters from the the inputfield and presses a button, WebDynpro will automatically set the value to '0'. The values will now be written into the database, even if the user does not wanted to use '0' as value. The "required" state does not work in this case.

is there a way to distinguish between an empty InputField and the value '0' in the field, if the corresponding simple type is an integer?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 05, 2012 at 09:11 AM

    I don't think so - backing type is primitive integer, which have default start value 0 and don't have "null" value.

    Try with to assign type to as a context attribute type.

    or you can use string type and do needed conversion in your logic.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Jacek Wozniczak

      Yes, thats of course a solution. But I searched for a way to use the Web Dynpro validation and addtionally provide the possibility to insert null. But it seems like that doesn't work.

      Anyhow, thanks for your help.