This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes extending FormPropertyConfig Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "extending FormPropertyConfig" Watch "extending FormPropertyConfig" New topic

extending FormPropertyConfig

sam morris

Joined: Sep 07, 2005
Posts: 3
I am trying to get ArrayList going with struts in request scope. Since it gives the index problem i am creating a new class which extends ArrayList and then overriding the set() method and it in turns checks index and if needed instantiates a new Object that i want and it all works fine.

I am trying to see if anything generic can be done and the only way seems to be to pass the class type to instantiate as a parameter of <form-property> in the config file but in order to do that i have to subclass FormPropertyConfig and read the parameter to instantiate the proper class. I tried subclassing FormPropertyConfig and put the new class name in the className attribute in <form-property> but it is giving an error saying
"TestFormConfig must be a subclass of org.apache.struts.upload.CommonsMultipartRequestHandler". I have no idea what the problem is. Can anyone help.
Don't get me started about those stupid light bulbs.
subject: extending FormPropertyConfig
Similar Threads
Help with using a List of Collections which has another List of Collections
use a object in the form
Dynamic Textboxes.
dynamic beans
Problem with IndexId attribute