Two options : either we return a json object, either a formated HTML. I've to admit I prefer the first solution and format HTML on client side in case of XMLHttpRequests