You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Mathias Bogaert <mb...@transwide.com> on 2001/12/13 16:19:50 UTC
ActionServlet problem
Hello,
When looking up forms in the scope, the ActionServlet compares the classname
of the form found in the scope and of the classname given in the
ActionMapping. This prevents you from using extended forms with one action.
Example:
1) I have a CMRForm (XDoclet) and a CMRFromTemplateForm that extends
CMRForm.
2) I have one action that takes a CMRForm to store this form.
3) If I use this action with a CMRFromTemplateForm, struts checks if the
classnames are equal (CMRForm != CMRFromTemplateForm) and instantiates a
CMRForm (which is of course empty).
To work around it, we had to change the following section in the
ActionServlet (Rev. 1.68.2.4, line 1686ff):
// Can we recycle the existing form bean instance?
if ((instance != null) &&
className.equals(instance.getClass().getName())) {
Can this problem be solved in the next version of Struts?
Kind regards,
Kai Schilz
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>