This content has been marked as final.
Show 3 replies
-
1. Re: Allways can't get he project value, bother me for 2 days
pmuir Mar 8, 2007 5:20 AM (in response to chicochen)I don't see you make project available as a Seam context variable anywhere.
-
2. Re: Allways can't get he project value, bother me for 2 days
chicochen Mar 8, 2007 6:48 AM (in response to chicochen)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 } }
-
3. Re: Allways can't get he project value, bother me for 2 days
chicochen Mar 8, 2007 7:23 AM (in response to chicochen)it's ok now, my code come from different doc, it's my mistake.