Update page include from table row action?

Is there a way to update a page include from a table row action?

I really want to use a table, not a queue.

There are no declarative mechanisms to pass the query string into a page include and refresh the include.  What we would reccomend would be to put your detail content on the same page with your table.  The models for your detail should not load any data on page load, and should have filterable conditions to narrow down to the same single record from your table row.  

Then in your table row - the row action should activate the conditions in the detail models and requery those models.  This will show the detail associated with the row in the table. 

Hope this works… 

Thanks, Rob. I’ve done what you were describing before… I was just hoping not to have to recreate the detail pages.

Off to copy and paste some XML! :slight_smile:

It sounds like you’re attempting something similar to the Case Management page on the repo.
I’m about to try a similar concept and I’ll see if I can’t update the javascript that does the “View Case” work.

var detailModel = skuid.model.getModel(‘CaseDetail’); var detailCommentsModel = skuid.model.getModel(‘CaseDetailComments’); var detailTasksModel = skuid.model.getModel(‘CaseDetailTasks’); var detailCondition = detailModel.getConditionByName(‘CaseId’); var detailCommentsCondition = detailCommentsModel.getConditionByName(‘CaseId’); var detailTasksCondition = detailTasksModel.getConditionByName(‘CaseId’); detailModel.setCondition(detailCondition,args.item.row.Id,true); detailCommentsModel.setCondition(detailCommentsCondition,args.item.row.Id,true); detailTasksModel.setCondition(detailTasksCondition,args.item.row.Id,true); skuid.model.updateData([detailModel,detailCommentsModel,detailTasksModel]);

That case management page was built before we had the action framework. The javascript in that page is now really not necessary when you chain together a number of actions. 

For the record I managed to get at some Javascript methods that can be used for this. I have a page include that I need to update with different pages and query strings depending on what search result is clicked on. “include” is the unique id of the page include.

var params = arguments[0], $ = skuid.$;<br>var row = params.row; //get the page include JS object<br>var pageInclude = $('#include').data('object');<br>var pageName, queryStr;<br>switch(row.attributes.type){<br>&nbsp; &nbsp; case "Utility_Account__c":<br>&nbsp; &nbsp; &nbsp; &nbsp; pageName = 'UtilityAccountDetail_Widgets';<br>&nbsp; &nbsp; &nbsp; &nbsp; queryStr = 'id=' + row.Id;<br>&nbsp; &nbsp; &nbsp; &nbsp; break;<br>&nbsp; &nbsp; case "Account":<br>&nbsp; &nbsp; &nbsp; &nbsp; pageName = 'AccountFinanceTeam';<br>&nbsp; &nbsp; &nbsp; &nbsp; queryStr = 'id=' + row.Id;<br>&nbsp; &nbsp; &nbsp; &nbsp; break;<br>&nbsp; &nbsp; case "Lead":<br>&nbsp; &nbsp; &nbsp; &nbsp; pageName = 'LeadDetail';<br>&nbsp; &nbsp; &nbsp; &nbsp; queryStr = 'id=' + row.Id;<br>&nbsp; &nbsp; &nbsp; &nbsp; break;<br>&nbsp; &nbsp; case "Contact":<br>&nbsp; &nbsp; &nbsp; &nbsp; pageName = 'UtilityAccountDetail_Widgets';<br>&nbsp; &nbsp; &nbsp; &nbsp; queryStr = 'id=' + row.Id;<br>&nbsp; &nbsp; &nbsp; &nbsp; break;<br>} //set the page to load<br>pageInclude.pagename = pageName; //set the querystring params<br>pageInclude.querystring = queryStr; //load the page<br>pageInclude.load();


That’s pretty cool, Moshe. I’ve spent the Christmas break playing around with single page app concepts and page includes in Skuid and this might come in rather handy. Thanks for sharing.