[jboss-user] [JBoss Seam] - Strange problem

Kruno do-not-reply at jboss.com
Wed May 9 16:02:22 EDT 2007


I am using Seam 1.2 and
I have a realy strange problem h:commandButton does not invoke method on the bean actually 4 and 5th phases are missing. There is no exception, nothing page is just rediplayed

jsp page:

  | 
  | <%@ page contentType="text/html; charset=UTF-8" %>
  | <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
  | <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
  | <%@ taglib uri="http://jboss.com/products/seam/taglib" prefix="s" %>
  | 
  | 
  | <f:view>
  | <html>
  | 
  |  <head>
  |   <title>Bugzzila</title>
  |  
  |   </head>
  |  <body>
  | 
  | <h:form>
  | <h:outputText id="prvi" value="Bok...!!!!!"/>
  | 
  | <h:commandButton value="Citaj" type="submit" action="#{trazioper.readOper}" />
  | 
  | <h:inputText value="#{operater.prezime}" />
  | 
  | <h:inputText value="#{operater.ime}" />
  | 
  | <h:commandButton value="Spremi" type="submit" action="#{trazioper.spremi}" />
  | 
  | </h:form>
  | 
  | </body>
  | </html>
  | 
  | </f:view>
  | 

Bean :

  | package orka.oldshema.operater;
  | 
  | import java.util.List;
  | 
  | import javax.ejb.Remove;
  | import javax.ejb.Stateful;
  | import javax.ejb.TransactionAttribute;
  | import javax.ejb.TransactionAttributeType;
  | import javax.persistence.EntityManager;
  | import javax.persistence.PersistenceContext;
  | 
  | import org.jboss.seam.annotations.Destroy;
  | import org.jboss.seam.annotations.Factory;
  | import org.jboss.seam.annotations.In;
  | import org.jboss.seam.annotations.Logger;
  | import org.jboss.seam.annotations.Name;
  | import org.jboss.seam.annotations.Out;
  | import org.jboss.seam.annotations.datamodel.DataModel;
  | import org.jboss.seam.log.Log;
  | 
  | @Stateful
  | @Name("trazioper")
  | public class TraziOperBean implements TraziOper {
  | 
  | 	@PersistenceContext
  | 	EntityManager me;
  | 
  | 	@Logger
  | 	Log log;
  | 
  | 	@SuppressWarnings("unused")
  | 	@DataModel
  | 	private List<Operater> lista;
  | 	
  | 	@Factory("lista")
  | 	@SuppressWarnings("unchecked")
  | 	@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
  | 	public void citaj() {
  | 		List l= me.createQuery("from Operater ")
  | 		.getResultList();
  | 		lista=l;
  | 
  | 	}
  | 	
  | 	@In(required=false) @Out
  | 	Operater operater;
  | 	
  | 	
  | 	public void readOper(){
  | 		operater= (Operater) me.createQuery("from Operater o where o.id='QA105'").getSingleResult();
  | 		log.debug(operater.getPrezime());
  | 		
  | 	}
  | 	
  | 	public void spremi(){
  | 		log.debug("spremi "+operater.getPrezime());
  | 		me.persist(operater);
  | 	
  | 	}
  | 	
  | 	
  | 
  | 	@Remove @Destroy
  | 	public void destroy() {
  | 		
  | 		
  | 	}
  | 
  | 	
  | }
  | 

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044471



More information about the jboss-user mailing list