示例#1
0
 /* (non-Javadoc)
  * @see net.cbtltd.client.panel.AbstractPopup#setValue(java.lang.Object)
  */
 public void setValue(Audit audit) {
   Log.debug("setValue " + audit);
   if (audit == null) {
     onReset(Audit.INITIAL);
   } else {
     setResetting(true);
     onStateChange(audit.getState());
     id = audit.getId();
     productid = audit.getProductid();
     nameField.setValue(audit.getName());
     dateField.setValue(audit.getDate());
     ratingField.setValue(audit.getRating());
     notesField.setValue(audit.getNotes());
     setResetting(false);
   }
   center();
 }
示例#2
0
 /**
  * Shows the panel for an existing audit.
  *
  * @param audit the audit to be displayed.
  * @param parentTable the table from which the panel was invoked.
  */
 public void show(Audit audit, TableField<Audit> parentTable) {
   AuditPopup.id = audit.getId();
   AuditPopup.productid = audit.getProductid();
   AuditPopup.parentTable = parentTable;
   auditRead.execute(true);
 }