I have overridden the persist method in one of the beans to handle duplicate names.
Now the weird thing is that upon catching a duplicate, it's still redirecting to the
view page and does not show the error messages. Can anyone assist?
| @Override
| public String create() {
| try {
| return super.update();
| } catch (Exception e) {
| e.printStackTrace();
| FacesMessage message = new FacesMessage("Name must be unique");
| FacesMessages.instance().addToControl("name", message);
| return null;
| }
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4029753#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...