struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 19625] New: - DynaActionForm with LazyList support
Date Sat, 03 May 2003 20:31:05 GMT
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=19625>.
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=19625

DynaActionForm with LazyList support

           Summary: DynaActionForm with LazyList support
           Product: Struts
           Version: Nightly Build
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Controller
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: mail@phase.ws


I added LazyList support to the DynaActionForm process.

Often a DynaActionForm will contain a colleciton of objects that will be 
populated from the form input. Two thing need ot happen in order to facilitate 
that process. 1) The size of colleciton must grow dynamically as the index is 
called 2) The proper object type must exist at that index to populate.

Tha LazyList has solved this problem by allowing a List to grow to a particular 
index even when the index is outside the bounds of the current List. Once the 
index is created the LazyList then populates it with the neccessary object 
according to a Factory.

I added 1 class and updated 3. You can view the patch to see what they are.

In order to let the DynaActionForm know what type of object to populate the 
Colleciton with I have added an additional attribute to the form-property tag 
called collectionObjectType. So, if an indexed form property (myProperty[12]) 
calls an index that is out of bounds on a collection, the collection will 
adjust to meet the index and populate it with the object defined in the 
collecitonObjectType attribute.
 
<form-property name="myComputers"
  type="java.util.ArrayList"
  collectionObjectType="ws.phase.experimental.model.MyComputer"/>
  
I see huge productivity potential for me in having the DynaActionForm fuction 
in this manner. It is possible to do it with hard-coded ActionForms. So, I 
think it makes sense to make it possible with DynaActionForms. I hope this will 
be adopted and included into the Struts 1.2.

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message