[forge-issues] [JBoss JIRA] (FORGE-1792) Add scopes to a the faces-new-bean command

Antonio Goncalves (JIRA) issues at jboss.org
Tue May 6 16:38:56 EDT 2014


Antonio Goncalves created FORGE-1792:
----------------------------------------

             Summary: 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
          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}




--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the forge-issues mailing list