This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Currently, the generated Controller classes will add a FacesMessage when performing a create or update operation. This FacesMessage has a sererity of ERROR - even for a success message. Now, the generated JSF page uses the h:messages component to capture said messages and applies a global style of 'color:green'. Finally, if there is an error inserting a row, nothing is propagated to the client. You have to go look at the server log to find out what happened, but the JSF page, has a nice green success message at the top. Here is how I suggest things should work. In the Controller, have two helper methods - addSuccessMessage(String) and addErrorMessage(String). The addSuccessMessage(String) will add a FacesMessage with a severity of INFO, while addErrorMessage() would basically do what the current addMessage() implementation does. Then, on the JSF page, leverage the fact that you can specify multiple CSS styles for the different FacesMessage serverities (i.e. infoStyle, and errorStyle).
*** Issue 75675 has been marked as a duplicate of this issue. ***
displaying incorrect messages is a defect, not enh
Ryan, thanks for great feedback and suggestions! fixed: http://web.netbeans.org/source/browse/web/jsf/src/org/netbeans/modules/web/jsf/wizards/JSFClinetGenerator.java?r1=1.1.2.6&r2=1.1.2.7
v.