Attributes

Description

nullable

Automatic/Required

Set to true or false.

Usage Notes

By default, an empty form field leaves the corresponding property unchanged on form submission. The nullable converter lets you change this behavior and set the property to null. For example:

<dsp:input type="text" bean="Person.address" nullable="true"/>

You can use the nullable converter only with data types that are classes such as Integer; nullable converters cannot be used with primitive data types such as int. If you use the nullable converter with a property whose data type is a Java primitive, and the user leaves the field empty, an exception is thrown.

nullable can also be specified as an attribute of another tag converter such as Date or Number. For example:

<dsp:input bean="NewUser.age" number="#" nullable="true"/>


Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved.

Legal Notices