[
https://issues.jboss.org/browse/JBSEAM-4428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12690118#comment-12690118
]
Almut Hack commented on JBSEAM-4428:
------------------------------------
I prefer the first solution (display no error message) because I'd like to use
only one template for displaying and editing purposes. Looks like this:
{code}
<s:decorate template="layout/edit.xhtml">
<ui:define name="label">#{messages.customer}:</ui:define>
<h:inputText rendered="#{myObject.editMode}"
value="#{myObject.customer}"/>
<h:outputText rendered="#{!myObject.editMode}"
value="#{myObject.customer}"/>
</s:decorate>
{code}
The warning is filling up my logs and is not helpful for me.
> <s:decorate> tag gives a "[renderkit] 'for' attribute cannot be null" message
> when no EditableValueHolder is found
> ------------------------------------------------------------------------------------------------------------------
>
> Key: JBSEAM-4428
> URL: https://issues.jboss.org/browse/JBSEAM-4428
> Project: Seam 2
> Issue Type: Bug
> Affects Versions: 2.1.2.GA
> Environment: Seam 2.1.2.GA,
> http://fisheye.jboss.org/browse/Seam/branches/community/Seam_2_1/ui/src/main/java/org/jboss/seam/ui/component/UIDecorate.java?r=10303,
>
> http://fisheye.jboss.org/browse/Seam/branches/community/Seam_2_1/ui/src/main/java/org/jboss/seam/ui/component/UIMessage.java?r=5186
> Reporter: Julien Kronegg
> Priority: Minor
>
> When a field is decorated using <s:decorate> with the default Seam template
> "edit.xhtml" on content without EditableValueHolder (i.e. editable elements
> such as <h:inputText>), the following warning is issued:
> WARN [renderkit] 'for' attribute cannot be null
> This occurs for example on the following code snippet:
> <s:decorate id="char" template="edit.xhtml">
> <ui:define name="label">Characters Left:</ui:define>
> <h:outputText id="charLeft" value="#{smsClass.charLeft}"/>
> </s:decorate>
> The Seam edit.xhtml template is the following:
> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:s="http://jboss.com/products/seam/taglib">
> <div class="prop">
> <s:label styleClass="name #{invalid?'errors':''}">
> <ui:insert name="label"/>
> <s:span styleClass="required"
> rendered="#{required}">*</s:span>
> </s:label>
> <span class="value #{invalid?'errors':''}">
> <s:validateAll>
> <ui:insert/>
> </s:validateAll>
> </span>
> <span class="error">
> <h:graphicImage value="/img/error.gif" rendered="#{invalid}"
> styleClass="errors"/>
> <s:message styleClass="errors"/>
> </span>
> </div>
> </ui:composition>
> This is caused by org.jboss.seam.ui.component.UIDecorate which gets the 'for'
> id by looking at the first available EditableValueHolder. When there is no
> such element, the 'for' id is null, hence the warning message (probably
> issued by the org.jboss.seam.ui.component.UIMessage parent class
> javax.faces.component.html.HtmlMessage).
> The warning message is very anonying and give no useful information on what
> is going wrong: this kind of messages takes a lot of time to track and makes
> a big impact on the developper productivity.
> The UIDecorate class should either:
> 1) display no error message (by either attaching the s:message tag to the
> s:decorate itself, or by avoid rendering the s:message)
> 2) display a more meaningfull message such as "No editable component found to
> attach the message in the decorate with id=xxx" (maybe to be combined with
> solution 1).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues