3 Replies Latest reply on Mar 8, 2007 7:23 AM by Chico Chen

    Allways can't get he project value, bother me for 2 days

    Chico Chen Newbie

      pages.xml

      <navigation from-action="#{projectMaintAction.add}">
       <render view-id="/backend/project/projectAdd.xhtml" />
       </navigation>
      
      <page view-id="/projectAdd.xhtml"
       conversation-required="true">
       <navigation from-action="#{projectMaintAction.save}">
       <render view-id="/projectQuery.xhtml" />
       </navigation>
       </page>

      projectQuery.xhtml
      <h:commandLink id="addProject" value="Add Project" action="#{projectMaintAction.add}" propagation="true"/>

      ProjectMaintActionImpl.Add()
      @Stateful
      @Name("projectMaintAction")
      @Scope(ScopeType.CONVERSATION)
      @Restrict("#{identity.loggedIn}")
      public class ProjectMaintActionImpl implements ProjectMaintAction {
       @Begin
       public void add() {
       isCreation = true;
       project = new Project();
       }
      }

      projectAdd.xhtml

       <h:form>
       <h:inputText id="projectName"
       value="#{project.name}" />
      <h:commandButton type="reset" action="#" value="Reset" />
       </h:form>
      

      public void save() {
       if (isCreation == true){
       String aa = project.getName();
       projectMaintService.save(project);
       }
       }

      String aa = project.getName() return null, why?