Match values instance name - component name [message #144314] |
Wed, 02 April 2008 09:22  |
Eclipse User |
|
|
|
Hi again¡
Users of VE in an zero-code application, drop custom components from the
palette to design windows which extends from JPanel. The current problem
they have is described below:
After adding the components to a Panel, they want to rename the beans by
clicking in "Rename Field" on the pop-up menu. Due to application
architecture, the name of the component must match with the property
"field name" and I have no idea how to develop it. I assume that i should
extends VE functionality... or maybe changing BeanInfo's class is enough???
Every time they change field name property, the name has to change as
well. Since field name is not a bean info property, i ask for help what's
the better way to solve it.
Thanks in advance.
Regards
|
|
|
Re: Match values instance name - component name [message #144370 is a reply to message #144314] |
Thu, 03 April 2008 05:33  |
Eclipse User |
|
|
|
After reading several white papers and as far as i know, there is no way
to change property beans directly from extending code of ve. It should be
changed in the bean info property.
Up to know, i override the method contributeToDropRequest to generate a
setName directly in the java source when a component is dropped to the
container. Now, i'n thinking about two options:
- modify the java source: Taking advantage of the round trip between model
and java source i could delete the setName method that I've generated and
then create again a new one with the name of the rename bean. (How i get
the action of rename a bean?)
-modify bean info: Adding the property name to the PropertyDescriptor and
set the name property as the bean name. (how i get the bean name from a
beanInfo??)
As you can see I have some doubts in both options.
I would appreciate any help...
|
|
|
Re: Match values instance name - component name [message #617027 is a reply to message #144314] |
Thu, 03 April 2008 05:33  |
Eclipse User |
|
|
|
After reading several white papers and as far as i know, there is no way
to change property beans directly from extending code of ve. It should be
changed in the bean info property.
Up to know, i override the method contributeToDropRequest to generate a
setName directly in the java source when a component is dropped to the
container. Now, i'n thinking about two options:
- modify the java source: Taking advantage of the round trip between model
and java source i could delete the setName method that I've generated and
then create again a new one with the name of the rename bean. (How i get
the action of rename a bean?)
-modify bean info: Adding the property name to the PropertyDescriptor and
set the name property as the bean name. (how i get the bean name from a
beanInfo??)
As you can see I have some doubts in both options.
I would appreciate any help...
|
|
|
Powered by
FUDForum. Page generated in 0.06466 seconds