Hi

Can someone point out why this do not work, or why this work?

What this does, get a Actionform, set a value in it, add the ActionForm
into an Vector, set the Vector into Session. 

Strangely the new ActionForm is not displayed in the JSP returned by
ActionForward. It only appears if the ActionForm reset is not called
before returning the method.

How can the reset method affect my codes?

and yes, the values was printed out before returning and all the values
are there..

Why is that so? 

Thanks

Sebastian Ho

---------------------------------------------------------

public ActionForward addColumn(ActionMapping mapping, ActionForm form,
HttpServletRequest request,     HttpServletResponse response) throws
IOException, ServletException {
    HttpSession session = request.getSession();

//GET FORM
LCColumnPackingMaterialForm columnPackingMaterial =
(LCColumnPackingMaterialForm) form;

//GET VECTOR FROM SESSION
Vector columnPackingMaterials = (Vector)
session.getAttribute(Constants.COLUMN_PACKING_MATERIALS_KEY);

//SET INDEX IN FORM   
columnPackingMaterial.setIndex(String.valueOf(columnPackingMaterials.size()));

//ADD FORM INTO VECTOR
columnPackingMaterials.add(columnPackingMaterial);

//SET VECTOR INTO SESSION
session.setAttribute(Constants.COLUMN_PACKING_MATERIALS_KEY,
columnPackingMaterials);

//RESET FORM   
//form.reset(mapping, request);

return mapping.findForward("addsuccess");
        }


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to