DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15604>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15604 Struts framework should use getInstance Method for instantiating FormBeans Summary: Struts framework should use getInstance Method for instantiating FormBeans Product: Struts Version: 1.0.2 Final Platform: All OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: Digester AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Suggession Instead of instantiating formbeans using newInstance of reflection API, if struts gives the developer with a getInstance method. Developer will have the liberty to either create a new instance or return a Proxy Instance. Disadvantage with the existing framework : 1. FormBean may grow large depending upon the number of fields used. 2. When form data is required for backend purpose, Data from formbean has to be copied to another 'application specific Object', this is just to decouple struts from my application. Advantages when struts invokes a getInstance() method on the FormBean 1. I need have any variables in my form bean 2. I need not write getter/setter methods in my form bean 3. I need not transfer data from formbean (frontend) to my application specific data object (backend) 4. Adding new variable is as simple as adding setter/getter methods in the respective interface and start using the same name as variables in my JSP. How : 1. I will return a Proxy Instance for the Form Bean 2. Write only my application specific data object to hold the data, which will have only a HashMap. 3. When struts framework invokes any setter method, the data will be set to my data object's HashMap as MethodName vs. Value 4. Now theres no transfer of data required, all the data required for my form bean is available in the data object, which is specific to my application (not depending on struts). -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>