There are no secrets to success. It is the result of preparation, hard work, and learning from failure.

Monday, 16 May 2016

Introduction to Fragment

Click here and follow my SAP UI5/FIORI snippets and information Page

Why fragment came into picture ?

Many times we need to show a pop up screens (Dialogs, Message Boxes etc.) to user at runtime. So in this case creating a complete view and its controller is not desirable. Hence Fragment came into the picture.

What is Fragment ?

 Fragments are light-weight UI parts,which can be re-used, defined similar to Views but do not have any controller or other behavior code involved. In case code is required and for event handler methods,they should be able to connect to existing controllers of the "owning" View.


For example - If we want to show unique details for each line then we need to create one fragment and call that fragment for each line and display the unique details. Please have a look at below screenshots for better understanding.






2 comments:

  1. Nice explanation...ur doing gr8 job..way to go bro. I can't thank u enough.

    ReplyDelete
    Replies
    1. Thanks for your valuable comment,in future you will find more useful snippets and information.Keep visiting.

      Delete