[jboss-user] [JBoss Seam] - Allways can't get he project value, bother me for 2 days

chicochen do-not-reply at jboss.com
Wed Mar 7 23:11:17 EST 2007


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



More information about the jboss-user mailing list