[jboss-user] [JBoss Seam] - Re: Allways can't get he project value, bother me for 2 days
chicochen
do-not-reply at jboss.com
Thu Mar 8 06:48:46 EST 2007
thanks for your feedback!
my actionbean:
@Stateful
| @Name("projectMaintAction")
| @Scope(ScopeType.CONVERSATION)
| @Restrict("#{identity.loggedIn}")
| public class ProjectMaintActionImpl implements ProjectMaintAction {
|
| @In(required = false) @Out
| private Project project;
|
| //@In(value="projectMaintService", create=true)
| //public ProjectMaintService projectMaintService;
| @In
| private EntityManager entityManager;
|
| @In
| private FacesMessages facesMessages;
|
| @Logger
| private Log log;
|
| private boolean isCreation = false;
|
| public boolean isCreation() {
| return isCreation;
| }
| @Begin
| public void createProject() {
| isCreation = true;
| project = new Project();
| }
| @End
| public void saveProject() {
| if (isCreation == true){
| String aa = project.getName();
| entityManager.persist(project);
| }
| }
|
|
| @Destroy @Remove
| public void destroy() {
| }
| public void delete() {
| // TODO Auto-generated method stub
|
| }
| public void editProject() {
| // TODO Auto-generated method stub
|
| }
| public void updateProject() {
| // TODO Auto-generated method stub
|
| }
| public void viewProject() {
| // TODO Auto-generated method stub
|
| }
|
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026209#4026209
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026209
More information about the jboss-user
mailing list