Search Support
-
Per VedinApril 7, 2017 at 7:14 am #4103
Hi,
I’m having a issue with the ServiceDataTable component, I use it to render a list of notes.
I’ve attached a number of images to this post named noteX.png where X is a number. I’ll be refering to those in my post.
By page I mean the current list of notes when using the pager feature of this component.
So, here is my issue:
In note1.png there are 6 notes, note number 1 is on page2. (only showing 5 per page)
If I add note number 7, it appears first in the list and note 2 moves to page 2. That works ok.
But if I then go to page number 2 and then add note number 8. In note2.png you can see the rendering of that page, it’s ok.
If I then go to page 1, in note3.png you can see the result. The page is empty…
As I can figure out. As long as I don’t use the pagination(after page has loaded) it works ok but if I start to paginate (and then add a note (record)) it seems like the component forget about the pages lower then the current page.
If I refresh the hole page the component render the notes ok, as shown in note4.png
Here is the JavaScript code I use to refresh the page after I add a note
function onAddNewTjansteanteckningResults() { var anteckningar = page.ui.get('/BOLTemplateNoMenu1/tjansteanteckning/anteckningar'); anteckningar.clear(); anteckningar.refresh(true); }
SPARK SupportApril 7, 2017 at 3:19 pm #4111Hi Per,
Please provide more information on how to reproduce the potential defect. This would include step-by-step development detail and screenshots of configuration and console output errors.
If possible, please upload a standalone .twx file to the following directory so that we can quickly replicate the issue in a test environment.
https://sftp.salientprocess.com/sharing/V0f6weEdj
Regards,
Stephen P.
Per VedinApril 10, 2017 at 3:15 am #4113Hi Stephen,
I have just uploaded a .twx file to your proveded url abowe.
You need to change the GetFilePathGSS so it points to a directory on your server. Place the proveded .xml file(A1232017.xml) into that path specified in GetFilePathGSS.
Run the Note CSHS, navigat to page 2, then add a note and then navigate back to page 1.
/Per
SPARK SupportApril 10, 2017 at 5:05 pm #4120Hi Per,
The problem here is that your function is attempting to address the controls based on the index of the record. When the table is paginated, the indexes of the UI’s are changing as they are drawn and cleared.
function onRowsLoaded(table) {
for (var row = 0; row < table.getRecordCount(); row++) {
var record = table.getRecord(row); //This is accessing the list by index correctly
var textView = table.ui.get(“text[” + row + “]”); //This is accessing the UI incorrectlyUnfortunately, the Service Data Table only allows Render As types of Simple HTML and Custom, and does not support Coach Views with formulas. The approach that I would use would be to build the List from your Service Call and use a regular Table control. This would allow you to use Formula Support for the Output Text based on the bound list variable, and some logic in the Icon On Load to set the icon for true or false.
Regards,
Stephen P.
-
|
You must be logged in to reply to this topic.