Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Call to sub fragment within fragment


I want to call inside a general fragment to sub fragment with his own control,there is example when can I refer to ?

if there any example will MVC it could be perfect....I try to look on the net and I didnt find any example on this...

Many thanks,


Former Member

Hi Miley,

Whatever events that you want, you have to declare in the fragment definition and at the same time those should be available at the corresponding controller of view where the fragment is placed.

Consider the sample that already we have, there is radio button group (RGB). One RGB is coming from SectionA and the other is coming from SectionB. First in the fragment definition we have to add the events. In this sample, I have added a select event for the RGB of section A as 'onRadioSectionAPress' and section B as 'onRadioSectionBPress' those methods should be available in my controller where I am using the fragment.

I have edited the plunk, check the sample here - Plunker

Check Section A and Section B fragment files where I have add the events on select. And check on Home.controller.js file where I have written the logic on what needs to be done on select of radio button. For SectionA RGB, it alerts the selected item text and SectionB RGB, it alerts the selected item key.


Sai Vellanki.

1 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question