smartgwt operationId not working

Posted by dubreakkk on Stack Overflow See other posts from Stack Overflow or by dubreakkk
Published on 2010-05-20T19:48:24Z Indexed on 2010/05/20 19:50 UTC
Read the original article Hit count: 274

Filed under:
|

Hello all:

How do operationIds work when calling a smartGWT fetch operation? I have the following simple Datasource, and below it the code that calls that datasource. However, the operationId is never acknowledged, and the first fetch operation is always executed...

<DataSource ID="cartDS" serverType="sql" tableName="cart">
<fields>
 <field name="cart_id" type="number"/>
    <field name="price" type="double"/>
    <field name="total" type="double" customSQL="true"/>
</fields>
<dbName></dbName>
 <operationBindings>

<operationBinding operationType="fetch">
  <values fieldName="cart_id" value="$session.id"/>
</operationBinding>

<operationBinding operationType="fetch" operationId="total">
  <values fieldName="cart_id" value="$session.id"/>
  <selectClause>sum(price) AS total
  </selectClause>
</operationBinding>

 final DynamicForm totalForm = new DynamicForm();
 totalForm.setDataSource(cartDS);
  totalForm.setFetchOperation("total");
  totalForm.fetchData();

© Stack Overflow or respective owner

Related posts about smartgwt

Related posts about datasource