Search Support
-
Saroj PandaDecember 16, 2016 at 8:22 am #3308
I have a custom implementation where I’m adding new row (extra information) for each row on a button (in the row) click. The implementation is working properly untill I click on the sort option on one of the column, which hides the custom rows. I want to figure out how I can listen to the sorting event done by the table control and then add my code to show the extra information row back in the table.
Regards,
Saroj
SPARK SupportDecember 16, 2016 at 10:15 am #3314Hi Saroj,
I would like to get some more information on your configuration and take a look at your code.
Since you are an Enterprise subscriber, I have created a ticket for you, and I would like to get your BPM and SPARK version.
Regards,
Stephen P.
Saroj PandaDecember 28, 2016 at 1:42 am #3354Hi Stephen,
I have explored the Row Loaded event but it’s at table level and not for each row or cell. I have tried exploring the custom cell rendering, but again that is not triggering again after sorting the table.
So finally I managed to write the public function in my coach view and I’m calling that public function for each instance of the component on the Row Loaded event. Below is the script for reference
Script in Table On Row Loaded event
bpmext.ui.forEachViewSibling(me.ui.get(“Table_Extra_Info1”), function(v){v.handleRowReload()});Function declared in the inline javascript of the Table Extra Info coach view
this.handleRowReload = function() {
//console.log(“Row load from table handled inside coachview :” + _this.context.element.id);
if(visibleFlag) {
//console.log(“Extra info will be rendered back for :” + _this.context.element.id);
showExtraRow()
}
}Attached is the end result of the table what we were expecting. Extra Info Well section is component in last column, which will expands on click of More button.
BPM 8.5.7, Spark 4.4.5 EE
Regards,
SarojSaroj PandaDecember 28, 2016 at 8:05 am #3365Can I move this topic to the SPARK UI Cases forum. Now while exploring that forum, I think this will best suit there 🙂
Regards,
Saroj
SPARK SupportDecember 28, 2016 at 12:30 pm #3371Hi Saroj,
I moved your post to the SPARK UI Cases forum.
About the Sort listener, you may want to try running your table, open the console, and input:
var nodeList = document.querySelectorAll(‘[id^=”tbl_”]’);
This will return a list of the elements starting with tbl_ id. Those which end in .sortable have an event listener.
In my test harness, I was able to see the event listener with getEventListeners(tbl_2_26641_0) in the console. There are also methods for removeEventListener() and addEventListener(). http://www.w3schools.com/js/js_htmldom_eventlistener.asp
Regards,
Stephen P.
Saroj PandaJanuary 5, 2017 at 3:05 am #3437The implementation for which I was exploring this is already achived but I will surely explore this 🙂
Thanks,
Saroj
-
|
You must be logged in to reply to this topic.