Announcement Announcement Module
Collapse
No announcement yet.
can't I edit the methods in the "xxx_Roo_Entity.aj" file? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • can't I edit the methods in the "xxx_Roo_Entity.aj" file?

    can't I edit the methods in the "xxx_Roo_Entity.aj" file?

    I've tryed to edit the method "public void Roles.remove(){}" in the "Roles_Roo_Entity.aj" file,but it changed back when I open the "Roo shell".

    How can I put some codes into the automatic method to manager the "crud"?

    I am finding the way for a few times

    Waiting for help!!

    thanks!!!

  • #2
    Hi,
    I put the same methode in the "entity.java" and write my code then it works as I expect.
    but I am not sure whether it's the right way!!

    Comment


    • #3
      @wjy,

      To provide your custom code you will need to edit your java files as Roo will maintain the aspects (aj files). So if you want for example to provide custom functionality in the MyEntity.delete() method you will need to 'push-in' that method into the actual Java code in your MyEntity java sources. To do this you can use the push-in refactoring feature in the SpringSource tool suite or you can do it by hand - just copy the method from the aspect to the java sources and remove the class name which is prepended to the method name.

      So you are doing the right thing by editing the java sources as Roo will parse these but not alter them.

      -Stefan

      Comment


      • #4
        Thanks,I will try more features of ROO

        Comment

        Working...
        X