Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ve-dev] Preventing setting of bean property on target VM

Hi,

Is there a way to prevent a property from being set on a bean in the target
VM?

Example:

In ULC, we have textfield. Now if a datatype is set with setDataType() on
textfield, then, by design, set/getText() throw UnsupportedMethod exception.

dataType is not a design time property as it does not affect layout.

I can think of two ways to prevent setDataType from being executed on the
bean in target VM

1. In VE, in the proxy - ULCTextFieldProxyAdapter - intercept the property
in the applied() method and do nothing.

Or

2. In generated code for ULCTextFiled  manually insert a conditional:

	if (!Beans.isDesignTime()) {
		ulcTextField.setDataType(...);
	}

Is there another or better way?

Thanks and regards,

Janak



Back to the top