Announcement Announcement Module
Collapse
No announcement yet.
Properly removing a view that isn't backed by a controller Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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?

      Comment


      • #4
        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.

        Comment


        • #5
          Thanks Stefan, looking forward to this add-on.

          Comment

          Working...
          X