]
Antonio Goncalves updated FORGE-1792:
-------------------------------------
Parent Issue: FORGE-1926 (was: FORGE-1593)
Add scopes to a the faces-new-bean command
------------------------------------------
Key: FORGE-1792
URL:
https://issues.jboss.org/browse/FORGE-1792
Project: Forge
Issue Type: Sub-task
Security Level: Public(Everyone can see)
Components: Java EE
Affects Versions: 2.5.0.Final
Reporter: Antonio Goncalves
Fix For: 2.x Future
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)
{code}
faces-new-bean --named MyBean --scoped Conversation
{code}
This would generate the following code
{code}
@Named
@ConversationScoped
public class MyBean implements Serializable {
@Inject
private Conversation conversation;
public String begin() {
conversation.begin();
}
public String end() {
conversation.end();
}
}
{code}