Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Spring Roo 1.2 RELEASE not scaffolding

  1. #1
    Join Date
    Aug 2011
    Location
    Williamsport, PA
    Posts
    29

    Default Spring Roo 1.2 RELEASE not scaffolding

    Hello all.

    I've been working on a project with Roo. I started with Roo 1.1.5, and have been steadily upgrading and working through various issues with the upgrades.

    I'm using STS and when I issue the following command, to generate a controller, view and the basic scaffolding, all I get is the controller without any of the Roo controlled CRUD methods.

    I'm using the following command. I'm using a POJO for my backingType instead of an entity class. Not sure if this is the issue or not. I'm assuming it very well may be.

    Code:
    roo> web mvc scaffold --backingType ~.domain.forms.MyPojo --class ~.web.MyPojoController
    All I get is a very bare controller and no views.

    Has anyone had any experience with an issue like this?

    Thanks,
    John

  2. #2
    Join Date
    Dec 2005
    Posts
    930

    Default

    Does MyPojo have any fields?
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  3. #3
    Join Date
    Aug 2011
    Location
    Williamsport, PA
    Posts
    29

    Default

    Hi Alan,

    Yes, it has several fields in it in fact. There are no Roo annotations in the POJO, its just a clean class. My intent is to just use it as a class for backing the web form and then to send it off to a service for processing.

    Thanks,
    John

  4. #4
    Join Date
    Dec 2005
    Posts
    930

    Default

    If you have used the web mvc scaffold command, then there should be the @RooWebScaffold annotation and a view would have been created provided there were fields in the backing type.
    Perhaps provide a complete Roo script here so I can try.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  5. #5
    Join Date
    Aug 2011
    Location
    Williamsport, PA
    Posts
    29

    Default

    Hi Alan,

    I sure can. However, I'll have to send it when I get home tonight. How would you prefer I get it to you?

    Thanks,
    John

  6. #6
    Join Date
    Dec 2005
    Posts
    930

    Default

    Just raise a Jira issue attaching the script and a backup of the generated project using the Roo 'backup' command.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  7. #7
    Join Date
    Aug 2011
    Location
    Williamsport, PA
    Posts
    29

    Default

    Thanks Alan, I be glad to do that. Thanks for your help!

  8. #8
    Join Date
    Aug 2011
    Location
    Williamsport, PA
    Posts
    29

    Default

    Alan,

    Sorry for the late reply, but between work and being sick, I just now completed this. Here is the link to the Roo ticket.

    https://jira.springsource.org/browse/ROO-3009

    Thanks,
    John

  9. #9
    Join Date
    Dec 2005
    Posts
    930

    Default

    Your backing type has no Roo entity annotations, so this is why it creating an empty controller.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  10. #10
    Join Date
    Aug 2011
    Location
    Williamsport, PA
    Posts
    29

    Default

    Thanks Alan, the thing is, I don't actually want the backing class to be the entity. I think I understand what you are saying though.

    If I understand correctly, if I specify a backing type that is not an entity, Roo can't scaffold because it doesn't know how to do the CRUD operations, so its up to me to manually handle the controller. So I could create the controller as I want, except that I would have to create my own methods and send the data using JSON.

    Gotcha. Thanks a bunch Alan, sorry I misunderstood how this worked.

Posting Permissions

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