> Does Struts provide a method where I provide it the name of the bean > defined > in the struts-config.xml and it return me an instance of the appropriate > class, with all the dyna properties set up?
At 3:19 PM -0800 3/25/04, Hubert Rabago wrote:
It does for the nightly build and Struts 1.2.0, though I can't recall the name of the method. For pre-1.2, you'll need to write code to do that. There was a thread that discussed this, with the last few messages (of that thread) still coming in today. Just look for that. Richard Yee pasted code there on how to instantiate a Dyna Bean. I also pointed to an archive where I pasted the code I use in my apps to instantiate a Dyna Bean.
Right now, you can look up a FormBeanConfig object from a ModuleConfig, and then you can use the FormBeanConfig and the ActionServlet to get a new ActionForm instance from RequestUtils. This does not go through the request/session scope searching that Struts uses when it processes the request parameters into a populated ActionForm.
Given the fact that this has come up three or four times in the last week, it seems clear that it's time to expose a simple method that takes a form bean name and a scope and either finds or creates that form bean. I'm just waiting for a few things to settle down -- there's going to be a Struts 1.2.1 release pretty soon now, and we have to move the CVS repository to a new location as part of Struts becoming a top-level Apache project... but that stuff should get straightened out in the next week or two.
Joe
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining."
-- Jef Raskin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]