• Radek Sulc
    September 14, 2016 at 8:11 am #2634

    Dears,

    we need to have a button in table row with some code behind which updates value of a cell in the same row – actually is edit of the row at the end. It seems that the table does not react on change of values in existing rows. We tried to update the bound data, update data in the Data control with the same binding as the table – the same effect, nothing visually updated.

    The only way we have found is to update the array with data, clear the table and ${myTable}.appendElements(updatedDataArray).

    Something like:

    ${../activitiesTable}.getData().items[me.ui.getIndex()].name = “The new value”; // the update
    var tableData = fn.clone( ${../activitiesTable}.getData().items ); // defensive deep object clone via JSON parse/JSON stringify
    fn.clearTable(${../activitiesTable}); // clear the table
    ${../activitiesTable}.appendElements( tableData ) // feed in the new content

    Is there something obvious missing? Is there any way how to refresh the data (not talking about existing Table.refresh() which serves for refresh via service call from server).

    Thanks, Radek

    SPARK Support
    September 14, 2016 at 10:42 am #2635

    Hello Radek,

    I believe the method you are looking for is the getSibling() method in the bpmext.ui:

    https://support.salientprocess.com/docs/enterprise/bpmext.ui.View.html#getSibling

    With a Button control added to the table row, call me.ui.getSibling(“Control ID“).controlMethod(argument) from the On Click event. Any applicable method to the target control can be used (IE: me.ui.getSibling(“Text1”).setText(“Hello”);)

    Regards,

    Stephen P.

    Radek Sulc
    September 14, 2016 at 11:16 am #2636

    Hi Stephen, cool, sounds good. Can I somehow update the whole row at once from a temporary object of the same structure? Typical for editing row in a modal dialog.

    Thanks, Radek

    SPARK Support
    September 14, 2016 at 1:05 pm #2638

    Hi Radek,

    We have an article under our Getting Started > How-To section that diagrams a process similar to what you are looking for:
    https://salientprocess.zendesk.com/hc/en-us/articles/213236248-Achieve-Better-Performance-Within-a-Table-through-Decoupling-and-Lazy-Loading

    Please let me know if that answers the question for you.

    Regards,

    Stephen P.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Start typing and press Enter to search