Created
July 20, 2012 03:02
-
-
Save tejastank/3148404 to your computer and use it in GitHub Desktop.
webatom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getrecords:function(model,domain){ | |
domain = [[1,'=',1]]; // conditional parameter to filter data from server. | |
var ids = this.rpc.db(["database_name","userid","password",model,"search", [ | |
domain,"",((this.currentpage) * this.listlimit),this.listlimit | |
]]) | |
// var field_names = _.pluck(this.ir.data.viewarch.field.tree.field ,'name'); // with form view this does not require. | |
var recs = this.rpc.db(["database_name","userid","password",model,"read", [ | |
ids | |
]]); | |
_.each(recs[0],function(value, key){ | |
$("#form_field_"+key).val(value); | |
}); | |
return recs; | |
}, | |
nextpage:function(event){ | |
++this.currentpage; | |
console.log(this.currentpage); | |
//this.render(); | |
this.getrecords(this.model,""); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment