Package com.tll.client.model

Examples of com.tll.client.model.ModelChangeTracker


   *        when clicked.
   */
  public EditPanel(IFieldBoundWidget fieldPanel, boolean showCancelBtn, boolean showDeleteBtn) {
    super();
    if(fieldPanel == null) throw new IllegalArgumentException("A field panel must be specified.");
    fieldPanel.setModelChangeTracker(new ModelChangeTracker());
    this.fieldPanel = fieldPanel;

    portal.setStyleName(Styles.PORTAL);
    // we need to defer this until needed model and aux data is loaded
    // portal.setWidget(fieldPanel);
View Full Code Here


  }

  @Test(enabled = true)
  public void testModelPropertyChangeTracker() throws Exception {
    final Model m = TestModelStubber.stubAddress(1);
    final ModelChangeTracker changeTracker = new ModelChangeTracker();
    for(final IModelProperty mp : m) {
      mp.addPropertyChangeListener(changeTracker);
    }
    m.getModelProperty("emailAddress").setValue("changed email");
    m.getModelProperty("address1").setValue("change address1");

    final Model changed = changeTracker.generateChangeModel(m);
    Assert.assertEquals(changed.size(), 4); // we always copy the id and version too (2 + 2)
  }
View Full Code Here

TOP

Related Classes of com.tll.client.model.ModelChangeTracker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.