CA should recognize the object type when using generics in rich:dataTable value
-------------------------------------------------------------------------------
Key: JBIDE-4903
URL:
https://jira.jboss.org/jira/browse/JBIDE-4903
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: jsp/jsf/xml source editing
Affects Versions: 3.1.0.M2
Reporter: Julien Kronegg
Priority: Minor
When having a rich:dataTable whose value is a List of objects (saying List<User>),
the suggestion completion (aka CA) is done on the var attribute and works fine:
<rich:dataTable value="#{myBean.userList}" var="_user">
<rich:column>
<h:outputText value="#{_user.name}" /> <!-- CA is done
correctly on the name property -->
</rich:column>
</rich:dataTable>
However, when having a generic List of objects, CA does not work.
This occurs for example when converting a Set<User> to a List<User> to provide
to the dataTable (due to JSF restrictions to work on List and not on Set) if the convert
function uses generics:
@Name("jsfUtils")
public class JsfUtils {
public <T> List<T> asList(Set<T> set) {
return new ArrayList<T>(set);
}
}
<rich:dataTable value="#{jsfUtils.asList(myBean.userSet)}"
var="_user">
<rich:column>
<h:outputText value="#{_user.name}" /> <!-- CA does not
work on the name property -->
</rich:column>
</rich:dataTable>
It would be nice if the type <T> is recognized as <User> by transitivity.
--
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