[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-4512) Seam Validator raises "property cannot be resolved" warnings when single value is used instead of List

Luca Gioppo (JIRA) jira-events at lists.jboss.org
Fri Oct 16 03:32:05 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBIDE-4512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12490132#action_12490132 ] 

Luca Gioppo commented on JBIDE-4512:
------------------------------------

the problem persist on 3.1 dev and eclipse 3.5
The seam generated entityes have lots of "cannot be resolved" it happens on "one to many" relations it seems.
It does not recognize the var within the columns tag

<rich:dataTable value="#{tecnologiaUiHome.LTecnologiaUiServers}"
                       var="_lTecnologiaUiServer"
                  rendered="#{not empty tecnologiaUiHome.LTecnologiaUiServers}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="LTecnologiaUiServersTable">
            <rich:column sortBy="#{_lTecnologiaUiServer.id.idTecnologiaUi}">
                <f:facet name="header">Id tecnologia ui</f:facet>
                <h:outputText value="#{_lTecnologiaUiServer.id.idTecnologiaUi}"/>
            </rich:column>
            <rich:column sortBy="#{_lTecnologiaUiServer.id.idServer}">
                <f:facet name="header">Id server</f:facet>
                <h:outputText value="#{_lTecnologiaUiServer.id.idServer}"/>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectlTecnologiaUiServer"
                     value="Select"
                      view="/LTecnologiaUiServer.xhtml">
                    <f:param name="lTecnologiaUiServerIdTecnologiaUi"
                            value="#{_lTecnologiaUiServer.id.idTecnologiaUi}"/>
                    <f:param name="lTecnologiaUiServerIdServer"
                            value="#{_lTecnologiaUiServer.id.idServer}"/>
                    <f:param name="lTecnologiaUiServerFrom" value="TecnologiaUi"/>
                </s:link>
            </h:column>
        </rich:dataTable>

> Seam Validator raises "property cannot be resolved" warnings when single value is used instead of List
> ------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-4512
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-4512
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: jsp/jsf/xml source editing
>    Affects Versions: 3.0.0.GA
>         Environment: JBossTools-ALL-win32-3.0.1.GA-R200905070146-H18, Seam 2.1.1.GA
>            Reporter: Julien Kronegg
>            Assignee: Alexey Kazakov
>             Fix For: 3.1.0.M2
>
>         Attachments: edit.xhtml.ftl, EntityHome.java.ftl, MyBean.java, singleValuedVarCannotBeResolved.png, view.xhtml.ftl
>
>
> Jboss Tools does not recognize correctly the "var" property in list iterators (e.g. rich:dataTable, h:dataTable) if the "value" property is a single value (but works if the "value" property is a List.
> This problem occurs for XHTML pages generated by seam-gen where the value is "#{myEntityHome.instance.singleValue}" (see https://jira.jboss.org/jira/browse/JBIDE-4048).
> Effects:
> 1. add a lot of warnings "variableName cannot be resolved" that should be there
> 2. makes "Seam Validator" task to be very slow when there is a lot of pages (because the Seam Validator task is run on each XHTML file with at least one unresolved EL, see https://jira.jboss.org/jira/browse/JBIDE-3336)
> Expected:
> As the rich:dataTable displays one row when the "value" property is a single value and not a list, Jboss Tools is expected to recognize list AND single value.
> How to reproduce:
> EXECUTE: Create seam project.
> EXECUTE: Create MyBean component (see attached java file)
> EXECUTE: Open home.xhtml
> EXECUTE: Add:
> 	<h:dataTable var="myVar" value="#{myBean.values}">
>             <h:column><h:outputText value="#{myVar.myProperty}"/></h:column>
>         </h:dataTable>
> 		<h:dataTable var="myVar" value="#{myBean.singleValue}">
>             <h:column><h:outputText value="#{myVar.myProperty}"/></h:column>
>         </h:dataTable>
> 		<h:dataTable var="myVar" value="#{myBean.singleValueAsList}">
>             <h:column><h:outputText value="#{myVar.myProperty}"/></h:column>
>         </h:dataTable>
> ASSERT: no warning "myVar cannot be resolved" appear
> Workaround:
> Use a "value" property as List and not as single value (maybe wrapping the single value to a List should do the trick).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list