BeanNode & BeanInfo: Automatic Loading of All Poperties of a Certain Object

Hi everybody,

I'm working on a netbeans module and i need to use a property window as apart of it...long story short, i was wondering if there a way to load all the properties of a certain class automatically...without listing the properties in the BeanInfo PropertyDescriptor[] getPropertyDescriptors() and MethodDescriptor[] getMethodDescriptors() and of course without using PropertySupport.Reflection

ur help will be greatly appreciated...

thank u in advance...

[491 byte] By [MK.Noura] at [2007-10-3 8:19:14]
# 1
Why you don't want to iterate through property descriptors?
UncleSAMa at 2007-7-15 3:24:43 > top of Java-index,Desktop,Developing for the Desktop...
# 2

hi ppl,

thanks UncleSam for replying...

thing is i want to use the BeanInfo and BeanNode to be able to have the properties of a class loaded automatically without implementing the BeanInfo's method...

Achieving this would mean that i don't have to write a BeanInfo class for every single object i have that i want its properties to be loaded...one class with a generic way of loading the properties will do...

i have recently learned that there's probably a way to do it if i turn my classes into JavaBeans but i'm still not sure...

anyways, ur contributions are still very much appreciated...

MK.Noura at 2007-7-15 3:24:43 > top of Java-index,Desktop,Developing for the Desktop...
# 3
The BeanInfo class for certain JavaBean is created automatically when it is not implemented.The property name is generated from method name:getName() -> nameSee section 7.1 or 8.3 of JavaBeans specification.
UncleSAMa at 2007-7-15 3:24:43 > top of Java-index,Desktop,Developing for the Desktop...
# 4

Thank u for ur help UncleSam

Unfortunately i didn't get what u mean by JavaBeans specifications...i tried looking at the documentation and the technical articles but i guess u weren't referring to either.

it'd be very helpful if u can point me to the URL of the document u meant...

thank u in advance..

MK.Noura at 2007-7-15 3:24:43 > top of Java-index,Desktop,Developing for the Desktop...
# 5
You can download it here: http://java.sun.com/products/javabeans/docs/spec.html
UncleSAMa at 2007-7-15 3:24:43 > top of Java-index,Desktop,Developing for the Desktop...
# 6
You should create BeanInfo classes only for specific cases.It is not necessary to create them for each bean.
UncleSAMa at 2007-7-15 3:24:43 > top of Java-index,Desktop,Developing for the Desktop...
# 7
Thanks UncleSami'll check it out ASAP
MK.Noura at 2007-7-15 3:24:43 > top of Java-index,Desktop,Developing for the Desktop...