Details

    Description

      The command faces-new-bean should be able to add a scope. Then, depending on the scope, the generated code would be different (e.g. implements Serializable for most of the other stateful scopes)

      faces-new-bean --named MyBean --scoped SESSION
      

      This would generate the following code

      @Named
      @SessionScoped
      public class MyBean implements Serializable {
      
      }
      

      For the conversation scope we could add more code :

      faces-new-bean --named MyBean --scoped Conversation
      

      This would generate the following code

      @Named
      @ConversationScoped
      public class MyBean implements Serializable {
      
        @Inject
        private Conversation conversation;
      
        public String begin() {
          conversation.begin();
          return null;
        }
      
        public String end() {
          conversation.end();
          return null;
        }
      }
      

      Attachments

        Issue Links

          Activity

            People

              agoncal Antonio Goncalves
              agoncal Antonio Goncalves
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: