Re: DynaActionForm problem (newbie probably :)

2005-01-31 Thread Robin Ericsson
Kishore Senji wrote: The idea is that the Converter should be available only when saving the specific form (atleast for now). Once you register it, the same converter is available for that type from that point onwards. It doesn't matter whether you do it in the Plugin or an Action. So, if you

Re: DynaActionForm problem (newbie probably :)

2005-01-31 Thread Hubert Rabago
Last time I checked (which was a couple of months back), Struts uses the static methods of BeanUtils. This means that they just use the same instance used by all classes for the same application. The same goes for ConvertUtils.register(). So, from what I understand, once you register a

Re: DynaActionForm problem (newbie probably :)

2005-01-31 Thread Joe Germuska
At 9:02 AM -0600 1/31/05, Hubert Rabago wrote: Last time I checked (which was a couple of months back), Struts uses the static methods of BeanUtils. This means that they just use the same instance used by all classes for the same application. The same goes for ConvertUtils.register(). So, from

Re: DynaActionForm problem (newbie probably :)

2005-01-31 Thread Hubert Rabago
I think as far as configuration is concerned, it shouldn't be about the developer configuring multiple BeanUtils instances, but configuring how individual fields should be formatted. This is what I went for with FormDef. http://www.rabago.net/struts/formdef/manual.htm#specifyingformats On Mon,

Re: DynaActionForm problem (newbie probably :)

2005-01-31 Thread Jeff Beal
Joe Germuska wrote: At 9:02 AM -0600 1/31/05, Hubert Rabago wrote: I only recently became aware of BeanUtils' non-static object counterparts, and I haven't had a chance to use them yet or figure out if Struts can use them. I think I raised this question recently on the user list, but if not,

Re: DynaActionForm problem (newbie probably :)

2005-01-30 Thread Robin Ericsson
Robert Taylor wrote: The reason for the error is that the beanutils package cannot convert the date string into a Date object. You can either populate the form with the formatted date or register a Converter to handle the conversion appropriately. I haven't yet used Converter but this problem

Re: DynaActionForm problem (newbie probably :)

2005-01-30 Thread Robert Taylor
If the Converters are valid across the entire application, you can register them using a ServletContextListener or a Struts Plugin. ServletContextListeners are only available for containers supporting the Servlet 2.3 spec or higher. /robert Robin Ericsson wrote: Robert Taylor wrote: The reason for

Re: DynaActionForm problem (newbie probably :)

2005-01-30 Thread Robin Ericsson
Robert Taylor wrote: If the Converters are valid across the entire application, you can register them using a ServletContextListener or a Struts Plugin. ServletContextListeners are only available for containers supporting the Servlet 2.3 spec or higher. The idea is that the Converter should be

Re: DynaActionForm problem (newbie probably :)

2005-01-30 Thread Kishore Senji
The idea is that the Converter should be available only when saving the specific form (atleast for now). Once you register it, the same converter is available for that type from that point onwards. It doesn't matter whether you do it in the Plugin or an Action. So, if you want your Converter to

Re: DynaActionForm problem (newbie probably :)

2005-01-30 Thread Hubert Rabago
Wouldn't you then run into possible conflicts if you have other areas of the code or other forms using BeanUtils? On Sun, 30 Jan 2005 14:34:37 -0600, Kishore Senji [EMAIL PROTECTED] wrote: The idea is that the Converter should be available only when saving the specific form (atleast for

DynaActionForm problem (newbie probably :)

2005-01-29 Thread Robin Ericsson
Hi, This is my form: form-bean name=daysForm type=org.apache.struts.action.DynaActionForm form-property name=days type=mypackage.MyClass[]/ /form-bean This is how I populate it: List days = new ArrayList(); --fill list-- form.set(days, (MyClass[]) days.toArray(new MyClass[days.size()]));

Re: DynaActionForm problem (newbie probably :)

2005-01-29 Thread Robert Taylor
The reason for the error is that the beanutils package cannot convert the date string into a Date object. You can either populate the form with the formatted date or register a Converter to handle the conversion appropriately. I haven't yet used Converter but this problem has been answer many