PopulateBean with NULL

Hi folks,

I have a scenario where I have two telephone number fields in a database (mobile_telphone and home_telephone) which are numeric data types.

Initially we only have the users mobile_telephone populated and the user is invited to update their contact details whereby that can choose whether the phone number we have is actually mobile or home.

If it's home I want to NULL the mobile_telephone field in the DB and insert into home_telephone. Vice versa if it's mobile.

Is it possible to force a field to NULL when using BeanFactory.PopulateBean()? If so, how is this achieved.

Thanks all.

Nolan

There is not that I know of, so I have set it manually if it doesn't
have a length and removed it from the rc, so it doesn't try to populate
it.

if (not isDefined("rc.somevalue") or not len(trim(rc. somevalue))) {
  event.removeValue("somevalue ");
  rc.someComponent.setSomevalue (javaCast("null",0));
}

Something like that. And then used the PopulateBean to handle the rest.

Curt