On Tue, 27 May 2003 11:00:42 -0400, Vic Cekvenich wrote:

> Read my other post on search. (The first one... excuse my ADD).
> 
> Please let me understand why you think it wiered.
> Search has bean, action, form.
> You submit search to the action, with search bean populated. (not much 
> use for a basebean code here, I think you are saying)
> 
> ListEmployees has a page, action, bean.
> It needs to receive in (session?) scope (or url properites) the search 
> arguments in the action only.
> based on it, it populates the bean and page displays it.

Well weird probably isn't the word:) At some point I have to pass the
parameters to IBatis based on these parameters bundled in an Object. So
what is first happening is my SearchFormBean gets populated but then I'm
stripping the properties out in the Display action...

ProjectSearchBean searchBean =
(ProjectSearchBean)ae.getSessionBean("projectSearchBean");

ArrayList projectIds = projectSearchBean.getProjectIds();
String someOtherVar = projectSearchBean.getSomeOtherVar();

//now populate based on search params above
projectFormBean.populate( projectIds, someOtherVar );

So what I didn't like was that now projectFormBean.populate( ArrayList
projectIds, String someOtherVar ) ends up calling the DAO doRetrieve( ArrayList
projectIds, String someOtherVar ) which ends up having to put the
variables back into some Object again so that it can be passed to IBatis.
The reason I found this weird (annoying would be a better word) is that
intially everything already is in an Object (ProjectSearchBean) - it seems
so much easier to just call

projectFormBean.populate( projectSearchBean.getMap() )

vs having to pull out all the variables from projectSearchBean in the
Display action, only to
put them all back into an object later in the DAO. 

-- 
Rick

_______________________________________________
MVC-Programmers mailing list
[EMAIL PROTECTED]
http://www.basebeans.net:8080/mailman/listinfo/mvc-programmers

Reply via email to