[jboss-user] [JBoss Seam] - Re: Conversion error on simple trial
dkane
do-not-reply at jboss.com
Wed May 16 10:38:44 EDT 2007
Actually, I found that stateless bean method is not even being invoked.
I added log-string to the very first line :
| @Stateless
| @Name("register")
| public class RegisterAction implements Register
| {
|
| @In
| private User user;
|
| @PersistenceContext
| private EntityManager em;
|
| @Logger
| private Log log;
|
| public String register()
| {
|
| log.info("SEAM : REGISTER EXAMPLE IS INVOKED");
| List existing = em.createQuery("select username from User where username=:username")
| .setParameter("username", user.getUsername())
| .getResultList();
|
| if (existing.size()==0)
| {
| em.persist(user);
| log.info("Registered new user #{user.username}");
| return "/registered.jsp";
| }
| else
| {
| FacesMessages.instance().add("User #{user.username} already exists");
| return null;
| }
|
| }
| ......
register.jsp contains the button :
<h:commandButton type="submit" value="Register" action="#{register.register}"/>
But when I click the button, log message "SEAM : REGISTER EXAMPLE IS INVOKED" is not being printed.
What's wrong ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046169#4046169
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046169
More information about the jboss-user
mailing list