Re: LazyDynaBean question
Yes BeanValidatorForm is just a DynaBean wrapper - it can wrap either other DynaBean or POJO beans. FormBeanConfig has become the ActionForm factory (since Struts 1.2) which makes it straight forward to plug in your own mechanism by overriding the createActionForm() method. You can get it to default to your own config implementation either by having your own ModuleConfig flavour or through the struts-config... form-beans className=myPackage.MyFormBeanConfig /form-beans Niall - Original Message - From: Joe Hertz [EMAIL PROTECTED] Sent: Wednesday, February 09, 2005 4:59 AM How about a simpler case then My real goal is to have DynaForms that are backed my experimental semi-lazy-dynabean. BeanValidatorForm (while an impressive piece of work IMHO) isn't actually subclass of a DynaForm (even though it seems like it can be used in almost the same way). The way I see it, the easiest way is to implement a FormBeanConfig that identifies my DynaBean and have all my beans use it? (I can get it to default by mucking with the ModuleConfig object, right?) Sorry for asking so many questions on this. I am delving into the innards of Struts on a level I haven't before, and I think I'm *this* close to fixing the thing about Struts that I seem to whine about incessantly. If I have a DynaForm Object backed with my own brand of DynaBean, I'm most of the way home. Tx again - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LazyDynaBean question
But I still have to implement my own ActionForm class, no? I just can't plug in an alternative dynabean implementation for the a DynaForm class to be backed by? -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 09, 2005 3:30 AM To: Struts Users Mailing List Subject: Re: LazyDynaBean question Yes BeanValidatorForm is just a DynaBean wrapper - it can wrap either other DynaBean or POJO beans. FormBeanConfig has become the ActionForm factory (since Struts 1.2) which makes it straight forward to plug in your own mechanism by overriding the createActionForm() method. You can get it to default to your own config implementation either by having your own ModuleConfig flavour or through the struts-config... form-beans className=myPackage.MyFormBeanConfig /form-beans Niall - Original Message - From: Joe Hertz [EMAIL PROTECTED] Sent: Wednesday, February 09, 2005 4:59 AM How about a simpler case then My real goal is to have DynaForms that are backed my experimental semi-lazy-dynabean. BeanValidatorForm (while an impressive piece of work IMHO) isn't actually subclass of a DynaForm (even though it seems like it can be used in almost the same way). The way I see it, the easiest way is to implement a FormBeanConfig that identifies my DynaBean and have all my beans use it? (I can get it to default by mucking with the ModuleConfig object, right?) Sorry for asking so many questions on this. I am delving into the innards of Struts on a level I haven't before, and I think I'm *this* close to fixing the thing about Struts that I seem to whine about incessantly. If I have a DynaForm Object backed with my own brand of DynaBean, I'm most of the way home. Tx again - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LazyDynaBean question
But I still have to implement my own ActionForm class, no? I just can't plug in an alternative dynabean implementation for the a DynaForm class to be backed by? -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 09, 2005 3:30 AM To: Struts Users Mailing List Subject: Re: LazyDynaBean question Yes BeanValidatorForm is just a DynaBean wrapper - it can wrap either other DynaBean or POJO beans. FormBeanConfig has become the ActionForm factory (since Struts 1.2) which makes it straight forward to plug in your own mechanism by overriding the createActionForm() method. You can get it to default to your own config implementation either by having your own ModuleConfig flavour or through the struts-config... form-beans className=myPackage.MyFormBeanConfig /form-beans Niall - Original Message - From: Joe Hertz [EMAIL PROTECTED] Sent: Wednesday, February 09, 2005 4:59 AM How about a simpler case then My real goal is to have DynaForms that are backed my experimental semi-lazy-dynabean. BeanValidatorForm (while an impressive piece of work IMHO) isn't actually subclass of a DynaForm (even though it seems like it can be used in almost the same way). The way I see it, the easiest way is to implement a FormBeanConfig that identifies my DynaBean and have all my beans use it? (I can get it to default by mucking with the ModuleConfig object, right?) Sorry for asking so many questions on this. I am delving into the innards of Struts on a level I haven't before, and I think I'm *this* close to fixing the thing about Struts that I seem to whine about incessantly. If I have a DynaForm Object backed with my own brand of DynaBean, I'm most of the way home. Tx again - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LazyDynaBean question
Now I'm just confused. sorry. Niall - Original Message - From: Joe Hertz [EMAIL PROTECTED] To: 'Struts Users Mailing List' user@struts.apache.org Sent: Wednesday, February 09, 2005 7:15 PM Subject: RE: LazyDynaBean question But I still have to implement my own ActionForm class, no? I just can't plug in an alternative dynabean implementation for the a DynaForm class to be backed by? -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 09, 2005 3:30 AM To: Struts Users Mailing List Subject: Re: LazyDynaBean question Yes BeanValidatorForm is just a DynaBean wrapper - it can wrap either other DynaBean or POJO beans. FormBeanConfig has become the ActionForm factory (since Struts 1.2) which makes it straight forward to plug in your own mechanism by overriding the createActionForm() method. You can get it to default to your own config implementation either by having your own ModuleConfig flavour or through the struts-config... form-beans className=myPackage.MyFormBeanConfig /form-beans Niall - Original Message - From: Joe Hertz [EMAIL PROTECTED] Sent: Wednesday, February 09, 2005 4:59 AM How about a simpler case then My real goal is to have DynaForms that are backed my experimental semi-lazy-dynabean. BeanValidatorForm (while an impressive piece of work IMHO) isn't actually subclass of a DynaForm (even though it seems like it can be used in almost the same way). The way I see it, the easiest way is to implement a FormBeanConfig that identifies my DynaBean and have all my beans use it? (I can get it to default by mucking with the ModuleConfig object, right?) Sorry for asking so many questions on this. I am delving into the innards of Struts on a level I haven't before, and I think I'm *this* close to fixing the thing about Struts that I seem to whine about incessantly. If I have a DynaForm Object backed with my own brand of DynaBean, I'm most of the way home. Tx again - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LazyDynaBean question
How about a simpler case then My real goal is to have DynaForms that are backed my experimental semi-lazy-dynabean. BeanValidatorForm (while an impressive piece of work IMHO) isn't actually subclass of a DynaForm (even though it seems like it can be used in almost the same way). The way I see it, the easiest way is to implement a FormBeanConfig that identifies my DynaBean and have all my beans use it? (I can get it to default by mucking with the ModuleConfig object, right?) Sorry for asking so many questions on this. I am delving into the innards of Struts on a level I haven't before, and I think I'm *this* close to fixing the thing about Struts that I seem to whine about incessantly. If I have a DynaForm Object backed with my own brand of DynaBean, I'm most of the way home. Tx again -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Monday, February 07, 2005 1:01 PM To: Struts Users Mailing List Subject: Re: LazyDynaBean question If you wanted to have Struts use different flavours of BeanValidatorForm to wrap objects then you would have to create your own custom FormBeanConfig implementation and override the createActionForm() method. Then you need to configure struts to use the custom FormBeanConfig and put in place a mechanism to tell your custom FormBeanConfig how to select the various flavours. IMO a much simpler soution is to create your own custom ActionForm by extending BeanValidatorForm (like LazyValidatorForm in 1.2.6) public class PathBeanValidatorForm extends BeanValidatorForm { public LazyValidatorForm() { super(new LazyDynaBean()); setPathValidation(true); } } ... and then cofigure it in the usual way. form-bean name=LazyBean type=myPackage.PathBeanValidatorForm / Niall - Original Message - From: Joe Hertz [EMAIL PROTECTED] Sent: Monday, February 07, 2005 5:37 PM I'm using Struts 1.2.4. If in my struts-config I have something like this: form-bean name=LazyBean type=org.apache.commons.beanutils.LazyDynaBean/ How can I get to the resulting form object to setPathValidation(true)? Is there a way I can tell Struts what particular BeanValidatorFom subclass to be using? Going to 1.2.6 is not an option right now. TIA -Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LazyDynaBean question
How about a simpler case then My real goal is to have DynaForms that are backed my experimental semi-lazy-dynabean. BeanValidatorForm (while an impressive piece of work IMHO) isn't actually subclass of a DynaForm (even though it seems like it can be used in almost the same way). The way I see it, the easiest way is to implement a FormBeanConfig that identifies my DynaBean and have all my beans use it? (I can get it to default by mucking with the ModuleConfig object, right?) Sorry for asking so many questions on this. I am delving into the innards of Struts on a level I haven't before, and I think I'm *this* close to fixing the thing about Struts that I seem to whine about incessantly. If I have a DynaForm Object backed with my own brand of DynaBean, I'm most of the way home. Tx again -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Monday, February 07, 2005 1:01 PM To: Struts Users Mailing List Subject: Re: LazyDynaBean question If you wanted to have Struts use different flavours of BeanValidatorForm to wrap objects then you would have to create your own custom FormBeanConfig implementation and override the createActionForm() method. Then you need to configure struts to use the custom FormBeanConfig and put in place a mechanism to tell your custom FormBeanConfig how to select the various flavours. IMO a much simpler soution is to create your own custom ActionForm by extending BeanValidatorForm (like LazyValidatorForm in 1.2.6) public class PathBeanValidatorForm extends BeanValidatorForm { public LazyValidatorForm() { super(new LazyDynaBean()); setPathValidation(true); } } ... and then cofigure it in the usual way. form-bean name=LazyBean type=myPackage.PathBeanValidatorForm / Niall - Original Message - From: Joe Hertz [EMAIL PROTECTED] Sent: Monday, February 07, 2005 5:37 PM I'm using Struts 1.2.4. If in my struts-config I have something like this: form-bean name=LazyBean type=org.apache.commons.beanutils.LazyDynaBean/ How can I get to the resulting form object to setPathValidation(true)? Is there a way I can tell Struts what particular BeanValidatorFom subclass to be using? Going to 1.2.6 is not an option right now. TIA -Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LazyDynaBean question
I'm using Struts 1.2.4. If in my struts-config I have something like this: form-bean name=LazyBean type=org.apache.commons.beanutils.LazyDynaBean/ How can I get to the resulting form object to setPathValidation(true)? Is there a way I can tell Struts what particular BeanValidatorFom subclass to be using? Going to 1.2.6 is not an option right now. TIA -Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LazyDynaBean question
I'm using Struts 1.2.4. If in my struts-config I have something like this: form-bean name=LazyBean type=org.apache.commons.beanutils.LazyDynaBean/ How can I get to the resulting form object to setPathValidation(true)? Is there a way I can tell Struts what particular BeanValidatorFom subclass to be using? Going to 1.2.6 is not an option right now. TIA -Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LazyDynaBean question
If you wanted to have Struts use different flavours of BeanValidatorForm to wrap objects then you would have to create your own custom FormBeanConfig implementation and override the createActionForm() method. Then you need to configure struts to use the custom FormBeanConfig and put in place a mechanism to tell your custom FormBeanConfig how to select the various flavours. IMO a much simpler soution is to create your own custom ActionForm by extending BeanValidatorForm (like LazyValidatorForm in 1.2.6) public class PathBeanValidatorForm extends BeanValidatorForm { public LazyValidatorForm() { super(new LazyDynaBean()); setPathValidation(true); } } ... and then cofigure it in the usual way. form-bean name=LazyBean type=myPackage.PathBeanValidatorForm / Niall - Original Message - From: Joe Hertz [EMAIL PROTECTED] Sent: Monday, February 07, 2005 5:37 PM I'm using Struts 1.2.4. If in my struts-config I have something like this: form-bean name=LazyBean type=org.apache.commons.beanutils.LazyDynaBean/ How can I get to the resulting form object to setPathValidation(true)? Is there a way I can tell Struts what particular BeanValidatorFom subclass to be using? Going to 1.2.6 is not an option right now. TIA -Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LazyDynaBean question
Yep. I was afraid you'd say something like that. I'll see what I can do about moving to 1.2.6. On the subject: Is there a LazyDynaBean implementation that keeps the standard dynabean behavior on the get() methods? I don't want to touch any of the createProperty() methods because I want that behavior on the setters. I'm doing it now, but I'd just assume stay in the path most traveled. It looks to be just a matter of any place that forces a return of null to return an InvalidArgumentException: Ex: // Property doesn't exist if (!isDynaProperty(name)) { //return null; throw new IllegalArgumentException(Property ' + name + ' does not exist in bean.); Bout right? Tx again -Joe -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Monday, February 07, 2005 1:01 PM To: Struts Users Mailing List Subject: Re: LazyDynaBean question If you wanted to have Struts use different flavours of BeanValidatorForm to wrap objects then you would have to create your own custom FormBeanConfig implementation and override the createActionForm() method. Then you need to configure struts to use the custom FormBeanConfig and put in place a mechanism to tell your custom FormBeanConfig how to select the various flavours. IMO a much simpler soution is to create your own custom ActionForm by extending BeanValidatorForm (like LazyValidatorForm in 1.2.6) public class PathBeanValidatorForm extends BeanValidatorForm { public LazyValidatorForm() { super(new LazyDynaBean()); setPathValidation(true); } } ... and then cofigure it in the usual way. form-bean name=LazyBean type=myPackage.PathBeanValidatorForm / Niall - Original Message - From: Joe Hertz [EMAIL PROTECTED] Sent: Monday, February 07, 2005 5:37 PM I'm using Struts 1.2.4. If in my struts-config I have something like this: form-bean name=LazyBean type=org.apache.commons.beanutils.LazyDynaBean/ How can I get to the resulting form object to setPathValidation(true)? Is there a way I can tell Struts what particular BeanValidatorFom subclass to be using? Going to 1.2.6 is not an option right now. TIA -Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]