Hi there,
Im designing a few new beans for an application some of which are based on combo boxes. I've just
started using beans and even though I know how they work im not sure about the design
idea's/patterns to employ. Several of the beans basically start with an empty box but when the user
types and presses return they access the database for the required data and fill the combo with any
matches, the closest first. The gui aspects of the beans are almost the same its only the db aspects
that are different it makes me wonder if the beans should be chained (have acessor beans for the
data??). Basically im totally unsure what the right approach is for beans like this. Any idea's,
sites to looks at ?
Thanks in advance
Steve

Signature
Please remove 'y' from return address to reply (Anti Spam !!)
Steve Webb - 04 Mar 2004 14:16 GMT
I've had a bit more of a think about this and decided to explain it
slightly differently !
Right I have several potential JComboBoxes that need to be used in
several places on several different windows. These list such things as
item codes, client codes, order ids .........
Each JComboBox obviously needs to access the backend database (using
Corba!) to get a list of match data to show. Each access will be
specific to the data being accessed.
At the moment we have 3 beans already done. Basically the last 2 are
copies of the 1st with tweaks for different DB access for the relevant
data.
All the Combo's allow a maximum number of matches to be displayed,
allow the user to enter a part vale and will then fetch and display
matches.
Now it strikes me that the gui/control aspects of the combo's are the
same but the DB access (model??) is different. So really we should be
using a bean to provide the gui/control and this should be standard
and possibly another bean to provide the data(model/db access??).
However Im not sure about any of this and frankly can't find any good
guidence on any sites or in books as they seem more concerned with the
mechanisms of how beans are contructed.
Any help on this would be most appreciated.
PS: Im dislextasticalistic so excuse the spelling :)
Steve