Can we format the value of 'Nested container property' ?

Hi,
Is it possible to format the nested properties value in the container…
If so please suggest.


myContainer.addNestedContainerProperty( "mass.date" );

//Need to format the date at container level since am using form binder

Thank You.

Hi,

It is possible but I wouldn’t do that unless you have custom tailored container anyway. Instead you should use PropertyFormatter or the PropertyTranslator add-on (if you have something else than textfield). With latest Vaadin versions Form is intelligent enough to put the property into the wrapper property so all formatting done by the wrapper is showed at the UI level.

cheers,
matti

Thank You for ur valuable suggestion…
Can you get some example of implementing property translator/formatter in for binder.

Hi,

Sorry, I currently have no time to help you with basic java coding. You should just implement a suitable formatter and set it as datasource for the field. If you need quick hands on help with from our experts, please turn to our
Pro Account service
.

cheers,
matti