Setting value to a property doesn't refresh field

Hi all,

I’ve been working with Vaadin for a couple of months and it’s the first time I get this problem.

I have my own class that extends ObjectProperty and then I create PropertysetItem’s to show in Form’s. Something like this:


class MyProperty<T> extends ObjectProperty<T>
{
  ...
}

class MyFormFieldFactory extends DefaultFieldFactory
{
    public Field createField(Item item, Object propertyId, Component uiContext)
    {
       if (String.class.isAsignableFrom(item.getItemProperty(propertyId).getType()))
         return new TextField("caption", item.getItemProperty(propertyId));
     }
}

MyProperty<String> prop = new MyProperty<String>("value", String.class);

PropertySetItem item = new PropertySetItem();
item.addItemProperty(id, prop);

Form form = new Form();
form.setItemDataSource(item);

The problem is when I set another value to the property, this way:


prop.setValue("newValue");

The field doesn’t refresh unless I manually refresh the browser (F5).

The curious thing is that I’ve started getting this problem since I moved to Vaadin 6.7.0 and if I use 6.6.2 the problem disappears.
Another curious thing, it works fine with CheckBox fields but not for TextField’s.

Any idea?

Sorry about my english, and the code sintax may be wrong because I’m developing using Scala.

Thanks!

That’s a regression bug in Vaadin 6.7.0. Try to use a nightly build of Vaadin 6.7.

Indeed, it is a regression due to invalid fix to this issue:
http://dev.vaadin.com/ticket/6588

Use nightly and be happy :slight_smile:

cheers,
matti

Thanks :slight_smile: