struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mech" <>
Subject RE: [Newbie] ActionForm prepopulation
Date Thu, 30 Jan 2003 00:09:23 GMT
I also often call a .do first and don't feel anything bad about it.

How else could you prepopulate a form bean to be used by a view? By
putting the database access for view creation into jsp? Most ugly.

I have quite a lot of calls to ".do?id=123" On these id's I query my
database mostly receive a collection (narrowed resultset via where
id=123). After that I populate my formbean with that collection and call
a view and <logic:iterate> over this collection.

I don't know if that's good style, but I don't see a much different way
that could be better.

> -----Original Message-----
> From: Jarnot Voytek Contr AU HQ/SC 
> [mailto:Voytek.Jarnot@MAXWELL.AF.MIL] 
> Sent: Mittwoch, 29. Januar 2003 21:54
> To: 'Struts Users Mailing List'
> Subject: RE: [Newbie] ActionForm prepopulation
> Why is JSP -> .do -> .do -> JSP bad?  
> I don't think you could make a case for doing population in 
> the form bean constructor - too much logic.  Besides, it 
> wouldn't work, as that same constructor would be called when 
> the user submitted the form - you wouldn't want to redo the 
> database calls then, right?  We don't do action -> action 
> very often (don't need to), but when needed it works fine.
> --

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message