Results 1 to 10 of 19

Thread: How to update fields/relationships/entities afterwards

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Posts
    7

    Default How to update fields/relationships/entities afterwards

    Hi,

    I am discovering Roo at the moment and everything seem great!

    I have a question though: how can we update actions done earlier through Roo? More specifically, how to update aspects with Roo?

    For example I do that first:

    Code:
    field --fieldName lastname --class Employee
    But then I want to change lastname to lastName and cascading this change to every aspects generated by Roo, how can we do that?

  2. #2
    Join Date
    Sep 2009
    Posts
    13

    Default

    If the Roo Shell is open for your project, just change the field name directly in the java source code.

    Roo will detect that the file has changed, and will cascade the changes.

  3. #3
    Join Date
    Nov 2009
    Posts
    7

    Default

    Ok damnly simple... But then in the same vein if I deleted something by error (some jsp files for example) how can I regenerate them?

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

    Default

    Indeed, the regeneration of some Web artifacts needs some better handling. At the moment you could simply delete the controller as well and then just issue the 'controller scaffold' command again for the entity you want to provide scaffolding for.

    Cheers,
    Stefan

  5. #5
    Join Date
    Oct 2005
    Location
    Amsterdam
    Posts
    123

    Default

    Quote Originally Posted by Stefan Schmidt View Post
    Indeed, the regeneration of some Web artifacts needs some better handling. At the moment you could simply delete the controller as well and then just issue the 'controller scaffold' command again for the entity you want to provide scaffolding for.

    Cheers,
    Stefan
    I did just that:
    -1. deleted my scaffolded controller, roo shell noticed
    -2. deleted my views for it
    -3. added two fields
    -4. reissued controller scaffold for the entity

    However the new fields are not showing up in the edit form. They are however displayed in show.jsp

    Any guesses?
    Last edited by mirror303; Dec 20th, 2009 at 04:00 AM. Reason: added note about show.jsp
    Hans Westerbeek
    Software Engineer

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

    Default

    Which version of Roo are you using? Please try out Roo RC4 and take a look at the upgrade section in the included documentation where we describe which artifacts to delete and which commands to issue. If you still have issues, I would be very interested in some more details so we can replicate your problem and fix it .

    Cheers,
    Stefan

Posting Permissions

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