Skip to Content

MultiComboBox using factory function in table control row

We have created multiple rows in a table control for various type of inputs like, textarea, input field, select, multicombo using factory function. When the data in any of the bound cells is changed, factory function is re-rendering itself to generate the whole table.

Question 1: Is there a way to avoid this behavior? Re-rendering is not neccessary and is taking time and resources.

It happens very fast on input and select, but in case of multicombo, there is an issue. As soon as we update the selected key of multicombo with one checkbox, it starts to re-render itself. The user now has to open the multicombo multiple times to select multiple values

Question 2: Is there something in the multicombo factory function which we can use to avoid this behavior. User community is saying this is unacceptable.

SAP documentation says the below for factory functions in the following link:

The aggregated elements are destroyed and recreated whenever the bound list in the data model is changed. This is true in our case because selection of values is changing the bound model. The requirement is to create a dynamic table with different input controls as rows. The number of entries are around 60-70 in number. Everything works well but we have this re-rendering issue.

https://help.sap.com/doc/saphelp_uiaddon10/1.17/en-US/91/f057786f4d1014b6dd926db0e91070/content.htm?no_cache=true

Any pointers are welcome. Thank you.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 03, 2018 at 03:53 PM

    Hi Ganesh,

    My suggestion is to create a custom control by reusing your factory function or just the multicombo, and override the updateAggregation method of ManagedObject class, to defer/cancel re-rendering . Just be mindful of any validation that happened on auto re-render. However, fyi, the method addAggregation of ManagedObject has a flag bSuppressInvalidate to mark children not changed, which doesn't re-render the items.

    Hope that helps.

    Thanks,

    Rajit

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 04, 2018 at 10:10 AM

    Thank you Rajit. This seems to be working fine.

    Add comment
    10|10000 characters needed characters exceeded