7

Because I have manually tuned my entities and controllers and view, I would like roo to change none of them. Nevertheless I would like roo to keep on scaffolding all new entities. How could I do that

gpasse
  • 4,380
  • 7
  • 44
  • 75

3 Answers3

8

You can modify the @RooWebScaffold annotation in your entity by adding update=false attribute for it.

@RooWebScaffold(path = "<yourpath>", formBackingObject = <YourClass>.class, update=false)

This tells Roo not to scaffold and update views for the generated entity.

Cheers!!!

bhagyas
  • 3,050
  • 1
  • 23
  • 21
  • update in @RootWebScaffold: "Creates an update() method which allows alteration of an existing entity." – Konrad Nowicki Nov 27 '12 at 16:51
  • Adding `update=false` means Roo will remove the "update" (RequestMethod.PUT) controller methods and associated views. The same can be applied with `create=false`, `delete=false`, etc. It does not prevent updating your views/controllers like the question asks, it in fact will continuously delete them from your project. – rwyland Sep 25 '13 at 03:38
0

.aj are automanaged you must put your code in .java and if you need change any method defined in .aj you must copy it in the .java an change it there. STS and roo will delete it automatically from the .aj.

For the second question, yes you can do it. Roo only manage the file views created by him, but only change all tags that have the "z" parameter autogenerated by him. So if you change manually an autogenerated view and you want thar roo does not change it you must put in z parameter an undefined z value, for example (z=-1 or z="user_managed") and roo will not change those tags.

source: http://forum.springsource.org/archive/index.php/t-126182.html

Konrad Nowicki
  • 1,929
  • 1
  • 14
  • 11
0

Remove @RooEntity annotation from your entities and you should be good.

Hope that helps.

Nilesh
  • 4,137
  • 6
  • 39
  • 53
  • When I remove @RooEntity annotation, roo just deletes lots of files and updates my views. I do not want that. I would just like roo to ignore those entities. – gpasse Jun 06 '11 at 09:51
  • roo will delete all the scaffolding that it created while creating entity. I believe that is what your question was about. There is no side effect of Roo doing this. If you are observing any, please let us know here. – Nilesh Jun 06 '11 at 11:42
  • I see. I could see lot of files beeing deleted. Guess I need more experience. Thanks for the answer. I will test the process. – gpasse Jun 06 '11 at 13:41