[weld-commits] Weld SVN: r6721 - archetypes/javaee6-webapp/tags/1.0.1.Beta1/src/main/resources/archetype-resources/src/main/java.
weld-commits at lists.jboss.org
weld-commits at lists.jboss.org
Sun Jul 18 12:06:37 EDT 2010
Author: dan.j.allen
Date: 2010-07-18 12:06:36 -0400 (Sun, 18 Jul 2010)
New Revision: 6721
Modified:
archetypes/javaee6-webapp/tags/1.0.1.Beta1/src/main/resources/archetype-resources/src/main/java/MemberListProducer.java
Log:
update comment
Modified: archetypes/javaee6-webapp/tags/1.0.1.Beta1/src/main/resources/archetype-resources/src/main/java/MemberListProducer.java
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.Beta1/src/main/resources/archetype-resources/src/main/java/MemberListProducer.java 2010-07-18 14:40:03 UTC (rev 6720)
+++ archetypes/javaee6-webapp/tags/1.0.1.Beta1/src/main/resources/archetype-resources/src/main/java/MemberListProducer.java 2010-07-18 16:06:36 UTC (rev 6721)
@@ -27,7 +27,7 @@
private List<Member> members;
@Produces
- @Named // This annotation allows us to access this list via name "members" in the facelets UI via EL
+ @Named // This annotation allows us to access this list using the EL variable "members" in a JSF view (Facelets)
public List<Member> getMembers()
{
return members;
@@ -44,9 +44,9 @@
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<Member> criteria = cb.createQuery(Member.class);
Root<Member> member = criteria.from(Member.class);
- //Uncomment if you would like to try out typesafe criteria queries, a new feature in JPA 2.0.
+ criteria.select(member).orderBy(cb.asc(member.get("name")));
+ // Replace the above with the commented line below to make criteria query type-safe (depends on generated JPA 2 metamodel)
// criteria.select(member).orderBy(cb.asc(member.get(Member_.name)));
- criteria.select(member).orderBy(cb.asc(member.get("name")));
members = em.createQuery(criteria).getResultList();
}
}
More information about the weld-commits
mailing list