[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [ve-dev] Preventing setting of bean property on target VM
|
Hi
Rich,
Thanks.
By
removing the property you mean hiding it in the BeanInfo? Will hiding it
help?
Actually I tried both:
1. hiding "dataType" property in BeanInfo and
2.
Using the !Beans.isDesignTime() conditional.
It
seems that in VE 1.1 the call setDataType is still slipping through. Cleaning
the cache (by clean build and open/close project) did not help (or may be
it did not happen properly).
Moreover, in earlier VE versions with IvjBeanInfo there were methods to
suppress parent's properties. How does one do it now?
Thanks
and regards,
Janak
Hi,
(2) is the best because there is no way
to prevent a method from being executed in all cases. Something could slip
through.
The only way is to not
have data type be a property. Remove it from the BeanInfo and it won't be a
settable property and it won't see it as a property when parsing the
code.
Rich
"Janak Mulani"
<janak.mulani@xxxxxxxxx> Sent by: ve-dev-bounces@xxxxxxxxxxx
06/06/2006 06:50 PM
Please respond
to Discussions people developing code for the Visual Editor
project
<ve-dev@xxxxxxxxxxx> |
|
To
| "ve-Dev@Eclipse. Org"
<ve-dev@xxxxxxxxxxx>
|
cc
|
|
Subject
| [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
_______________________________________________
ve-dev
mailing
list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev