Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5090

JSF CDI bean code created without "implements Serializable"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 12.1
    • None
    • javaee - JSF
    • Windows / NetBeans 12.1

    Description

      When using the fileĀ  -> new option to create "JSF CDI Bean" for View scope (and others) the bean file gets created without the "implements Serializable" option included on the class name. The deploy subsequently fails if this doesn't get added manually. It would obviously be better if the code was generated correctly.

      The relevent template file does include:

      {{ <#if passivationCapable??>}}
      import java.io.Serializable;
      {{ </#if>}}

      and

      public class ${name} <#if passivationCapable??>implements Serializable</#if>{

      So behind the hood the "passivationCapable" variable is not being correctly set for the CDI scope(s).

      Attachments

        Issue Links

          Activity

            People

              jherkel Jakub Herkel
              Steve B Stephen Brooksbank
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h