JavaBeans: How to use an array as a Bound Property between a source javabean and a listening javabean?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Adam_Formicka
Posted On:   Wednesday, September 11, 2002 11:01 AM

I'm in need of some desperate help about JavaBeans and PropertyChangeEvents. Basically I have a bean that listens for 4 objects to change and then fire an event to all listeners. I wish to put the 4 objects into an array and then use that array as a bound property so that the listenening bean will gain access to the four objects all at once. Is this even possible, or am I totally on the wrong track? Here is how i've been trying to implement it so far: In the source bean: private PropertyChangeSupport change; ... //I create 4 objects and then store them in an //array called group ...    More>>

I'm in need of some desperate help about JavaBeans and PropertyChangeEvents.


Basically I have a bean that listens for 4 objects to change and then fire an event to all listeners.


I wish to put the 4 objects into an array and then use that array as a bound property so that the listenening bean will gain access to the four objects all at once. Is this even possible, or am I totally on the wrong track?


Here is how i've been trying to implement it so far:


In the source bean:



private PropertyChangeSupport change;

...

//I create 4 objects and then store them in an
//array called group

...


//group is an array of Objects before being changed
//and newGroup is an array of the objects after being //changed

change.firePropertyChange("groupCheck", group, newGroup);




in the listening bean:



public class TestStockBroker implements PropertyChangeListener
{


public void propertyChange(PropertyChangeEvent event){
setaNewValue(event.getNewValue()); //do something
}


....


}//end of class



How do I pass the array of Objects from one bean to the other as a bound property?.. im clueless on this?

Thanks!

   <<Less
About | Sitemap | Contact