For the second issue (JBSEAM-1916) you should do something like this
@Name("mdrCases")
| public class MdrCasesQuery extends EntityQuery {
|
| private boolean allCases;
|
| public void executeSearch() {
| String ejbql = "from MdrCase c".concat(allCases? "": " where
(c.endingTreatmentDate is null)");
| super.setEjbql(ejbql);
| }
| }
<h:commandButton action="#{mdrCases.executeSearch}" value="Search" />
Why? Well parsing the ejbql is a reasonably expensive operation so to save some
cycles you have to explicitly tell the Query that the ejbql has changed. This
reserves the refresh method for updating the result based on changed
restrictions/changed data.
I'm going to document this.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089689#4089689
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089689
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user