title: How to get a Control byId from a SAPUI5 Fragment
body: <p>I have a dialog which is in a Fragment. So after entering the details into it and clicking the submit button, the text which was filled into the input should be displayed as a MessageToast. But I am getting the error : ' Cannot read property 'getValue' of undefined '.</p>
  
  <p>Below is the code :</p>
  
  <pre><code>    onAddMovie: function() {
          var view = this.getView();
          var createDialog = view.byId("CreateDialog");
          var oDummyController = {
              // This is when I clicked the Submit button in dialog
              submitDialog: function() {
              var user = sap.ui.core.Fragment.byId("createDialog", "movie_name").getValue();
                  MessageToast.show(user);
                  createDialog.close();
              },
              closeDialog: function() {
                  createDialog.close();
              }
          };
  
          if (!createDialog) {
              createDialog = sap.ui.xmlfragment(view.getId(), "Admin.view.Dialog", oDummyController);
          }
          view.addDependent(createDialog);
          createDialog.open();
          if (!createDialog.isOpen()) {
              //do sth
          }
      },
  </code></pre>
  
  <p>Above is the function in which the dialog is getting displayed and after pressing submit button , the text in the input should be displayed in a MessageToast.</p>
  
  <p>XML : </p>
  
  <pre><code>        &lt;core:FragmentDefinition  xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:l="sap.ui.layout"&gt;
  
          &lt;Dialog id="createDialog" title="Input Movie Details" width="100%" class="sapuiMediumMargin" confirm="handleClose" close="handleClose"&gt;
              &lt;l:VerticalLayout class="sapUiContentPadding" width="100%"&gt;
              &lt;l:content&gt;
                  &lt;Input width="100%" placeholder="Movie Name" id="movie_name"/&gt;
                  &lt;HBox alignItems="Center" renderType="Bare"&gt;
                      &lt;Label text="Year of Release" width="50%"/&gt;
                      &lt;ActionSelect selectedItem="Element sap.ui.core.ListItem#__item0" selectedKey="item1" class="sapUiLargeMarginBegin" selectedItemId="__item0" id="__select0" width="50%"&gt;
                          &lt;items&gt;
                              &lt;core:ListItem text="2017" key="item1" id="__item0"/&gt;
                              &lt;core:ListItem text="2016" key="item2" id="__item1"/&gt;
                              &lt;core:ListItem text="2015" key="item3" id="__item2"/&gt;&lt;/items&gt;
                      &lt;/ActionSelect&gt;
                  &lt;/HBox&gt;
                  &lt;HBox alignItems="Center" renderType="Bare"&gt;
                      &lt;Label text="Date of Screening" width="50%"/&gt;
                      &lt;DatePicker class="sapUiLargeMarginBegin" width="50%" id="__picker0"/&gt;
                  &lt;/HBox&gt;
                  &lt;HBox alignItems="Center"&gt;
                      &lt;Label text="Movie Rating"/&gt;
                      &lt;RadioButtonGroup width="100%" columns="3" selectedIndex="-1" id="__group0"&gt;
                          &lt;buttons&gt;
                              &lt;RadioButton selected="true" groupName="__group0" text="Universal" id="__button0"/&gt;
                              &lt;RadioButton groupName="__group0" text="Adult" id="__button1"/&gt;
                              &lt;RadioButton groupName="__group0" text="U/A" id="__button2"/&gt;&lt;/buttons&gt;
                      &lt;/RadioButtonGroup&gt;
                  &lt;/HBox&gt;
                          &lt;HBox alignItems="Center" width="100%" renderType="Bare"&gt;
                      &lt;Label text="Enable Booking" width="70%"/&gt;
                  &lt;CheckBox id="__box0" width="30%" textDirection="LTR"/&gt;
              &lt;/HBox&gt;
                  &lt;FlexBox alignItems="End" alignContent="Center" justifyContent="End" class="sapUiTinyMarginTop"&gt;
  
  
                      &lt;SegmentedButton selectedButton="__button3" id="__button21"&gt;
                              &lt;buttons&gt;
                                  &lt;Button text="Submit" id="__submit" press="submitDialog"/&gt;
                                  &lt;Button text="Cancel" id="__button41" press="closeDialog"/&gt;&lt;/buttons&gt;
                          &lt;/SegmentedButton&gt;
                              &lt;/FlexBox&gt;
                  &lt;/l:content&gt;
              &lt;/l:VerticalLayout&gt;
          &lt;/Dialog&gt;
  
      &lt;/core:FragmentDefinition&gt;
  </code></pre>