|
From: Gamal <gam...@ag...> - 2004-08-05 20:29:48
|
Hello,
In the country example you have the following:
public ModelAndView handleMain(HttpServletRequest request, =
HttpServletResponse response) throws ServletException {
RefreshablePagedListHolder listHolder =3D =
(RefreshablePagedListHolder) request.getSession(true).getAttribute =
(COUNTRIES_ATTR);
if (null =3D=3D listHolder) {
listHolder =3D new RefreshablePagedListHolder();
listHolder.setSourceProvider(new CountriesProvider());
listHolder.setFilter(new CountriesFilter());
request.getSession(true).setAttribute(COUNTRIES_ATTR, listHolder);
}
BindException ex =3D BindUtils.bind(request, listHolder, "countries");
listHolder.setLocale(RequestContextUtils.getLocale(request));
boolean forceRefresh =3D request.getParameter("forceRefresh") !=3D =
null;
listHolder.refresh(forceRefresh);
return new ModelAndView(mainView, ex.getModel());
}
From this code, I have the following comment and question:
=20
You are setting the CountriesProvider as sourceProvider, but this class =
is a CountriesController Nested class so you are putting in the session =
indirectly all the controller with the dao and other fields of this =
controller. I think that this is not so good therefore I want to ask to =
you if you have other options to do this.
Thanks in advance
Gamal
|