title: Bind many HashMaps to TableView
body: <p>I have some <code>HasMap</code>s in my app (2,3,4 or even 20) to keep things structured for faster "random" access. And I need to show values of all <code>HashMap</code>s in the <code>TableView</code> and keep tracking changes. I have no idea how to achieve this, so I tried this:</p>
  
  <p>As I tested, in Java, all objects passes by reference. <code>ObservableList</code> is the list of references, <code>HashMap</code> full of references too, as I thought. So, I made this thing:</p>
  
  <p>As object is added to <code>HashMap</code> as value of new entry, it must also be added to the <code>ObservableList</code>, like so:</p>
  
  <pre><code>class MyVeryOwnHashMap extends HashMap&lt;String, MyObject&gt; {
  
      private final ObservableList&lt;MyObject&gt; list;
  
      public MyVeryOwnHashMap(ObservableList&lt;Object&gt; list) {
          this.list = list;
      }
  
      public MyObject put(String key, MyObject value) {
          this.list.add(value); // As list was passed by reference, we have original list
          return super.put(key, value); // Adding to this hashmap also
          // value is the reference, so placed object is the same in both places
      }
  
      public MyObject remove(String name) {
         MyObject removed = super.remove(name);
         this.list.remove(removed); // Remove object from global list also
  }
  </code></pre>
  
  <p>Things becomes simple: </p>
  
  <pre><code>ObservableList&lt;MyObject&gt; gList = FXCollections.observableList();
  MyVeryOwnHashMap hashMap = new MyVeryOwnHashMap(gList);
  
  JavaFXTable.setItems(gList);
  
  MyObject obj = new MyObject("someNameProperty", "someValueProperty");
  hashMap.put("objID", obj); // Now object shown on the GUI table as new row
  
  ["...Here is some chunk of meaningless code..."]
  
  // Try to change some things
  MyObj objWillChange = hashMap.get("objID"); // Should we get a reference to the same object?
  objWillChange.setValueProperty("someOtherValue"); // Internally, each property is the SimpleStringProperty object
  </code></pre>
  
  <p>I wish to see the result of my gorgerous idea, but nothing happens! In the table still shown old <code>someValueProperty</code> :( As I said, my application can have alot of such <code>HashMap</code>s, I still have no idea, what I should to do.</p>