Announcement Announcement Module
Collapse
No announcement yet.
Spring Roo 1.2 RELEASE not scaffolding Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Does MyPojo have any fields?

    Comment


    • #3
      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

      Comment


      • #4
        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.

        Comment


        • #5
          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

          Comment


          • #6
            Just raise a Jira issue attaching the script and a backup of the generated project using the Roo 'backup' command.

            Comment


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

              Comment


              • #8
                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

                Comment


                • #9
                  Your backing type has no Roo entity annotations, so this is why it creating an empty controller.

                  Comment


                  • #10
                    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.

                    Comment


                    • #11
                      The annotations trigger the creation of the web controller methods in the ITD (.aj file). You always push-in the ITD methods back into the controller .java class and then remove the annotations from the backing type.

                      Comment

                      Working...
                      X