adding elements to database using prime is ok for me (all CRUD operations ).
for exception handling iam using:
Code: Select all
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error.xhtml</location>
</error-page>
i tried to simulate an exception ( by adding an element with same id with and existing one in database in order to have a key violation )
the exception is thrown (i see that on glassfish log)
but the redirection to the customized error page is not working : iam staying on the form page.
is <error-page> ignored ?
i tried with
Code: Select all
<h:commandButton value="add" action="#{controllerlist.docreate}" />
Code: Select all
<p:commandButton value="add" action="#{controllerlist.docreate}" />
any hint on this ?
iam using :
NETBEANS 6.9.1
primefaces
DATABASE: MySQL
glassfish server 3
all browsers (IE/Firefox/chrome)
ps : in primefaces after not being redirected to error page , i can insert elements in database using the same page , on icefaces the button is frozen and dont fire any request .