A lot of people say that this is asked too much in the comments, which made me hesitant to ask this, but I still have not found a solution in their answers, mostly because (
I belive you wanted something like that
function handleAjaxRequest(params) {
var context = {'b':'inner', 'c': params['c']};
function rendered(html) {
// render
}
function gotPart(part) {
context['a'] = part;
engine.render(context).addCallback(rendered);
}
ajax.getPart(params).addCallback(gotPart);
}