refresh (callback, errorCallback)
callback. Callback procedure
errorCallback. Callback procedure when the method is executed with errors.
The refresh method refreshes repository connection.
Executing the example requires a created connection to repository named mb (see Example of Creating the DimensionCombo Component). Add a button clicking which refreshes the repository connection:
var button = new PP.Ui.Button(
{
Content: "Refresh connection",
Click: function ()
{
mb.refresh()
},
ParentNode: document.getElementById("div1")
})
mb.Refreshed.add(function (sender, args)
{
alert("Connection is refreshed");
//flush query cache
mb.flushCache();
})
After executing the example clicking the button refreshes the repository connection. Query cache is cleared and the "Connection Refreshed" message pops up.
See also: