Results 1 to 5 of 5

Thread: Properly removing a view that isn't backed by a controller

  1. #1
    Join Date
    Nov 2009
    Location
    Montreal, Quebec
    Posts
    398

    Question Properly removing a view that isn't backed by a controller

    Say I added a view that's not backed by a controller like this:

    Code:
    web mvc install view --path /testing --viewName testing --title testing
    How would I then remove it properly so Roo could delete the generated files? Simply deleting the <mvc:view-controller/> element from webmvc-config.xml and deleting the directory "WEB-INF/views/testing" doesn't prompt Roo to delete/modify the remaining generated files. I would have expected that deleting at least the <mvc:view-controller/> element would have told Roo to delete/modify the generated files. So for example, the "WEB-INF/views/menu.jspx" file still contains a menu element for the view, even though it no longer exists.

  2. #2
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    Patrick,

    I have already explained in your Jira ticket why I think a remove command would not be a perfect solution. However, to add to my comments there, I think you would benefit from the soon to be released Git add-on which allows you to simply rollback the last x commands, or at least visualize which changes were made as a result of the 'web mvc install view' command, so you can remove the artifacts manually from your project.

    The add-on will most likely be made available with the next Roo release.

    HTH,
    Stefan
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

  3. #3
    Join Date
    Nov 2009
    Location
    Montreal, Quebec
    Posts
    398

    Default

    Thanks Stefan. That will be a nice add-on to have! Will the Git add-on interact primarily with the local Git repo, or will there also be commands to push to remote repos?

  4. #4
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    The git add-on will create a local repo and perform an automatic commit after each successful command execution. You can also trigger a manual commit from the Roo shell. The repo will be compliant with Git so you can push to a remote repo using your normal Git tool (command line or IDE integrated). We may include a git push command at some stage but this is not currently available.
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

  5. #5
    Join Date
    Nov 2009
    Location
    Montreal, Quebec
    Posts
    398

    Default

    Thanks Stefan, looking forward to this add-on.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •