Hi Michael, On 5/27/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > Hi Hubert, > > * Is it possible to have a method, which would accept a reference to > an existing bean?
Yes, although the current set of convenience methods don't support it. My goal with FormUtils is to provide the basic building blocks so it'll be easy to do stuff like this. Although in this case, I'll probably add a convenience method in the next release so you won't need to write code for it. The docs refer to "FormUtils.getFormValues()" which, if you take a look at the source, does its stuff by acquiring the business object then calling populateBeanFromForm(). It's pretty easy to copy that method and call populateBeanFromForm() using a bean that's passed in as parameter. > * Is it possible to either define which fields should be mapped, or to > map only fields which were received in the current request? Not at the moment. This has been suggested in the past, and I plan to review those suggestions and pick one to implement soon. > * Is it possible to define a method name for a form (probably of some > static helper class), which would return erorr messages? I want this, > because in my case validation must be done within the dialog bean, it > returns list of errors, not an ActionErrors object, to make it more > portable. I would like to be able to provide a conversion method, > which would receive reference to my dialog bean, and would return > ActionMessages object. This one isn't even on the radar. FormDef tries to fit itself in the Action, after validation had succeeded. > > If all this is described in the docs or in the source, I would > appreciate the pointer. > > Thanks, > Michael. > The list of things I wanna work on on FormDef has grown and I've started to chip away at it. I'll likely add the first item on your list since that won't take much effort. Truth is, almost all the FormDef changes since I first released it were due to user requests. So, while FormDef in its current state may not meet your needs today, thanks for asking about them anyway and giving me ideas on how to improve it. Hubert --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

