Announcement Announcement Module
No announcement yet.
new addon not registering dependencies Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • new addon not registering dependencies

    I've just spent an hour or so in debug mode with the wedding
    example, and the normal web-mvc-controller addon
    gets all of its downstreamDependencies registered just fine, but for
    some reason with my roofaces addon the downstream dependencies are not
    getting registered by the DefaultMetadataDependencyRegistry. So roo
    does not find any dependencies and does not create any of the
    associated jsp resources.

    The roofaces addon that i'm starting with is
    essentially a "copy" of the web-mvc-controller, so my roofaces
    addon should be registering all of the mvc-jsp images, i18n resources,
    styles, etc. as downstream dependencies, but for some reason they are
    not getting registered or matched as dependencies of my addon.

    Any ideas, why that may be?

  • #2
    Hi Vernon,

    The Web MVC add-ons (controller, jsp and menu) have the following purpose:
    • Controller add-on: provide the 'controller' commands, create the controller java types (and aspects when necessary), install artifacts to register the controllers correctly (web.xml, urlrewrite.xml, webmvc-config.xml, etc)
    • JSP add-on: This add-on listens for types which are annotated with @RooWebScaffold and when it is triggered it will go ahead and install artifacts which are used as part of the JSP views (CSS, images, Tiles, jsps, etc)
    • Menu add-on: this is a very simple addon which simply provides access to a shared menu by applications that use the MVC infrastructure (Selenium, Web flow, JSP)

    So if you want to follow the controller add-on approach you also need to take a look at the JSP addon. Specifically JspMetadataListener is important as it registers an interest in the presence of the @RooWebScaffold annotation:

    // Ensure we're notified of all metadata related to web scaffold metadata, in particular their initial creation		
    metadataDependencyRegistry.registerDependency(WebScaffoldMetadata.getMetadataIdentiferType(), getProvidesType());
    So the actual handling of resources like images, CSS, etc is actually handled by the JSP add-on, not the Controller addon. The controller add-on is in fact unaware of the artifacts used by JSP views.

    The roo shell gives you a number of commands to take a look at the metadata chains, for example:

    metadata for type --type
    This should give you an idea who is depending or listening for this type (upstream and downstream).

    I hope this gets you started.



    • #3
      Thanks for the quick response Stefan. What you are saying is really starting to make sense.

      I was just now able to do exactly what you said.

      I performed a similar procedure for the web-mvc-jsp addon, and now I have 2 addons which work together in the same way as yours.

      For example ... my roofaces-view addon listens for types which are annotated with @RooFacesScaffold and when it is triggered it will go ahead and install artifacts which are used as part of the JSP views (CSS, images, Tiles, jsps, etc)

      It creates a working wedding app anyway :-)

      Now ... to see if I can get it to start cranking out a JSF wedding app :-P
      Last edited by vsingleton; Dec 14th, 2009, 10:33 PM.


      • #4
        Glad you passed the first hurdle . I am looking forward to see JSF support!



        • #5
          Roofaces - need help with RooFacesScaffold

          Hey Guys,

          I just got started with ROO using STS 2.3.2 (Roo 1.0.2.RELEASE) using JDK 1.5, I am looking to use ROO with JSF 2.0. I couldn't find much resources available to get me started, one of the few results on google led me to this thread

          I believe there is a request for this feature Roo addon for JSF 2.0 for, but it looks like there is no development happening there.

          I happened to find Roofaces wedding application but I am not sure how to continue because this seems to depend on RooFacesScaffold which cannot be resolved.

          Vernon, you seem to have come up with your own rooface view addon, it would be really great if you could help me with my ROO - JSF 2.0 adventure.

          If there has been any more development on this front, please let me know.