This content has been marked as final.
Show 3 replies
-
1. Re: ID becoming null when trying to save entity.
cdiggins Jan 8, 2008 3:43 PM (in response to cdiggins)Problem solved.
I at first did not have a field at all to take the ID, reasoning that if there was no field it would keep the previous ID value from the database. This was incorrect; the solution now used is to have an inputHidden bound to the ID property of my entity, which then passes the ID (if there is one) to the save method of the bean. -
2. Re: ID becoming null when trying to save entity.
pmuir Jan 9, 2008 7:15 PM (in response to cdiggins)That's certainly not necessary (take a look at any example).
How are you holding state in the app? In a long running conversation? -
3. Re: ID becoming null when trying to save entity.
cdiggins Jan 10, 2008 10:55 AM (in response to cdiggins)It is now a long-running conversation, this being my first seam project and I had not realized that was how to do it. It works without the hidden field - that just happened to be the first solution I found.