@Test public void testCommit() { final ProxyModelManager mgr = new ProxyModelManager(); final Person p = new Person(); p.setFirst("OldFirst"); p.setLast("OldLast"); IModel<String> proxyFirst = mgr.proxy(new PropertyModel<String>(p, "first")); assertEquals(proxyFirst.getObject(), "OldFirst"); IModel<String> proxyLast = mgr.proxy(new PropertyModel<String>(p, "last")); assertEquals(proxyLast.getObject(), "OldLast"); proxyFirst.setObject("NewFirst"); proxyLast.setObject("NewLast"); assertEquals(p.getFirst(), "OldFirst"); assertEquals(p.getLast(), "OldLast"); mgr.commit(); assertEquals(p.getFirst(), "NewFirst"); assertEquals(p.getLast(), "NewLast"); }
public void commit() { for (ProxyModel<?> proxyModel : proxyModels) { proxyModel.commit(); } }
ProxyModelManager implements Serializable { public void commit() { for (ProxyModel<?> proxyModel : proxyModels) { proxyModel.commit(); } } }
ProxyModelManager implements Serializable { public void commit() { for (ProxyModel<?> proxyModel : proxyModels) { proxyModel.commit(); } }  }
ProxyModelManager implements Serializable { public void commit() { for (ProxyModel<?> proxyModel : proxyModels) { proxyModel.commit(); } }  void commit(); IModel<T> proxy(IModel<T> actual); }
ProxyModelManager implements Serializable { public void commit() { for (ProxyModel<?> proxyModel : proxyModels) { proxyModel.commit(); } }  void commit(); IModel<T> proxy(IModel<T> actual);  }