I have created a seam application using seam-gen. I have a page that displays a master
entity and its children. The page also allows the user to add a new child. However, when I
click the submit button on the page to add the new child, the finally rendered page does
not show this child. The reason is that the database is queried BEFORE the child is
inserted. See below:
| 17:22:47,702 INFO [STDOUT] before - RESTORE_VIEW(1)
| 17:22:47,749 INFO [STDOUT] after - RESTORE_VIEW(1)
| 17:22:47,765 INFO [STDOUT] before - APPLY_REQUEST_VALUES(2)
| 17:22:47,780 INFO [STDOUT] Hibernate: select thread0_.ID as ID161_0_, thread0_.TITLE
as TITLE161_0_, thread0_.FORUM_FKas FORUM3_161_0_ from chalktalk.thread thread0_ where
thread0_.ID=?
| 17:22:47,780 INFO [STDOUT] Hibernate: select posts0_.THREAD_FK as THREAD4_1_,
posts0_.ID as ID1_, posts0_.ID as ID160_0_, posts0_.BODY as BODY160_0_, posts0_.THREAD_FK
as THREAD4_160_0_, posts0_.DATE_CREATED as DATE3_160_0_ from chalktalk.post posts0_ where
posts0_.THREAD_FK=?
| 17:22:47,812 INFO [STDOUT] after - APPLY_REQUEST_VALUES(2)
| 17:22:47,812 INFO [STDOUT] before - PROCESS_VALIDATIONS(3)
| 17:22:47,859 INFO [STDOUT] after - PROCESS_VALIDATIONS(3)
| 17:22:47,859 INFO [STDOUT] before - UPDATE_MODEL_VALUES(4)
| 17:22:47,905 INFO [STDOUT] after - UPDATE_MODEL_VALUES(4)
| 17:22:47,905 INFO [STDOUT] before - INVOKE_APPLICATION(5)
| 17:22:48,015 INFO [STDOUT] Hibernate: insert into chalktalk.post (BODY, THREAD_FK,
DATE_CREATED, ID) values (?, ?, ?, ?)
| 17:22:48,046 INFO [STDOUT] after - INVOKE_APPLICATION(5)
| 17:22:48,093 INFO [STDOUT] before - RENDER_RESPONSE(6)
| 17:22:48,249 INFO [STDOUT] after - RENDER_RESPONSE(6)
|
How do I solve this issue/ I would like the newly rendered page to show the inserted
child.
Thanks.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996537#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...