I have an issue in which Typeahead simply stops working when the user federated session expires. I would like to be able to perform an action when the "remote" call for Typeahead fails. How is this handled with Typeahead in particular? Is there some sort of "error" callback like you would find in a typical ajax call? Here is the code that I currently have:
var hints = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace("value"),
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: {
url: "/ProjectAssociation/CountryLookup?query=%QUERY",
wildcard: "%QUERY"
}
});
$("#assocStoragesSelection").typeahead(null, {
name: "nations",
limit: 90,
valueKey: "ShortCode",
displayKey: "Name",
source: hints,
templates: {
empty: [
"<div class='noitems'>",
"No Items Found",
"</div>"
].join("\n")
}
});