title: Refresh rows in table, which are created from factory function (SAPUI5)
body: <p>How can I "refresh" the data in rows inside a table? I know, that the table is refreshed, when the model is getting changed. But the problem is, that the rows are created by a factory method. The code for the rows looks like this:</p>
  
  <pre><code>formatter : function(text, id) {
                      if (text != null &amp;&amp; id != null) {
                          if (this.getProperty("showId")) {
                              return text + " ( " + id + " )";
                          } else {
                              return text;
                          }
                      }
  
                      return "";
  </code></pre>
  
  <p>So, when I click on a button "hide ID" the property is getting changed and the table should be refreshed so that the content is built new. How can I do this? I checked the method <code>.refresh()</code> but this didn't work.</p>
  
  <p>EDIT:
  This is my column with the factory function:</p>
  
  <pre><code>columns : [ new sap.ui.table.Column({
              label : "XYZ( ID )",
              filterProperty : "SHORT_TEXT",
              template : new sap.m.Label().bindProperty("text", {
                  parts : [ {
                      path : "SHORT_TEXT",
                      type : new sap.ui.model.type.String()
                  }, {
                      path : "ID",
                      type : new sap.ui.model.type.String()
                  } ],
                  formatter : function(text, id) {
                      if (text != null &amp;&amp; id != null) {
                          if (this.getProperty("showId")) {
                              return text + " ( " + id + " )";
                          } else {
                              return text;
                          }
                      }
  
                      return "";
  
                  }.bind(this)
              })
          })
  </code></pre>
  
  <p>This is the method, which changes the property:</p>
  
  <pre><code>onShowHideIdRequest : function(oControlEvent) {
      if (oControlEvent.getParameter("pressed")) {
          this.setProperty("showId", true);
          sap.ui.getCore().byId("oShowHideIdButton").setIcon("sap-icon://show");
      } else {
          this.setProperty("showId", false);
          sap.ui.getCore().byId("oShowHideIdButton").setIcon("sap-icon://hide");
      }
  
      sap.ui.getCore().byId("oTreeTable").rerender();
  },
  </code></pre>
  
  <p>And the the property looks like this inside my component:</p>
  
  <pre><code>metadata : {
      properties : {
          showId : {
              type : "boolean",
              defaultValue : true
          }
      },
  </code></pre>
  
  <p>The "oTreeTable" ID refers to a <code>sap.ui.tableTreeTable</code>
  I thought for a few days this all works fine, I don't know what's no wrong ...</p>