-
1. Re: WARN renderkit 'for' attribute cannot be null
nico Feb 11, 2009 9:25 AM (in response to sberube)Having the same problem here and am tearing my hair out trying to figure out how to get rid of these annoying WARN renderkit 'for' attribute cannot be null messages. Also using s:message as above and am on Seam 2.0.1GA.
-
2. Re: WARN renderkit 'for' attribute cannot be null
nico Feb 11, 2009 2:37 PM (in response to sberube)I managed to get my situation sorted out by brute force, that is to not use a template in an outputpanel. To be honest I don't know why this fixed the problem, I don't have the time for that, all I know is that the WARN renderkit... messages are gone.
This is what I used to have:
<a:outputPanel id="charArea" ajaxRendered="true"> <s:decorate id="char" template="edit.xhtml"> <ui:define name="label">Characters Left:</ui:define> <ui:param name="whofor" value="char" /> <h:outputText id="charLeft" value="#{smsClass.charLeft}"> </h:outputText> </s:decorate> </a:outputPanel>
And this is what I now have, the solution:
<a:outputPanel id="charArea" ajaxRendered="true"> <div class="entry"> <div class="label">Characters Left:</div> <div class="output"> <h:outputText id="charLeft" value="#{smsClass.charLeft}"> </h:outputText> </div> </div> </a:outputPanel>
-
3. Re: WARN renderkit 'for' attribute cannot be null
valatharv Feb 16, 2009 10:27 PM (in response to sberube)I am also facing the same issue, we have a complex xhtml. I get this message on particular xhtml page and it prints it 3 times.... :(
16:17:02,191 WARN [renderkit] 'for' attribute cannot be null
16:17:02,191 WARN [renderkit] 'for' attribute cannot be null
16:17:02,206 WARN [renderkit] 'for' attribute cannot be null
Will brute force help to find out which component is creating this message? I have never used it, any specific version I should go for, please suggest. -
4. Re: WARN renderkit 'for' attribute cannot be null
gonorrhea Jun 15, 2009 7:50 PM (in response to sberube)I'm getting it now. Never seen this before...
10:45:11,089 WARN [renderkit] 'for' attribute cannot be null 10:45:11,105 INFO [ProfilingInterceptor] *** Entering method: getSelectedRecoveredEquipmentManagement 10:45:11,105 INFO [ProfilingInterceptor] *** Method class org.jboss.ejb3.interceptor.InvocationContextImpl.public com.cox.ers.entity.RecoveredEquipmentManagement com.cox.ers.session.RecoveredEquipmentManagementAction.getSelectedRecoveredEquipmentManagement() executed in 0ms *** 10:45:11,120 WARN [renderkit] 'for' attribute cannot be null 10:45:11,152 INFO [ProfilingInterceptor] *** Entering method: getSelectedRecoveredEquipmentManagement 10:45:11,152 INFO [ProfilingInterceptor] *** Method class org.jboss.ejb3.interceptor.InvocationContextImpl.public com.cox.ers.entity.RecoveredEquipmentManagement com.cox.ers.session.RecoveredEquipmentManagementAction.getSelectedRecoveredEquipmentManagement() executed in 0ms *** 10:45:11,167 WARN [renderkit] 'for' attribute cannot be null 10:45:11,183 INFO [ProfilingInterceptor] *** Entering method: getSelectedRecoveredEquipmentManagement 10:45:11,183 INFO [ProfilingInterceptor] *** Method class org.jboss.ejb3.interceptor.InvocationContextImpl.public com.cox.ers.entity.RecoveredEquipmentManagement com.cox.ers.session.RecoveredEquipmentManagementAction.getSelectedRecoveredEquipmentManagement() executed in 0ms *** 10:45:11,198 WARN [renderkit] 'for' attribute cannot be null 10:45:11,214 INFO [ProfilingInterceptor] *** Entering method: getSelectedRecoveredEquipmentManagement 10:45:11,214 INFO [ProfilingInterceptor] *** Method class org.jboss.ejb3.interceptor.InvocationContextImpl.public com.cox.ers.entity.RecoveredEquipmentManagement com.cox.ers.session.RecoveredEquipmentManagementAction.getSelectedRecoveredEquipmentManagement() executed in 0ms *** 10:45:11,230 WARN [renderkit] 'for' attribute cannot be null 10:45:11,245 INFO [ProfilingInterceptor] *** Entering method: getEquipmentTypeDescription 10:45:11,245 INFO [ProfilingInterceptor] *** Method class org.jboss.ejb3.interceptor.InvocationContextImpl.public java.lang.String com.cox.ers.session.RecoveredEquipmentManagementAction.getEquipmentTypeDescription(int) executed in 0ms *** 10:45:11,261 WARN [renderkit] 'for' attribute cannot be null 10:45:11,417 INFO [ProfilingInterceptor] *** Entering method: getRecoveryTypeDescription 10:45:11,417 INFO [ProfilingInterceptor] *** Method class org.jboss.ejb3.interceptor.InvocationContextImpl.public java.lang.String com.cox.ers.session.RecoveredEquipmentManagementAction.getRecoveryTypeDescription(int) executed in 0ms *** 10:45:11,448 WARN [renderkit] 'for' attribute cannot be null 10:45:11,448 INFO [ProfilingInterceptor] *** Entering method: getSelectedRecoveredEquipmentManagement 10:45:11,448 INFO [ProfilingInterceptor] *** Method class org.jboss.ejb3.interceptor.InvocationContextImpl.public com.cox.ers.entity.RecoveredEquipmentManagement com.cox.ers.session.RecoveredEquipmentManagementAction.getSelectedRecoveredEquipmentManagement() executed in 0ms *** 10:45:11,464 WARN [renderkit] 'for' attribute cannot be null
It's like a virus and my server.log is now 425MB in dev!!!
-
5. Re: WARN renderkit 'for' attribute cannot be null
gonorrhea Jun 16, 2009 12:33 AM (in response to sberube)I commented the <s:message/> in edit.xhtml (see below):
<div class="entry"> <s:label styleClass="label #{invalid?'errors':''}"> <ui:insert name="label"/> <s:span styleClass="required" rendered="#{required}">*</s:span> </s:label> <span class="input #{invalid?'errors':''}"> <s:validateAll> <ui:insert/> </s:validateAll> </span> <!-- commenting due to "15:25:14,322 WARN [renderkit] 'for' attribute cannot be null" --> <!-- <s:message styleClass="error errors"/> --> </div>
and the error went away. obviously, this is not a fix, b/c I need the s:message.
what's the fix??? This is the same code as seam-booking app? why is this happening for this app all of a sudden?
-
6. Re: WARN renderkit 'for' attribute cannot be null
jkronegg Aug 18, 2009 11:25 PM (in response to sberube)You should use the edit.xhtml template only if there is something to edit.
This is because the edit.xhtml template contains a <s:message> which maps to the org.jboss.seam.ui.component.UIMessage class (which extends javax.faces.component.html.HtmlMessage which at some point should use the JSF class MessageRenderer which issue the
'for' attribute cannot be null
message). The <s:message> tag looks for a 'for' property as follow:- recursively look for the first parent <s:decorate>
- look for the first EditableValueHolder component in the <s:decorate> (Depth-First-Search order)
- return the 'for' attribute as the EditableValueHolder id (or null if not found)
Since there is no EditableValueHolder field, the 'for' attribute is null, hence the error message.
Abri, do you think the <s:message> should be attached to the <s:decorate> itself if there is no EditableValueHolder field in the decorate?
The advantage would be to avoid failling when possible (and to remove the warning, of course).
-
7. Re: WARN renderkit 'for' attribute cannot be null
jkronegg Sep 28, 2009 4:33 PM (in response to sberube)FYI, I created the JBSEAM-4428 JIRA issue for that warning.
-
8. Re: WARN renderkit 'for' attribute cannot be null
lucasmmr Feb 9, 2010 2:17 PM (in response to sberube)I've solved this problem in my application. I was using "<s:decorate template="/layout/edit.xhtml">" and inside the tag I was using h:commandButon. I've change edit.xhtml for display.xhtml. Like Julien Kronegg told, there is no EditableValue. So don't use 'edit.xhtml'.
-
9. Re: WARN renderkit 'for' attribute cannot be null
rick.roberts May 26, 2010 6:06 PM (in response to sberube)Had the same issue and came here looking for answers.
Lucas and Julien are correct.
When using a non-editable component you should be using
template="/layout/display.xhtml"
vs
template="/layout/edit.xhtml"
-
10. Re: WARN renderkit 'for' attribute cannot be null
arthurgrig.arthurgrig.yahoo.com Oct 12, 2010 2:19 PM (in response to sberube)If you use s:message in your template with s:decorate then there should be at least ONE rendered UI input component.
-
11. Re: WARN renderkit 'for' attribute cannot be null
jaumzera Sep 28, 2011 9:37 AM (in response to sberube)Try this in edit.xhtml
<s:message styleClass="errors" rendered="#{noEdit == null ? true : noEdit}"/>
When you need to use a decorate without an input component, you'll do this way:
<s:decorate template="/layout/edit.xhtml"> <!-- here is the trick --> <ui:param name="noEdit" value="true"/> <!-- the label --> <ui:define name="label">Value field: </ui:define> <!-- the non-input component --> <h:outputText value="#{component.value}"/> </s:decorate>
-
12. Re: WARN renderkit 'for' attribute cannot be null
jaumzera Sep 28, 2011 9:44 AM (in response to sberube)Sorry... I made a mistake...
The right way is:
<ui:param name="noEdit" value="false"/>
Parameter is FALSE instead of TRUE.