Comments below ... On Fri, 28 Mar 2003 15:12:36 -0500 Vic Cekvenich <[EMAIL PROTECTED]> wrote: > > Rick Reumann wrote: > > This in turn will eventually try to find this field in the _current > > HashMap, but initially unless set up elsewhere this map will always > > be null since nothing is done to initialize it first. >
<vic reply:> > The local bean holds a list of maps. The get value gets it from the > map! Right. > So if you did it that way, it would be null. > But if you did: > bean.populate(), this would populate via DAO a list of maps. > (note that dao could be anything that retruns collecion or can be made > into a collection.) > > So if the bean is just new(), it's null. > But if you do bean.populate(), it has data. > > <rick> > > (A typical ActionForm doesn't have this problem since it's just > > calling getFirstName() and returning the default value of > > "firstName" from the form). <vic reply:> > It's the same thing. If you just do new formBean, and not > formbean.populate() (or find, or retrieve) it's null. RICK: hmmmm, this hasn't been my experience using ActionForms. I've never had to populate an ActionForm to use it on a standard JSP page. It will simply use the default values of the ActionForm properties that you have for your ActionForm fields (if you don't declare any). (Strings are null, etc). With your procedure you are forced to call a populate method in oder to set up at least one HashMap with all the default values. -- Rick Reumann _______________________________________________ MVC-Programmers mailing list [EMAIL PROTECTED] http://www.basebeans.net:8080/mailman/listinfo/mvc-programmers