OK. I found some errors in my code and bugfixed it. There's only one more
problem. It's the problem why I started posting: Seam doesn't apply the request
values to the field.
Let me explain it. In a simple application you've a form, where the user enters
some information and hits a button. Seam injects the request values to a field
of a stateless bean. The method invoked saves the data and that's it.
I want to make it possible to modify data. The user selects an item from a
list, which he wants to modify. Then he is displayed a form with input fields
to enter his modifications. So I already have a scoped variable which delivers
the data to display. Now the user enters some information (changing or adding
data) and hits "save". At this point Seam should apply all the request values
(it would be nice if Seam recognized only modified values, but I think this
would go to far) to the scoped variable which is displayed. Then the invoked
method of the stateful component could save the variable.
I can't say, why it doesn't work. Perhaps I made some mistakes. Perhaps I'm
dealing with a bug of Seam or JBoss. I only know that Seam tries to apply
'null' instead of the entered information from the form.
Here's the code of my component:
@Stateful
| @Scope(ScopeType.SESSION)
| @LoggedIn
| @Name("showTestactionForDevelopers")
| @Interceptors(SeamInterceptor.class)
| public class ShowTestactionForDevelopers implements
IShowTestactionForDevelopers{
| @PersistenceContext(unitName = "aresDatabase", type =
PersistenceContextType.EXTENDED)
| private EntityManager em;
|
| @In
| @Valid
| private User user;
|
| @In(required=false, scope=ScopeType.EVENT)
| private List<Testaction> currentTestactions;
| @In(required=false, scope=ScopeType.EVENT)
| private Integer currentTestactionIndex;
| @In(scope=ScopeType.EVENT, required=false)
| @Out(scope=ScopeType.EVENT)
| @Valid
| private Testaction currentTestaction;
|
| private transient List<Testcase> testcases;
| private transient List<User> developers;
| private transient List<Revisionclass> revisions;
|
| public ShowTestactionForDevelopers() {
| System.out.println("Hello world");
| }
|
| public String saveTestaction() {
| saveCurrentTestaction();
| return "backToList";
| }
| //rest omitted
And, sorry if I'm getting on your nerves.
Thanks
Newlukai
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3929786#3929786
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3929786
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user