Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-1574

Inner classes invalidate Seam component

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • 2.0.1
    • 2.0.0.GA
    • seam2
    • None
    • Compatibility/Configuration

    Description

      Inner classes within a Seam component preclude the outer class from registration as a Seam component.

      We validated this by removing an inner class from a Session bean and saw as it appeared under the "Seam Components" view.

      We then added the inner class back into the bean and watched as the Seam component disappeared.

      This also precluded the component from receiving Content Assist/code completion.

      An example:
      @Stateful
      @Scope(ScopeType.SESSION)
      @Name("valueManager")
      public class ValueManager extends PopupBean implements ValueManagerLocal
      {

      /**

      • Used to perform logging of information, debug error or general errors.
        */
        @Logger
        Log log;

      /**

      • Injects the current user information
        */
        @In
        User currentUser;

      /**

      • Injects the entity manager
        */
        @In
        private EntityManager entityManager;

      /**

      • Injects the seam expressions
        */
        @In
        private Expressions expressions;

      /**

      • Injects the FacesContext
        */
        @In
        private FacesContext facesContext;

      /** Reference to FacesMessages **/
      @In
      private FacesMessages facesMessages;

      .....
      .....

      @Remove
      @Destroy
      public void destroy()
      {
      }

      private class Values extends HashMap
      {
      public Object get(Object category)

      { log.info("The value in category " + category.toString()); EntityManager em = (EntityManager)Component.getInstance("entityManager"); return em.createNamedQuery("findValuesByCategory") .setParameter("category", category).getResultList(); }

      }

      }

      Attachments

        Issue Links

          Activity

            People

              alexeykazakov Alexey Kazakov
              chris.simons_jira Chris Simons (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: