Hi,
I am using jboss-seam-1.2.0.PATCH1 and I am try to display a message for unique names. I mean I am adding a client and the name should always be unique, I added the following in the ClientHome.java class:
@Override public String persist() { try { return super.persist(); } catch(Exception e) { if (e instanceof javax.persistence.EntityExistsException) { FacesMessages.instance().add("name", "Client Name should be unique"); } return null; } }
ERROR [STDERR] com.sun.faces.lifecycle.RenderResponsePhase execute INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
The id you put in there has to be the id displayed in html source - even if you put id="foo" on a component, it may well be different due to JSF naming containers