Skip to Content
0
Former Member
Jul 28, 2016 at 08:44 AM

View or fragment with controller

52 Views

Hi,

I created a main view to which I have to add a panel that has its own controller, controller different view. I thought about introducing the panel in a View or a fragment and then add it to the main View, what would be the best option?

I have two options:

1. Create a view with sap.ui.xmlview (the controller be indicated in the View)

2. Create a fragment with sap.ui.xmlfragment (the controller be a parameter of this function)

In principle I opted more for the first option. Because the natural behavior of the fragments is not having a controller associated, but depend on the controller of View, what do you think?

Regards.