Hi,
We are using seam-gen in our project and are facing the following issue -
1) When we try to delete a entity and it violates some db constraint , it throws a http 500 error page with the exception. We modified the pages.xml to include the following case
<exception class="javax.persistence.EntityExistsException"> <end-conversation/> <redirect view-id="/error.xhtml"></redirect> </exception>
Now when the exception is encountered we get the error.xhtml BUT it renders only when the conversation times out !! The user has to wait 2 mins(conv timeout in comp.xml) before he sees the error page.
Our entity.page.xml
has the following entry -
<?xml version="1.0" encoding="UTF-8"?> <page xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd" no-conversation-view-id="/FqdnLocalList.xhtml" login-required="true"> <begin-conversation join="true"/> <action execute="#{fqdnLocalHome.wire}"/> <param name="fqdnLocalFrom"/> <param name="fqdnLocalOidIndex" value="#{fqdnLocalHome.fqdnLocalOidIndex}"/> <navigation from-action="#{fqdnLocalHome.remove}"> <end-conversation/> <redirect view-id="/FqdnLocalList.xhtml"/> </navigation> </page>
If we put the exception tag in the entity.page.xml , we get the 500 error page and not the error.xhtml !
--
Kanwar
resolved by using this -
this.getConversation().endBeforeRedirect();