0 Replies Latest reply on Jul 14, 2011 6:54 PM by vace117

    How to inherit @ResourceDependencies from parent renderer?

    vace117

      Hello.

       

      It seems to me that there is no way to inherit  @ResourceDependencies when extending an existing renderer. Is that really the case?

       

      For example, I'm extending the InplaceSelectRenderer. It inherits it's resources from InplaceSelectRendererBase, and this works b/c InplaceSelectRenderer  does not add any of it's own @ResourceDependencies.

       

      Now, let's say that I want to inherit all this from InplaceSelectRendererBase:

       

      {code}

      @ResourceDependencies({

              @ResourceDependency(library = "javax.faces", name = "jsf.js"),

              @ResourceDependency(name = "jquery.js"),

              @ResourceDependency(name = "richfaces.js"),

              @ResourceDependency(name = "jquery.position.js"),

              @ResourceDependency(name = "richfaces-event.js"),

              @ResourceDependency(name = "richfaces-base-component.js"),

              @ResourceDependency(name = "richfaces-selection.js"),

              @ResourceDependency(library = "org.richfaces", name = "inputBase.js"),

              @ResourceDependency(library = "org.richfaces", name = "inplaceBase.js"),

              @ResourceDependency(library = "org.richfaces", name = "popup.js"),

              @ResourceDependency(library = "org.richfaces", name = "popupList.js"),

              @ResourceDependency(library = "org.richfaces", name = "inplaceInput.js"),

              @ResourceDependency(library = "org.richfaces", name = "inplaceSelect.js"),

              @ResourceDependency(library = "org.richfaces", name = "inplaceSelect.ecss") })

      {code}

       

      but also add this:

       

      {code}

      @ResourceDependencies({

          @ResourceDependency(library = "javascript", name = "prototype-1.7-valblant.js"),

          @ResourceDependency(library = "filteredLabelInplaceSelect/js", name = "filteredLabelInplaceSelect.js"),

      })

      {code}

       

       

      Is this possible without having to explicitly repeat all of the dependencies in InplaceSelectRendererBase? It seems like the Java annotation mechanism prevents this, b/c specifying the same annotation on a subclass wipes the superclass annotation.

       

       

       

      Thanks.