are the command.newS bound to Pet#isNew() and Visit#isNew() in AddPetForm.java and AddVisitForm.java controller with formBackingObject?
andCode:protected Object formBackingObject(HttpServletRequest request) throws ServletException { Pet pet = getClinic().loadPet(RequestUtils.getRequiredIntParameter(request, "petId")); Visit visit = new Visit(); pet.addVisit(visit); return visit; }
usually command.new should be resolved into to Command#getNew, how is it resolved to Command#isNew and from which version JSTL or is it done through Spring?Code:protected Object formBackingObject(HttpServletRequest request) throws ServletException { Owner owner = getClinic().loadOwner(RequestUtils.getRequiredIntParameter(request, "ownerId")); Pet pet = new Pet(); owner.addPet(pet); return pet; }
thanks.


Reply With Quote