Announcement Announcement Module
Collapse
No announcement yet.
web scaffolding Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • web scaffolding

    I need to move my entity objects to a subpackage but I have already initted the web scaffolding on these entities. Is there a way to completely remove the web part of a roo project so that it can be re-controllered? Is there an easy roo command for moving entities or 'binding' scaffolding to a name?

  • #2
    Hi,

    To understand this right - all you want to do is move your domain objects (entities) to another package, is this correct?

    I have just tried this out with the clinic.roo script where I generated the complete project (including controllers) and then moved the Owner class to a subpackage ie. ~.domain.test. If you have Roo running in the background it will clean up its aspects related to the owner class in the domain package and recreate them in the sub package.

    This change has no effect on the controllers (apart for adjustments of the import statements for the owner class in your ~.web.OwnerController_Roo_Controller.aj - again, Roo does this for you automatically.

    Now, if you want to map the Owner controller also to a different URI you can edit the OwnerController.java file and edit it to reflect your wishes:

    @RooWebScaffold(path = "test/owner", ...)
    @RequestMapping("/test/owner/**")

    Once you save that change you will notice that Roo generates a new set of view artifacts in WEB-INF/views/test/owner and it also adjusts the OwnerController_Roo_Controller to reflect the new paths accordingly. The only minor adjustment I did during my tests just now was to edit the menu.jspx file to point to the new path for the owner controller. I guess that can be automated as well...

    Another, albeit more crude, option is to simply delete the directory containing all controllers (in the clinic sample the ~.web directory) as well as everything under src/main/webapp and then create everything new from scratch (ie. 'controller all').

    Does that help you?

    Cheers,
    Stefan

    Comment


    • #3
      turned out the roo scaffolding was working as expected the problem was related to this issue: http://forum.springsource.org/showthread.php?t=79960

      Comment

      Working...
      X