easyui refreshes the table data in the specified tab page

easyui refreshes the data in the specified tab page

Tab management is used in the home page Home/Index, and a refresh method is set in the home page.

 

/**
 * Refresh the data in the specified tab
 * @param title tab title
 * @param refreshTabFunc custom refresh method (implemented on each page)
 */
function refreshTabData(title,refreshGridFunc)
{
    if ($("#tabs" ).tabs('exists', title)) {
        $('#tabs').tabs('select' , title);
        typeof refreshGridFunc === 'function' && refreshGridFunc.call();
    }
}

 

Then the page to be refreshed can customize its own refresh method, refresh those data, etc.

I define in the list interface list.jsp:

 

window.top["reload_formList"] = function () {
    $("#formList").datagrid("reload");
};
The method is stored in the window.top property, and the name of the method is reload_formList . The specific code is written in it.

 

I updated the information in Edit.jsp, then I have to refresh the datagrid in the list tab pageTabular data.

Then write directly after editing:

window.parent.refreshTabData("Checklist",  window.top.reload_formList );

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326115906&siteId=291194637