Steve et al, Thanks. After sending this email yesterday I had started looking at ProcessAction and came across the same things that you mentioned. I actually changed the code a bit more dramatically than you. I revised executeLogic so that it looked for the USER_KEY and just added it to the parameters Map. So, it just adds an Object. it doesn't have to be a baseform or anything. It just adds the Object.
Now.. My next problem.. Getting data into the bean.. Not user session data.. data from forms.. Artimus seems to take the approach of inheriting everything from a 'Bean' that has all of the form members defined. I'm more interested in using the DynaForm Beans, though, so that I won't necessarily have to create a Bean java file for all of these. Before, these came into the Action as an ActionForm, and they could be accessed by just saying something like: PropertyUtils.getSimpleProperty(form, "name"); but, of course, the ActionForm isn't exposed to the ProcessBean, at least as far as I can tell (which makes sense from a standpoint of seperating out the business from the controller.... Right now, I'm considering dropping this complete bean approach and going back to something that is closer to just using BaseAction and making Action classes that hang off of that.. (discussed around section 8.3.2 of Struts in Action) I'd be happy to be convinced otherwise, though. Kirby On Wed, Mar 26, 2003 at 10:03:45AM +1100, [EMAIL PROTECTED] wrote: > > If you set up a userProfile form object in your struts config and store > your user info in it, Scaffold will merge information coming from the > request form and the userProfile form and pass them to the execute method. > > If you want to see how it works, have a look at the source for > ProcessAction in the executeLogic method. In particular the following > code: SNIP > > I'm using this for a few projects here but there is one restriction. The > merge method expects all the properties of the userProfile form to be > Strings so you can't have nested objects. I've overcome this by altering > the code so that it treats the properties in the userProfile as Objects and > not Strings. This seems to be working fine. See the code below from the > merge method: > SNIP >> Original Message: > > I'm trying to write a webapp using scaffold, where I set my action to point > to: > type="org.apache.struts.scaffold.ProcessAction" > parameter="my.class.that.extends.ProcessBaseBean" > > > and I'm wondering how, in the execute() method of the ProcessBaseBean > that I can get session information. In particular, I have a user > object stored in the session that I need for the execute(). It seems > as though I probably wouldn't want to tighten the connection between > the controller and the bean by making the session info available > directly, but I'm not sure how to make the jump. > > >From looking at the cvs code, it looks like ProcessAction has the > ability to expose the session, but it is still a bit nebulous as > to how everything works together. > > Thanks, > -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/ University of Illinois Phone: (217) 244-5711 405 N. Mathews Ave Fax : (217) 244-6078 Urbana, IL 61801, USA --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

