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?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026105#4026105

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026105
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to