Announcement Announcement Module
No announcement yet.
Creation of custom scaffolding with ROO Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creation of custom scaffolding with ROO

    Hi all,

    I'm trying to create my own addon to generate a different scaffold of the one which is created with 'controller all ...'

    I first built a simple addon which only has an '' class, I added a dependency to the Roo 'addon-web-mvc-controller', and I only changed the syntax of the commands. That worked right.

    But now I'd like to know how can I create an addon to generate a different scaffold, based in the default scaffold of MVC and ROO but changing something, for example, adding the editing form of an object in the same view of the list instead of redirecting to another view with only the form.

    I was wondering which part of the addon have I to modify or overwrite to get it.

    Could anyone help me?

  • #2
    I'm also interested on it


    • #3
      Could anyone help me PLEASE? I'm very interested on it


      • #4
        You could write an add-on which disables the WebScaffoldMetadataProvider OSGi service to effectively disable all MVC controller ITDs. Then implement your own WebScaffoldMetadataProvider type (you could copy all of it) and instead of instantiating a new WebScaffoldMetadata type you would need to instantiate your own sub type. The subtype would then override the method you wish to customize.

        I have not tried this out but it is a solution that seems doable.

        We will be looking at providing more convenient extension hooks for this type of situation hopefully as part of the 1.2 release cycle.



        • #5
          Thanks for your reply Stefan,

          I'm going to try that, but I'm not sure how to disable the WebScaffoldMetadataProvider, could you help me please?

          Can I do that with 'osgi scr disable...'?
          Last edited by r.rodriguez; Feb 23rd, 2011, 03:59 AM.


          • #6
            Hi again Stefan,

            I tried what you said, and I was able to disable the existing WebScaffoldMetadataProviderImpl. but I had problems after that.

            I have a problem after the activation of my addon, it seems to be correctly installed (it appears as activated), I can execute my command to disable the previous WebScaffoldMetadataProviderImpl, but after that, when I execute 'entity --class ~.domain.MyEntity', it sometimes fails, and after executing 'controller all....' any view, tagx, ... is created. It also creates a but doesn't create any .aj

            Could you help me please?