protected org.apache.struts.action.ActionForward | doExecute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
ProductForm frm = ( ProductForm ) form;
String productId = frm.getProductId( );
Petstore petstore = getPetstore( );
/* Product */
Product product = petstore.getProduct( productId );
frm.setProduct( product );
/* Items */
Collection items = petstore.getItems( productId, 0, Integer.MAX_VALUE ).getList( );
frm.setItems( items );
return mapping.findForward( SUCCESS );
|