Updating property internally, doesn't update UI

First I want to mention is that I didn’t have this problem in Vaadin 7 using the old Form. After I changed the code to work new FieldGroup it stopped working. Also, setting of ReadOnly also stopped working. I have no idea what may cause this. I’d appreciate any input.

FieldGenerator is a class has overloaded methods for certain commonly used settings for fields such as setImmediate, nullSelectionAllowed etc.


    ....
    private final ResultTextField topASMEHeight =
            new ResultTextField("Top ASME Height Test"); //Extends TextField but is set to look like ReadOnly.
    ....

I set up the layout and stuff. Some fields gets added and some are others are added as needed basis.

FieldGroup binder = new FieldGroup(TankData instance)
private void attachAndBindFields()
    {
 
        ...
        binder.bind(topASMEHeight, TankData.TOP_ASME_HEIGHT);
  
        ...
    }
 
            @Override
            public void valueChange(Property.ValueChangeEvent event)
            {
                    topDimensionLayout.removeAllComponents();
                    switch (index)
                    {
                        ....
                        case 3: //ASME
                            topDimensionLayout.addComponent(
                                    binder.getField(TankData.TOP_ASME_HEIGHT));
                            break;
                         ....
                    }
                    markAsDirty();
              }

later …

tankData.getItemProperty(TankData.TOP_ASME_HEIGHT).setValue(50)

Hi,

I can’t see from your example code where the topAsmeHeight component is added to the layout. Could you snip the code sample a bit to remove the clutter and thus raise your chances of getting an answer. From the code you posted I can’t see any problem. If a property is properly bound to a field, the changes should reflect to the field when updating throught item property.

Sorry about that, I edited it to only show relevant information, this code is copied exactly as it is.

TankData extends PropertysetItem