Everyone, I created a Model that holds a Map of name/value pairs. The idea was that this class would be a model for all controls on one of my forms; much like CompoundPropertyModel. The idea was to set it as the model of the form and not have to set a model for child controls (As one would do with CompoundPropertyModel). However, I found that it did not work becuase in Component's code, line 1587, the parents of a component is searched for an instance of CompoundPropertyModel!
I did not want to subclass CompoundPropertyModel because my model did not work like CompoundPropertyModel and it would have been a waste of CompoundPropertyModel's code and it would have gotten in the way of what I was doing. My only other option was to pass an instance of my special model to each control. Could an interface be created? Maybe ICompoundPropertyModel? Then CompoundPropertyModel and any other multi-control models could implement the interface. At that point, the code in Component could search for isntances of ICompoundPropertyModel rather than a concrete instance of CompoundPropertyModel. Thanks, -- Philip A. Chapman Application Development: Java, Visual Basic (MCP), PostgreSQL, MySQL, MSSQL Linux, Windows 9x, Windows NT, Windows 2000, Windows XP
signature.asc
Description: OpenPGP digital signature
