These are piecess jsp and javaScript Code.
<%@ taglib prefix="mvc" uri="http://www.ptc.com/windchill/taglib/jcaMvc"%><mvc:tableContainer compId="ext.reports.builder.TreeReport" height="500" /><script> function submitParameters() { var params = { number : 'variable' }; //pass new variable PTC.jca.table.Utils.reload('ext.reports.builder.TreeReport', params, true); //to reload the tree compoment and add new variable. }</script>
The javascript API 'PTC.jca.table.Utils.reload' throw exception when the store be reloaded.
//the JS file path:D:\ptc\Windchill\codebase\netmarkets\javascript\util\windchill-all-debug.js
PTC.jca.table.Utils.reload = function(id,params,removeStaleData){ //SPR 2000225. The table data gets duplicated when delete an object from folders page. if(removeStaleData === undefined){ removeStaleData = true; } var table = tableUtils.getTable(id); if (table !== null) { var selectedOnlyMenu = Ext.getCmp(PTC.jca.table.getWTablePanelID(table.id) + '.selectedOnlyViewItem'); if (selectedOnlyMenu && selectedOnlyMenu.checked === true) { selectedOnlyMenu.setChecked(false); } table.getStore().load_complete= false; table.getStore().totalLength = 0; var form = PTC.jca.table.Utils.getTableFormData(table); var formData = Ext.urlDecode(form); formData.tableID = table.id; formData.refreshTable = PTC.jca.table.Utils.getFormattedTableId(table.id); Ext.apply(formData, params); if (removeStaleData) { table.store.removeAll(); jsca.unSelectHiddenCheckboxes(id);//Remove hidden checkboxes div if we are removing data from store } table.store.fireEvent('reload'); //PTC.jca.table.Utils.reloadLegacyTable<==the function to do refreshCurrentElement table.store.on("exception", PTC.jca.table.Utils.reloadLegacyTable, null, {single:true}); table.store.reload({ params: formData, reload: true }); }};
I guess PTC.jca.table.Utils.reload is not support Tree table? I have use this funciton to reload table compoment and run correct.
Actually this issue is not big problem,Browser just to request Windchill server twice.
I try to compare first result page to second result pages.They are the same but unique Key.