[jbosstools-issues] [JBoss JIRA] (JBIDE-12614) Code completion on item with h:dataTable fails if value point on datamodel object

Alexey Kazakov (JIRA) jira-events at lists.jboss.org
Fri Sep 14 11:50:33 EDT 2012


     [ https://issues.jboss.org/browse/JBIDE-12614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Kazakov updated JBIDE-12614:
-----------------------------------

           Description: 
When using data model object (eg. javax.faces.model.ListDataModel<MyClass> -  bean.listDM) and h:dataTable (or rich:dataTable) Eclipse warns me on item presentation #{item.name) '"name" cannot be resolved'.

{code}
<h:dataTable var="item" value="#{bean.listDM}">
 <h:column>
    <h:outputText
	value="#{item.name}" />
 </h:column>
</h:dataTable>
{code}
If I change bean.listDM on bean.list (java.util.List<MyClass>), then no warning is displayed.

After deployment both of version works fine.

  was:
When using data model object (eg. javax.faces.model.ListDataModel<MyClass> -  bean.listDM) and h:dataTable (or rich:dataTable) Eclipse warns me on item presentation #{item.name) '"name" cannot be resolved'.


<h:dataTable var="item" value="#{bean.listDM}">
 <h:column>
    <h:outputText
	value="#{item.name}" />
 </h:column>
</h:dataTable>

If I change bean.listDM on bean.list (java.util.List<MyClass>), then no warning is displayed.

After deployment both of version works fine.

    Steps to Reproduce: 
create class MyClass
{code}
public MyClass {
  public MyClass (){}
  public MyClass (String n){setName(n);}
  String name;
  public String  getName() {
    return name;
  }
  public String  setName(String n) {
    this.name = n;
  }
}
{code}
and bean class
{code}
@ManagedBean
@SessionScoped
public class MyBean {
   public DataModel<MyClass> getListDM() {
      reuturn new ListDataModel<>(getList());
   }

   public List<MyClass> getList() {
      List<MyClass> res = new ArrayList<>();
       res.add(new MyClass("a"));
       res.add(new MyClass("b"));
       res.add(new MyClass("c"));
       return res;
   }
}
{code}
and use xhtml code 
{code}
<h:dataTable var="item" value="#{bean.listDM}">
 <h:column>
    <h:outputText
	value="#{item.name}" />
 </h:column>
</h:dataTable>
{code}

  was:
create class MyClass
public MyClass {
  public MyClass (){}
  public MyClass (String n){setName(n);}
  String name;
  public String  getName() {
    return name;
  }
  public String  setName(String n) {
    this.name = n;
  }
}
and bean class
@ManagedBean
@SessionScoped
public class MyBean {
   public DataModel<MyClass> getListDM() {
      reuturn new ListDataModel<>(getList());
   }

   public List<MyClass> getList() {
      List<MyClass> res = new ArrayList<>();
       res.add(new MyClass("a"));
       res.add(new MyClass("b"));
       res.add(new MyClass("c"));
       return res;
   }
}
and use xhtml code 
<h:dataTable var="item" value="#{bean.listDM}">
 <h:column>
    <h:outputText
	value="#{item.name}" />
 </h:column>
</h:dataTable>


    
> Code completion on item with h:dataTable fails if value point on datamodel object 
> ----------------------------------------------------------------------------------
>
>                 Key: JBIDE-12614
>                 URL: https://issues.jboss.org/browse/JBIDE-12614
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: jsp/jsf/xml source editing
>    Affects Versions: 3.1.1
>         Environment: Windows 7, Eclipse Juno
>            Reporter: Piotr Bezpalko
>            Assignee: Alexey Kazakov
>            Priority: Minor
>
> When using data model object (eg. javax.faces.model.ListDataModel<MyClass> -  bean.listDM) and h:dataTable (or rich:dataTable) Eclipse warns me on item presentation #{item.name) '"name" cannot be resolved'.
> {code}
> <h:dataTable var="item" value="#{bean.listDM}">
>  <h:column>
>     <h:outputText
> 	value="#{item.name}" />
>  </h:column>
> </h:dataTable>
> {code}
> If I change bean.listDM on bean.list (java.util.List<MyClass>), then no warning is displayed.
> After deployment both of version works fine.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list