Skip to Content

SAPUI5 Repeated xml fragment

Hi Expert,

I'm having such requirement whereby I need to display repeated fragment view dynamically as below screen shot. When there is a scenario of 3 blocks is selected, i need to append this fragment view accordingly to the page. The question is how can I retrieve the input dynamically since I'm not providing the element id in the fragment view? The reason I'm not insert the id in the fragment view is due to the view will append dynamically and it will get duplicate id errors if I gives the element id in the fragment view.

I've tried using domfef to get the value but unfortunately I only can get the input field for name and passport number. Relationship field is using select controller and it's not under input field category. Any idea whereby I can retrieve all the inputs dynamically?

$(pageDom).find("input").each(function(index, elem)

Thanks.

Regards,

-Ben-

1.png (14.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Apr 12 at 04:30 AM

    Hi Ben,

    you do not really need a fragment here to fulfill your requirement, you can add a simple form inside a list and bind a model to it, by this you can capture all the data in the model.

    here is an example for your reference, where all the dynamic data is stored in the model and fetched when needed.

    Note: make sure you add some users before you press "get all data" in the example.

    regards

    GB

    Add comment
    10|10000 characters needed characters exceeded