This content has been marked as final.
Show 4 replies
-
1. Re: Simple examples needed
damianharvey Oct 30, 2007 5:29 AM (in response to mortena)Look at the 'examples' folder in your Seam directory.
For your problem you just need to instantiate a Credential when you create a new User in UserHome. Try doing this in createInstance().
Cheers,
Damian. -
2. Re: Simple examples needed
mortena Oct 30, 2007 5:59 AM (in response to mortena)I Changed the following in UserHome generated by seam-gen:
@Override @Begin public void create() { super.create(); }
to:@Override @Begin public void create() { super.create(); super.getInstance().setCredential(new Credential()); }
Added a line where I manually create a new credential.
Now it works. -
3. Re: Simple examples needed
mortena Oct 30, 2007 7:33 AM (in response to mortena)I was a little too fast there.
Make sure you only set the credentials if the credentials are null.
Else they'll be overwritten. -
4. Re: Simple examples needed
ivan.tufegdzic Oct 30, 2007 8:03 AM (in response to mortena)When you create User in that moment you must create Credential. After that link that entities.
user.setCredential(that new credential);