Results 1 to 4 of 4

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

  1. #1
    Join Date
    Aug 2009
    Posts
    3

    Default 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. #2
    Join Date
    Aug 2009
    Posts
    3

    Default

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

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

    Default

    @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

  4. #4
    Join Date
    Aug 2009
    Posts
    3

    Default

    Thanks,I will try more features of ROO

Posting Permissions

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