Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Blocker
-
Resolution: Complete
-
Affects Version/s: 1.2.2.RELEASE
-
Fix Version/s: 1.2.3.RELEASE
-
Component/s: WEB MVC
-
Labels:None
Description
I created a Roo petclinic application by using the provided samples/clinic.roo file which compiles without problems.
Now I edit the VisitController.java and add my custom populateEditForm method:
void populateEditForm(Model uiModel, Visit visit) {
uiModel.addAttribute("visit", visit);
addDateTimeFormatPatterns(uiModel);
}
I also add the required
import org.springframework.ui.Model;
Afterwards I run the Roo shell again which says:
Updated SRC_MAIN_JAVA/com/springsource/petclinic/web/VisitController_Roo_Controller.aj
Now the compililation fails:
[ERROR] Pet cannot be resolved
What happened? By creating my custom populateEditForm, Roo removed this method from the .aj file, as well as the imports for both Pet and Vet. But there is still a Pet.countPets() call in the .aj's createForm method that cannot find the Pet import now.