Hello, using SmartGWT 3.0 Power,
I have an operationbinding that deletes all rows from a certain student, like so.
According to these docs http://www.smartclient.com/smartgwte...mQuerying.html, i should be able to user $values.students_id right?
My Client side code triggering this operatin is like so:
This is what the logs say:
What am I missing / doing wrong?
I have an operationbinding that deletes all rows from a certain student, like so.
Code:
<operationBinding operationType="remove" requiresAuthentication="true" requiresRole="CAN_DELETE_COURSEOPTIONSELECTION" operationId="DeleteOldSelection" allowMultiUpdate="true">
<whereClause>students_id='$values.students_id'</whereClause>
</operationBinding>
My Client side code triggering this operatin is like so:
Code:
DataSource selDs = DataSource.get("CourseOptionSelection");
DSRequest req = new DSRequest();
req.setOperationId("DeleteOldSelection");
String id = record.getAttribute("students_id");
Record r= new Record();
if(id == null || id == ""){
Log.warn("No row selected, not running the save, since everything would be deleted.");
return;
}
r.setAttribute("students_id", id); //currently selected record
selDs.removeData(r, new DSCallback(){
public void execute(DSResponse response, Object rawData, DSRequest request) {}
},req);
This is what the logs say:
Code:
=== 2012-01-05 19:06:27,716 [l0-6] INFO SQLDriver - [builtinApplication.DeleteOldSelection] Executing SQL update on 'Mysql': DELETE FROM CourseOptionSelection WHERE students_id='$values.students_id'
Comment