struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Schuster Joel M Contr ESC/NDC <>
Subject Correct Prepopulate Method
Date Fri, 11 Mar 2005 16:18:15 GMT
I've read a number of articles about correct pre-populate forms methods,
including the following:




I have some questions.


The first article does not talk specifics about how Lazy-Loading would be

The second doesn't talk about how the actual pre-population would be
implemented in the action.

And the third does it in a way that's different from how others do it.


Here's what I've gotten so far...


There are two different ways that I see to do it. 

1.	Load the FormBean up in the constructor.

a.	This does not work in Dyna*Forms since there's no actual
b.	This then moves the logic to the actual form bean which is not where
it's supposed to be.

2.	Load the FormBean in a precursor Action

a.	This works well but every example I've seen then does something like

Request.getSession().setAttribute( '"formBean", bean);

This seems like a bad idea since it places the bean into the session scope.
I've tried doing this by putting it directly into request but of course the
jsp then doesn't have access to it because the request on the Action is not
in the same scope as the 'form'.jsp


So I guess I'm at a loss on how best to pre-populate Dyna*Forms. Examples
that have worked from your experience would be appreciated.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message