|
From: Ken K. <kk...@kk...> - 2003-07-31 02:50:38
|
Alef Arendsen (JTeam) wrote: >Juergen, Rod (and mayb other people), > >While JavaDoc'ing parts of the mvc package (I've extensive documented about 5 or 6 of the controllers now), I came across three things in the AbstractFormController that sounded a little bit weird: > >I can't find the place where the command object is bound in the session in case sessionForm is set to true. I've seen this work with the SimpleFormController, but never used the AbstractFormController and since the whole RequestDataBinder stuff is kind of new to me, you might wanna have a look (line 266 or something) > The command object is bound in the session in AbstractFormController in the showForm method. >Also, it seems like the ServletRequestDataBinder gets created, even if bindOnNewForm is false (but that's probably got to do with the previous remark) (line 272) > > A ServletRequestDataBinder (actually a DataBinder) is still needed even if bindOnNewForm is false. It is used to register property editors and and hold validation error information. If bindOnNewForm is true, request params will be bound to the target by a call to ServletRequestDataBinder's bind method. See Petclinic's edit forms for bindOnNewForm == true use cases. >Then - something slightly different - it seems like referenceData method does not get called on showing a new form, but only for the showForm()-methods that show a incorrectl validated command object (also in the same method I would have expected) > > In AbstractFormController, referenceData gets called in showForm(). showNewForm calls showForm. >Maybe you can also have a look at the JavaDoc of Controller, AbstractController and for instance BaseCommandController and see if it's useful at all (otherwise of course I won't spend any time on it)... > > Haven't had a chance yet, but I'll take a look and get back to you. >Cheers, > >Alef Arendsen > > > Regards, Ken |