-
Sub-task
-
Resolution: Done
-
Major
-
2.5.0.Final
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; } }
- is related to
-
FORGE-1595 Being able to create an empty JSF backing bean
- Closed