ReadOnlyException when setValue on a customField


I am stucked wtih a problem for 2 days. I have a custom component which extends CustomField class. this component opens a modal panel to select a value, then i call component’s setValue to store selection. Here i get the exception below:

Caused by:$ReadOnlyException: null
        at ~[vaadin-6.7.3.jar:6.7.3]

        at company.project.ui.Chooser$1.valueBind( ~[Chooser$1.class:na]

        at sun.reflect.GeneratedMethodAccessor305.invoke(Unknown Source) ~[na:na]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke( ~[na:1.6.0_21]

        at java.lang.reflect.Method.invoke( ~[na:1.6.0_21]

        at com.vaadin.event.ListenerMethod.receiveEvent( ~[vaadin-6.7.3.jar:6.7.3]

        ... 70 common frames omitted

i tried to manually setReadOnly to false, but not helped.

Any advice?

	public void setValue(Object newValue) throws ReadOnlyException, ConversionException {
	private void avoidReadOnlyException() {
		Property propertyDataSource = getPropertyDataSource();

The MethodProperty indicates that you have probably bound the component to a BeanItem or something like that. The typical case for this error is that you are missing a setter from the bean, so the MethodProperty wrapper can’t write values to it.