Hello there,
I have problem filtering the CB based on the selection of another CB. What am I doing wrong/missing.Please help.
I am using this version SmartClient Version: v8.3p_2014-04-23/PowerEdition Deployment (built 2014-04-23) and testing on Firefox browser version 23
This is my DSRequest output
This is my Response output
This is my ComboxItem code
and this is my DS.XML code
I have problem filtering the CB based on the selection of another CB. What am I doing wrong/missing.Please help.
I am using this version SmartClient Version: v8.3p_2014-04-23/PowerEdition Deployment (built 2014-04-23) and testing on Firefox browser version 23
This is my DSRequest output
Code:
{ dataSource:"BankBranchDS", operationType:"fetch", componentId:"isc_PickListMenu_10", data:{ fieldName:"bankid", operator:"equals", value:1 }, startRow:0, endRow:75, textMatchStyle:"startsWith", resultSet:[ResultSet ID:isc_ResultSet_11 (created by: isc_PickListMenu_10)], callback:{ caller:[ResultSet ID:isc_ResultSet_11 (created by: isc_PickListMenu_10)], methodName:"fetchRemoteDataReply" }, willHandleError:true, showPrompt:false, prompt:"Finding Records that match your criteria...", oldValues:{ fieldName:"bankid", operator:"equals", value:1 }, requestId:"BankBranchDS$62712", internalClientContext:{ requestIndex:{ Class:"Number", formatter:"toString", localeStringFormatter:"toString", localeProperties:Obj } }, fallbackToEval:false, bypassCache:true }
Code:
[ { data:[ { bankid:1, id:1, perName:"", bank:{ id:1, createdBy:1, created:null, perName:"", lastUpdated:null, engName:"M Bank", updatedBy:null }, code:"11001" }, { bankid:1, id:2, perName:"", bank:{ id:1, createdBy:1, created:null, perName:"", lastUpdated:null, engName:"M Bank", updatedBy:null }, code:"2333" }, { bankid:1, id:3, perName:"", bank:{ id:1, createdBy:1, created:null, perName:"", lastUpdated:null, engName:"M Bank", updatedBy:null }, code:"47" }, { bankid:2, id:4, perName:"", bank:{ id:2, createdBy:1, created:new Date(1405327425220), perName:"", lastUpdated:null, engName:"S Mank", updatedBy:null }, code:"474747" } ], endRow:4, invalidateCache:false, isDSResponse:true, operationType:"fetch", queueStatus:0, startRow:0, status:0, totalRows:4 } ]
Code:
bankBranchName = new CustomComboBoxItem() { protected Criteria getPickListFilterCriteria() { Integer bankid = (Integer) bankName.getValue(); AdvancedCriteria criteria = new AdvancedCriteria("bankid", OperatorId.EQUALS, bankid); return criteria; } };
and this is my DS.XML code
Code:
<DataSource ID="BankBranchDS" serverType="sql" tableName="BankBranch"> <fields> <field name="id" title="Id" type="int" primaryKey="true" /> <field name="code" title="Code" type="string" /> <field name="perName" title="Persian Name" type="string" /> <field name="bankid" type="text" hidden="true" valueXPath="bank/id" /> <field name="bank" displayField="bank" foreignKey="bank.id" /> </fields> <operationBindings> <binding operationType="add" serverMethod="add"> <serverObject lookupStyle="new" className="com.erp.server.bussinessLogic.master.BankBranchBussinessLogic" /> </binding> <binding operationType="update" serverMethod="add"> <serverObject lookupStyle="new" className="com.erp.server.bussinessLogic.master.BankBranchBussinessLogic" /> </binding> <binding operationType="remove" serverMethod="delete"> <serverObject lookupStyle="new" className="com.erp.server.bussinessLogic.master.BankBranchBussinessLogic" /> </binding> <binding operationType="fetch" serverMethod="fetch"> <serverObject lookupStyle="new" className="com.erp.server.bussinessLogic.master.BankBranchBussinessLogic" /> </binding> </operationBindings> </DataSource>
Comment