Re: How to disable label warnings?
I'm migrating from Mojarra to MyFaces, so there lots of labels with missing for attribute. I can't refactor everything now, so I'd like to disable debug at least in production, because it's polluting my server log files. I'll attach my web.xml (project stage is configured in the global web.xml from tomcat, but I also tested locally to make sure) Thanks ?xml version=1.0 encoding=UTF-8? web-app version=3.0 xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd; display-nameÁrea do Cliente/display-name !-- Corrige exibição de 3 horas a mais ao usar f:convertDateTime -- context-param param-namejavax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE/param-name param-valuetrue/param-value /context-param context-param param-namejavax.faces.FACELETS_SKIP_COMMENTS/param-name param-valuetrue/param-value /context-param !-- PrimeFaces -- context-param param-nameprimefaces.SUBMIT/param-name param-valuepartial/param-value /context-param context-param param-nameprimefaces.THEME/param-name param-valueredmond/param-value /context-param context-param param-nameprimefaces.UPLOADER/param-name param-valuecommons/param-value /context-param !-- MyFaces -- context-param param-nameorg.apache.myfaces.COMPRESS_STATE_IN_SESSION/param-name param-valuefalse/param-value /context-param context-param param-nameorg.apache.myfaces.SERIALIZE_STATE_IN_SESSION/param-name param-valuefalse/param-value /context-param context-param param-nameorg.apache.myfaces.SUPPORT_JSP_AND_FACES_EL/param-name param-valuefalse/param-value /context-param context-param param-nameorg.apache.myfaces.EXPRESSION_FACTORY/param-name param-valueorg.apache.el.ExpressionFactoryImpl/param-value /context-param filter filter-namePrimeFaces FileUpload Filter/filter-name filter-classorg.primefaces.webapp.filter.FileUploadFilter/filter-class init-param param-namethresholdSize/param-name param-value1048576/param-value /init-param /filter filter-mapping filter-namePrimeFaces FileUpload Filter/filter-name servlet-namefacesServlet/servlet-name /filter-mapping listener listener-classbr.com.spdata.persistence.FirebirdListener/listener-class /listener servlet servlet-namefacesServlet/servlet-name servlet-classjavax.faces.webapp.FacesServlet/servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-namefacesServlet/servlet-name url-pattern*.jsf/url-pattern /servlet-mapping session-config session-timeout15/session-timeout /session-config welcome-file-list welcome-filepage/comunicados.jsf/welcome-file /welcome-file-list error-page exception-typejava.lang.Throwable/exception-type location/template/error.jsf/location /error-page error-page error-code404/error-code location/template/notFound.jsf/location /error-page security-constraint display-nameRestrict raw XHTML Documents/display-name web-resource-collection web-resource-nameXHTML/web-resource-name url-pattern*.xhtml/url-pattern /web-resource-collection auth-constraint / /security-constraint /web-app 2014-03-27 18:43 GMT-03:00 Karl Kildén karl.kil...@gmail.com: Hrmm this is the debug logging from development mode right? You are supposed to fix the problems and not change the logging properties. The logging is very useful for development. Paste web.xml contents. On 27 March 2014 22:04, Felipe Jaekel fkjae...@gmail.com wrote: I'd like to disable label warnings like this: Advertência: Attribute 'for' of label component with id form:j_id_8n is not defined Searching google I saw some mentioning that changing the project stage to production would solve. Others mentioned that creating a logging.properties file with org.apache.myfaces.shared.renderkit.html.HtmlLabelRenderer.level = SEVERE would do the trick. I tried both without success. Any ideas? Thanks
Re: How to disable label warnings?
I just remembered that I had this issue, too, when I migrated from Mojarra to MyFaces. My quick/easy fix was to use TextPad, search all *.xhtml files in my project for h:outputLabel, and replce with h:outputText. I don't use outputLabel, i add label to my PrimeFaces UI components, as/when necessary. On Fri, Mar 28, 2014 at 8:26 AM, Felipe Jaekel fkjae...@gmail.com wrote: I'm migrating from Mojarra to MyFaces, so there lots of labels with missing for attribute. I can't refactor everything now, so I'd like to disable debug at least in production, because it's polluting my server log files. I'll attach my web.xml (project stage is configured in the global web.xml from tomcat, but I also tested locally to make sure) Thanks ?xml version=1.0 encoding=UTF-8? web-app version=3.0 xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd; display-nameÁrea do Cliente/display-name !-- Corrige exibição de 3 horas a mais ao usar f:convertDateTime -- context-param param-namejavax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE/param-name param-valuetrue/param-value /context-param context-param param-namejavax.faces.FACELETS_SKIP_COMMENTS/param-name param-valuetrue/param-value /context-param !-- PrimeFaces -- context-param param-nameprimefaces.SUBMIT/param-name param-valuepartial/param-value /context-param context-param param-nameprimefaces.THEME/param-name param-valueredmond/param-value /context-param context-param param-nameprimefaces.UPLOADER/param-name param-valuecommons/param-value /context-param !-- MyFaces -- context-param param-nameorg.apache.myfaces.COMPRESS_STATE_IN_SESSION/param-name param-valuefalse/param-value /context-param context-param param-nameorg.apache.myfaces.SERIALIZE_STATE_IN_SESSION/param-name param-valuefalse/param-value /context-param context-param param-nameorg.apache.myfaces.SUPPORT_JSP_AND_FACES_EL/param-name param-valuefalse/param-value /context-param context-param param-nameorg.apache.myfaces.EXPRESSION_FACTORY/param-name param-valueorg.apache.el.ExpressionFactoryImpl/param-value /context-param filter filter-namePrimeFaces FileUpload Filter/filter-name filter-classorg.primefaces.webapp.filter.FileUploadFilter/filter-class init-param param-namethresholdSize/param-name param-value1048576/param-value /init-param /filter filter-mapping filter-namePrimeFaces FileUpload Filter/filter-name servlet-namefacesServlet/servlet-name /filter-mapping listener listener-classbr.com.spdata.persistence.FirebirdListener/listener-class /listener servlet servlet-namefacesServlet/servlet-name servlet-classjavax.faces.webapp.FacesServlet/servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-namefacesServlet/servlet-name url-pattern*.jsf/url-pattern /servlet-mapping session-config session-timeout15/session-timeout /session-config welcome-file-list welcome-filepage/comunicados.jsf/welcome-file /welcome-file-list error-page exception-typejava.lang.Throwable/exception-type location/template/error.jsf/location /error-page error-page error-code404/error-code location/template/notFound.jsf/location /error-page security-constraint display-nameRestrict raw XHTML Documents/display-name web-resource-collection web-resource-nameXHTML/web-resource-name url-pattern*.xhtml/url-pattern /web-resource-collection auth-constraint / /security-constraint /web-app 2014-03-27 18:43 GMT-03:00 Karl Kildén karl.kil...@gmail.com: Hrmm this is the debug logging from development mode right? You are supposed to fix the problems and not change the logging properties. The logging is very useful for development. Paste web.xml contents. On 27 March 2014 22:04, Felipe Jaekel fkjae...@gmail.com wrote: I'd like to disable label warnings like this: Advertência: Attribute 'for' of label component with id form:j_id_8n is not defined Searching google I saw some mentioning that changing the project stage to production would solve. Others mentioned that creating a logging.properties file with org.apache.myfaces.shared.renderkit.html.HtmlLabelRenderer.level = SEVERE would do the trick. I tried both without success. Any ideas? Thanks
Re: How to disable label warnings?
On Fri, Mar 28, 2014 at 1:52 PM, Howard W. Smith, Jr. smithh032...@gmail.com wrote: I just remembered that I had this issue, too, when I migrated from Mojarra to MyFaces. My quick/easy fix was to use TextPad, search all *.xhtml files in my project for h:outputLabel, and replce with h:outputText. I don't use outputLabel, i add label to my PrimeFaces UI components, as/when necessary. What Howard suggests is the best solution. Having h:outputLabel without a for attribute is meaningless. If you are not attaching the label, you should be using h:outputText instead of h:outputLabel.