Hi Isomorphic,
please see the following in changed builtInDS example (SNAPSHOT_v9.1d_2014-01-25):
animals.ds.xml
Animals.java
ac is a valid AdvancedCriteria.
But if you watch in Eclipse DevMode debug mode, "Expressions": dsRequest.getAdvancedCriteria() -> Criteria -> mCriteria -> elementData -> [0] you'll see that it is null.
This might be related to my older (client side) bug report http://forums.smartclient.com/showthread.php?t=28401.
My stack trace in the sample is:
In my app, the trace is:
Best regards,
Blama
please see the following in changed builtInDS example (SNAPSHOT_v9.1d_2014-01-25):
animals.ds.xml
Code:
<serverObject lookupStyle="new" className="com.smartgwt.sample.server.listener.Animals" />
Code:
package com.smartgwt.sample.server.listener; import javax.servlet.http.HttpServletRequest; import com.isomorphic.criteria.AdvancedCriteria; import com.isomorphic.criteria.Criterion; import com.isomorphic.criteria.DefaultOperators; import com.isomorphic.criteria.criterion.IsNullCriterion; import com.isomorphic.criteria.criterion.SimpleCriterion; import com.isomorphic.datasource.DSRequest; import com.isomorphic.datasource.DSResponse; public class Animals { public DSResponse fetch(DSRequest dsRequest, HttpServletRequest servletRequest) throws Exception { AdvancedCriteria ac = new AdvancedCriteria(DefaultOperators.Or, new Criterion[] { new SimpleCriterion("lifeSpan", DefaultOperators.Equals, 20), new IsNullCriterion("status") }); dsRequest.addToCriteria(ac); return dsRequest.execute(); } }
But if you watch in Eclipse DevMode debug mode, "Expressions": dsRequest.getAdvancedCriteria() -> Criteria -> mCriteria -> elementData -> [0] you'll see that it is null.
This might be related to my older (client side) bug report http://forums.smartclient.com/showthread.php?t=28401.
My stack trace in the sample is:
Code:
=== 2014-01-26 13:12:34,089 [2-33] DEBUG DataSourceDMI - Invocation threw exception java.lang.NullPointerException at com.isomorphic.datasource.IncludeFromDefinition.isDynamicInclusion(IncludeFromDefinition.java:117) at com.isomorphic.datasource.DSRequest.buildIncludeFromDefinitions(DSRequest.java:4660) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2400) at com.smartgwt.sample.server.listener.Animals.fetch(Animals.java:18) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:975) at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:416) at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2561) ......
Code:
at com.isomorphic.datasource.IncludeFromDefinition.forField(IncludeFromDefinition.java:154) at com.isomorphic.datasource.IncludeFromDefinition.forCriteriaField(IncludeFromDefinition.java:134) at com.isomorphic.datasource.DSRequest.mapRawCriteriaFieldNames(DSRequest.java:5562) at com.isomorphic.datasource.DSRequest.getNonSqlCriteriaFields(DSRequest.java:5368) at com.isomorphic.datasource.DSRequest.hasNonSqlCriteria(DSRequest.java:5357) at com.isomorphic.sql.SQLWhereClause.getOutput(SQLWhereClause.java:328) at com.isomorphic.sql.SQLWhereClause.toString(SQLWhereClause.java:309) at com.isomorphic.sql.SQLWhereClause.getSQLString(SQLWhereClause.java:315) at com.isomorphic.sql.SQLDataSource.getClausesContext(SQLDataSource.java:2996) at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1682) at com.isomorphic.sql.SQLDataSource.processRequest(SQLDataSource.java:411) at com.isomorphic.sql.SQLDataSource.executeFetch(SQLDataSource.java:356) ......
Best regards,
Blama
Comment