Hi, I would like to know the proper way to use seam restriction in the code.
I used to have a way that worked in Seam 1.1.0 but it stopped working in 1.1.1 (hence must be the incorrect way to use them) | List<String> restrictions = new ArrayList<String>(); | restrictions.add("username like #{'" + value + "%'}"); | EntityQuery nameList = new MyUserList(); | nameList.setRestrictions(restrictions); | Long i = nameList.getResultCount(); | log.info("search.searchUserNames() called with count: #0", i); | and | List<String> restrictions = new ArrayList<String>(); | restrictions.add("name like #{'" + value + "%'}"); | EntityQuery clientList = new MyClientList(); | clientList.setRestrictions(restrictions); | Long i = clientList.getResultCount(); | log.info("search.searchClients() called with count: #0", i); | With the upgrade to Seam 1.1.1 the resultCount is every row in the table, so the restriction is not being used. the value comes from <h:inputText id="value" required="true" value="#{search.value}" /> I thought that it might have been the actual query so I changed it to restrictions.add("username like concat(#{search.value},'%') "); Any Help? Thanks Sean. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005687#4005687 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005687 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user