Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Match values instance name - component name
Match values instance name - component name [message #144314] Wed, 02 April 2008 13:22 Go to next message
Alberto  is currently offline Alberto
Messages: 18
Registered: July 2009
Junior Member
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 09:33 Go to previous message
Alberto  is currently offline Alberto
Messages: 18
Registered: July 2009
Junior Member
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 09:33 Go to previous message
Alberto  is currently offline Alberto
Messages: 18
Registered: July 2009
Junior Member
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...
Previous Topic:How do I make a read-only property?
Next Topic:Strings in PropertyEditorSupport
Goto Forum:
  


Current Time: Sun Sep 21 02:21:19 GMT 2014

Powered by FUDForum. Page generated in 0.07153 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software