I am trying to pass a parameter along with a filterData() operation. I have an operationsBinding with a whereClause. I am using the $criteria.parameter method. I keep getting exception in postgres about unknown operator $. This is because the $criteria.parameter is not being replaced with the value. I have put in a check to is if the parameter exists and that is a certain value. If I add a Criteria with the proper value, the whereClause is executed and the error occurs. If I add a Criteria with the wrong value, there is not an error. I guess the first question is am I passing parameters correctly to the server side using Criteria? Is there a better mechanism. Specifically, I have a ListGrid that needs an addition parameter passed to the query to limit it to a certain group of records. The parameter is selected in another part of the UI.
The test binding is below...
<operationBindings>
<operationBinding operationType="fetch" serverMethod="fetch">
<serverObject className="com.smartgwt.sample.server.dmi.TreeDMI"/>
<tableClause>pro_id</tableClause>
<whereClause>
($defaultWhereClause) #if ($criteria.root == '5') AND critieria.root = pro_id.id #end
</whereClause>
</operationBinding>
</operationBindings>
what I really need to do is
<whereClause>
($defaultWhereClause) AND stored_procedure($criteria.currentRootId)
</whereClause>
Any suggestions?
The test binding is below...
<operationBindings>
<operationBinding operationType="fetch" serverMethod="fetch">
<serverObject className="com.smartgwt.sample.server.dmi.TreeDMI"/>
<tableClause>pro_id</tableClause>
<whereClause>
($defaultWhereClause) #if ($criteria.root == '5') AND critieria.root = pro_id.id #end
</whereClause>
</operationBinding>
</operationBindings>
what I really need to do is
<whereClause>
($defaultWhereClause) AND stored_procedure($criteria.currentRootId)
</whereClause>
Any suggestions?
Comment