how to bind date property to popupdatefield?

or any other datefield for that matter?

I have a POJO class with this property amongst others:

@Column(name = "DOC_DATE")
    private Date docDate;

and i would like to bind that property to popupdatefield:

myBeanItem =  new BeanItem(myPojoClass);


What happens? nothing. myBeanItem.getItemProperty(“docDate”) returns null, as if this property with such name doesnt exist or something. i just triplechecked spelling and i’m positive that property names are ok. any other non-date property works just fine.

what am i missing here?

my bad…seems that even triplechecking hadn’t done the trick.

although the property name was docDate, when i accessed myBeanItem.getitempropertyIds(), i realized it was actually DocDate. why is that, i cant really tell. perhaps it has something to do with getDocDate(){ return docDate;} mismatch or something.

so in case your getitemproperty returns null even though you are sure about its name and spelling, you should check properties of beanitem using getitempropertyids.

hope it helps