title: SAPUI5 add dialog and bind actions
body: <p>I have this app, which is split into 2 parts (master, details). How can i add new elements such as buttons and bind actions for them? Should i using jquery or sapui5 has some own methods?</p>
  
  <p>How to bind action (clicking 'Add to cart button' (sap.m.Dialog)) with form (sap.ui.layout.form.SimpleForm) and when form is filling and submitted, new category and number of category (to the content attribute) should append to existing list.</p>
  
  <p>that is code of my example: </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&gt;
          &lt;meta charset="UTF-8"&gt;
  
          &lt;title&gt;Просмотр товара&lt;/title&gt;
  
          &lt;style type="text/css"&gt;
              /* все элементы VBox'a с шириной во всю строку */
              #myView2--idVBox &gt; div {
                  width: 100%;
              }
          &lt;/style&gt;
  
          &lt;!-- src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js" --&gt;
  
          &lt;script
              id="sap-ui-bootstrap"
              type="text/javascript"
              src="https://sapui5.hana.ondemand.com/sdk/resources/sap-ui-core.js"
              data-sap-ui-theme="sap_bluecrystal"
              data-sap-ui-libs="sap.m"
              data-sap-ui-xx-bindingSyntax="complex"
          &gt;
          &lt;/script&gt;
  
          &lt;!-- Страница выбора категории --&gt;
          &lt;script id="view1" type="sapui5/xmlview" &gt;
              &lt;mvc:View
                  controllerName="local.controller.Master"
                  xmlns="sap.m"
                  xmlns:sap.ui.core="sap.ui.core"
                  xmlns:mvc="sap.ui.core.mvc" &gt;
                  &lt;Page id="page" title="Выбор категории" showFooter="true"&gt;
                      &lt;headerContent&gt;
                          &lt;Button icon="sap-icon://cart" tooltip="Add to cart" /&gt;
                      &lt;/headerContent&gt;
                      &lt;subHeader&gt;
                          &lt;Toolbar id="searchBar" &gt;
                              &lt;content&gt;
                                  &lt;SearchField id="searchField" width="100%" placeholder="Поиск ..." showRefreshButton="true" /&gt;
                              &lt;/content&gt;
                          &lt;/Toolbar&gt;
                      &lt;/subHeader&gt;
                      &lt;content&gt;
                          &lt;List id="categoryList" noDataText="Нет данных"&gt;
                              &lt;items&gt;
                                  &lt;StandardListItem type="Active" counter="5" title="Category 1" press=".pressExample"/&gt;
                                  &lt;StandardListItem type="Active" counter="2" title="Category 2" press=".pressExample"/&gt;
                                  &lt;StandardListItem type="Active" counter="4" title="Category 3" press=".pressExample"/&gt;
                                  &lt;StandardListItem type="Active" counter="7" title="Category 4" press=".pressExample"/&gt;
                              &lt;/items&gt;
                          &lt;/List&gt;
                      &lt;/content&gt;
                      &lt;footer&gt;
                          &lt;Toolbar&gt;
                              &lt;content&gt;
                                  &lt;ToolbarSpacer /&gt;
                                  &lt;Button text="Создать категорию" icon="sap-icon://add" /&gt;
                              &lt;/content&gt;
                          &lt;/Toolbar&gt;
                      &lt;/footer&gt;
                  &lt;/Page&gt;
              &lt;/mvc:View&gt;
          &lt;/script&gt;
  
          &lt;!-- Детальная страница --&gt;
          &lt;script id="view2" type="sapui5/xmlview"&gt;
              &lt;mvc:View
                  controllerName="local.controller.Detail"
                  xmlns="sap.m"
                  xmlns:sap.ui.core="sap.ui.core"
                  xmlns:mvc="sap.ui.core.mvc" &gt;
                  &lt;Page id="page" navButtonPress="handleNavButtonPress" title="{Name}" showNavButton="{device&gt;/isPhone}"&gt;
                      &lt;content&gt;
                          &lt;ObjectHeader title="Laptop Case" number="78.99" numberUnit="EUR" introActive="false" titleActive="false" iconActive="false"&gt;
                              &lt;attributes&gt;
                                  &lt;ObjectAttribute text="Red point stories" active="false" /&gt;
                                  &lt;ObjectAttribute text="Laptop Case with many room for pencils and other stationaries" active="false" /&gt;
                                  &lt;ObjectAttribute text="789g" active="false" /&gt;
                              &lt;/attributes&gt;
                              &lt;firstStatus&gt;
                                  &lt;ObjectStatus text="Доступен" state="Success" /&gt;
                              &lt;/firstStatus&gt;
                          &lt;/ObjectHeader&gt;
                          &lt;VBox id="idVBox" direction="Column" alignItems="Center"&gt;
                              &lt;items&gt;
                                  &lt;IconTabBar
                                      expanded="true"
                                      width="100%"
                                      id="idIconTabBar"
                                      class="sapUiResponsiveContentPadding"&gt;
                                      &lt;items&gt;
                                        &lt;IconTabFilter
                                          icon="sap-icon://begin"
                                          iconColor="Positive"
                                          design="Horizontal"
                                          count="7 из 14"
                                          text="Confirm Ok"
                                          key="Ok" /&gt;
                                        &lt;IconTabSeparator icon="sap-icon://open-command-field" /&gt;
                                        &lt;IconTabFilter
                                          icon="sap-icon://compare"
                                          iconColor="Critical"
                                          design="Horizontal"
                                          count="5 из 14"
                                          text="Check Heavys"
                                          key="Heavy" /&gt;
                                        &lt;IconTabSeparator icon="sap-icon://open-command-field" /&gt;
                                        &lt;IconTabFilter
                                          icon="sap-icon://inventory"
                                          iconColor="Negative"
                                          design="Horizontal"
                                          count="2 из 14"
                                          text="Claim Overweights"
                                          key="Overweight" /&gt;
                                      &lt;/items&gt;
                                      &lt;content&gt;
                                          &lt;List &gt;
                                              &lt;headerToolbar&gt;
                                                &lt;Toolbar&gt;
                                                  &lt;Title text="Продукты" level="H2" /&gt;
                                                  &lt;ToolbarSpacer /&gt;
                                                  &lt;Button
                                                    icon="sap-icon://settings"
                                                    press="handleButtonPress" /&gt;
                                                  &lt;Button
                                                    icon="sap-icon://person-placeholder"
                                                    press="handleButtonPress" /&gt;
                                                  &lt;Button
                                                    icon="sap-icon://drop-down-list"
                                                    press="handleButtonPress" /&gt;
                                                &lt;/Toolbar&gt;
                                              &lt;/headerToolbar&gt;
                                              &lt;infoToolbar&gt;
                                                &lt;Toolbar
                                                  active="true"
                                                  press="handleInfobarPress" &gt;
                                                  &lt;Label text="This is the info bar" /&gt;
                                                &lt;/Toolbar&gt;
                                              &lt;/infoToolbar&gt;
                                              &lt;items&gt;
                                                  &lt;StandardListItem
                                                      title = "Power Projector 4713"
                                                      description = "1239102"
                                                      icon = "https://sapui5.hana.ondemand.com/sdk/test-resources/sap/ui/demokit/explored/img/HT-6100.jpg"
                                                      iconDensityAware="false"
                                                      iconInset="false" /&gt;
  
                                                  &lt;StandardListItem
                                                      title = "Gladiator MX"
                                                      description = "2212-121-828"
                                                      icon = "https://sapui5.hana.ondemand.com/sdk/test-resources/sap/ui/demokit/explored/img/HT-1071.jpg"
                                                      iconDensityAware="false"
                                                      iconInset="false" /&gt;
  
                                                  &lt;StandardListItem
                                                      title = "Hurricane GX"
                                                      description = "K47322.1"
                                                      icon = "https://sapui5.hana.ondemand.com/sdk/test-resources/sap/ui/demokit/explored/img/HT-1072.jpg"
                                                      iconDensityAware="false"
                                                      iconInset="false" /&gt;
  
                                                  &lt;StandardListItem
                                                      title = "Webcam"
                                                      description = "22134T"
                                                      icon = "https://sapui5.hana.ondemand.com/sdk/test-resources/sap/ui/demokit/explored/img/HT-1112.jpg"
                                                      iconDensityAware="false"
                                                      iconInset="false" /&gt;
                                              &lt;/items&gt;
                                          &lt;/List&gt;
                                      &lt;/content&gt;
                                  &lt;/IconTabBar&gt;
                              &lt;/items&gt;
                          &lt;/VBox&gt;
  
                      &lt;/content&gt;
                      &lt;footer&gt;
                          &lt;Toolbar&gt;
                              &lt;content&gt;
                                  &lt;ToolbarSpacer /&gt;
                                  &lt;Button text="Добавить в корзину" icon="sap-icon://add" /&gt;
                              &lt;/content&gt;
                          &lt;/Toolbar&gt;
                      &lt;/footer&gt;
                  &lt;/Page&gt;
              &lt;/mvc:View&gt;
          &lt;/script&gt;
  
          &lt;!-- Подключение страниц --&gt;
          &lt;script&gt;
              // Controller definition 4 Master
              sap.ui.controller("local.controller.Master", {
                  pressExample: function(oEvent) {
                    alert('Нажат элемент '+oEvent.getSource().getTitle());
                  }
              });
  
              // Controller definition 4 Detail
              sap.ui.controller("local.controller.Detail", {
  
              });
  
              var splitApp = new sap.m.SplitApp({
                  masterPages: [sap.ui.xmlview("myView1", {viewContent:$('#view1').html()})],
                  detailPages: [sap.ui.xmlview("myView2", {viewContent:$('#view2').html()})]
              });
  
              var shell = sap.m.Shell({
                  showLogout: false,
                  app: splitApp,
              });
  
              // oView.setModel(new sap.ui.model.json.JSONModel("https://openui5.hana.ondemand.com/test-resources/sap/ui/demokit/explored/products.json"));
  
              shell.placeAt('content');
  
  
  
          &lt;/script&gt;
  
      &lt;/head&gt;
  
      &lt;body class="sapUiBody" role="application"&gt;
          &lt;div id="content"&gt;&lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>