Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Incomplete
-
1.1.0
-
None
-
None
-
Operating System: Windows XP
Platform: PC
-
33326
Description
Hello all,
i have observed a strange situation. If i do an ActionForward from SampleAction1
to SampleAction2 the formbean related to each Action exchange the values of the
attributes that has the same name in both formbeans.
example:
// SampleAction1 / SampleForm1
public final class SampleAction1 extends Action {
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception
public final class SampleForm1 extends ValidatorForm {
private String sample = null;
// RESET
public void reset(ActionMapping mapping, HttpServletRequest request)
// GETTER / SETTER
//...
}
// SampleAction2 / SampleForm2
public final class SampleAction2 extends Action {
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception { HttpSession session = request.getSession(); SampleForm2 myForm = (SampleForm2) form; // ATTENTION // Now the value of sample in myForm(SampleForm2) is // "test" return new ActionForward ("/end.do"); }
public final class SampleForm2 extends ValidatorForm {
private String sample = null;
// RESET
public void reset(ActionMapping mapping, HttpServletRequest request) { sample = null; }
// GETTER / SETTER
//...
}
Although the reset() methode of SampleForm2 is called (i set a breakpoint) the
value of the attribute sample is anyway "test" after the framework enters the
method execute() of SampleAction2.