I am still having the same problem with the simple registration example although I have
followed the exact procedure on the readme.txt.
In order to see whether the Bean is actually created on the registration page, I have
slightly modified the getName() method:
| .....
| @Name("user")
| @Scope(SESSION)
| ....
| public class User implements Serializable
| {
| ....
| public String getName()
| {
| return "I am created:"+name;
| }
|
I am expecting on the first page should display the "I am created:" as the value
of:
<h:inputText value="#{user.username}" required="true"/>
on the registration page. But it still displays the empty content, and when I press
"Registration" button, it display three "Conversion Error" message.
Running out of option, I have created the bean using managed bean in the
faces-config.xml:
| <managed-bean>
| <managed-bean-name>user</managed-bean-name>
|
<managed-bean-class>org.jboss.seam.example.registration.User</managed-bean-class>
| <managed-bean-scope>request</managed-bean-scope>
| </managed-bean>
|
This time the bean is indeed created, I can see the content I set on the bean. So I assume
JBoss failed to create the User bean, baybe it failed to get the annodation from
@Name("user") I don't know.
Could you give me a hint where shall I look at to find out the cause of the problem.
From the discussion, I understand that it may be because that the
embedded Ejb container has not started properly, but there is no any exception or error
message (in the log) when the first page is loaded and I have followed the exact procedure
in the readme.txt.
I assume it maybe because of the database connection it have not
created the bean silently so I removed the meta tags @Entity and @Table from User.java
code to make it pure Java Bean, but still JBoss seam have not created User Bean and there
is no error or exception.
I though that SeamPhaseListener in faces-config.xml should be enough to make the
JBossSeam injection to work on pure Java Beans in JSF, but apparantly there is more story
in it.
| <lifecycle>
| <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
| </lifecycle>
|
I will be very appreciate if you give me a hint about where shall I look to solve this
problem.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979559#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...