-
Aug 23rd, 2009, 11:12 PM
#1
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!!!
-
Aug 24th, 2009, 02:06 AM
#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!!
-
Aug 30th, 2009, 08:01 PM
#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
-
Aug 31st, 2009, 03:55 AM
#4
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
-
Forum Rules