javaeetutorial
  1. javaeetutorial
  2. JAVAEETUTORIAL-64

Consider adding instructions on how to package a custom component in its own JAR file for re-use

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 6.0.7-2
    • Fix Version/s: None
    • Component/s: doc
    • Labels:
      None

      Activity

      Hide
      Kim Haase added a comment -

      Thanks for this suggestion. Would a custom component be packaged as a set of utility classes as in dukes-tutoring/dukes-tutoring-common? We could consider breaking out the custom component of dukes-bookstore this way, in the future.

      Show
      Kim Haase added a comment - Thanks for this suggestion. Would a custom component be packaged as a set of utility classes as in dukes-tutoring/dukes-tutoring-common? We could consider breaking out the custom component of dukes-bookstore this way, in the future.
      Hide
      Kim Haase added a comment -

      Assigning to doc component, but may also involve an examples change.

      Show
      Kim Haase added a comment - Assigning to doc component, but may also involve an examples change.
      Hide
      Ian Evans added a comment -

      The packaging would be similar to dukes-forest/dukes-resources and dukes-tutoring-common.

      dukes-resources shows how to package composite components/images/CSS in a separate JAR file. Do we document how dukes-resources is packaged?

      If Forest used custom components (i.e. components implemented as Java classes) they'd be packaged like this:
      src/java/com/forest/web/CustomComponentName.java

      Show
      Ian Evans added a comment - The packaging would be similar to dukes-forest/dukes-resources and dukes-tutoring-common. dukes-resources shows how to package composite components/images/CSS in a separate JAR file. Do we document how dukes-resources is packaged? If Forest used custom components (i.e. components implemented as Java classes) they'd be packaged like this: src/java/com/forest/web/CustomComponentName.java
      Hide
      Kim Haase added a comment -

      dukes-resources uses the structure described (briefly) in http://docs.oracle.com/javaee/6/tutorial/doc/girgm.html and http://docs.oracle.com/javaee/6/tutorial/doc/glnrj.html#glwkw.

      dukes-tutoring-common contains the entities as well as some utility classes and messages (one of which, DigestUtil, does not seem to be mentioned in the chapter).

      Separating out the dukes-bookstore custom components would I think involve moving the components, model, renderers, and taglib into a separate jar (probably not the listeners, though). These are in several different packages.

      Show
      Kim Haase added a comment - dukes-resources uses the structure described (briefly) in http://docs.oracle.com/javaee/6/tutorial/doc/girgm.html and http://docs.oracle.com/javaee/6/tutorial/doc/glnrj.html#glwkw . dukes-tutoring-common contains the entities as well as some utility classes and messages (one of which, DigestUtil, does not seem to be mentioned in the chapter). Separating out the dukes-bookstore custom components would I think involve moving the components, model, renderers, and taglib into a separate jar (probably not the listeners, though). These are in several different packages.
      Hide
      Ian Evans added a comment -

      DigestUtil is something of an orphan right now. Storing passwords clear in the database isn't a good idea, but getting digest auth to work isn't trivial. So I punted, for now, and DigestUtil should probably be removed until I figure it out.

      The concept of a utility JAR isn't that complicated, so I don't know if we need to refactor dukes-bookstore for this.

      Show
      Ian Evans added a comment - DigestUtil is something of an orphan right now. Storing passwords clear in the database isn't a good idea, but getting digest auth to work isn't trivial. So I punted, for now, and DigestUtil should probably be removed until I figure it out. The concept of a utility JAR isn't that complicated, so I don't know if we need to refactor dukes-bookstore for this.
      Hide
      Kim Haase added a comment -

      If Manfred can point to some information on packaging custom components, I will attempt to provide this information for 7.0. Otherwise, I will close this as Won't Fix.

      Show
      Kim Haase added a comment - If Manfred can point to some information on packaging custom components, I will attempt to provide this information for 7.0. Otherwise, I will close this as Won't Fix.
      Show
      Manfred Riem added a comment - See http://weblogs.java.net/blog/mriem/archive/2012/10/05/packaging-your-jsf-converter
      Hide
      Kim Haase added a comment -

      Your example of a converter does not show the use of annotations. Do they change anything? We annotate the source code with @FacesComponent instead of declaring it in faces-config. Is faces-config necessary if you use annotations?

      Also, for a component, what else would you need to package? The components, model, renderers, and taglib?

      Show
      Kim Haase added a comment - Your example of a converter does not show the use of annotations. Do they change anything? We annotate the source code with @FacesComponent instead of declaring it in faces-config. Is faces-config necessary if you use annotations? Also, for a component, what else would you need to package? The components, model, renderers, and taglib?
      Hide
      Kim Haase added a comment -

      Closing, since I haven't received sufficient information on how to do this.

      Show
      Kim Haase added a comment - Closing, since I haven't received sufficient information on how to do this.

        People

        • Assignee:
          Kim Haase
          Reporter:
          Manfred Riem
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: