PDA

View Full Version : PetClinic sample and the bindOnNewForm property


saturn
Aug 30th, 2005, 01:59 AM
The following code (and the comment) is from the PetClinic sample, class EditOwnerForm.java

// initialize the form from the formBackingObject
setBindOnNewForm(true);

In the same class, the formBackingObject() method is overriden to load the command (owner in this case) from the DB.

My question is do we have to set the bindOnNewForm property to true to pre-populate the form? I do not think so because that's what formBackingObject() is supposed to do and setting setBindOnNewForm to true merely bind request parameters to the command class.

Can anybody validate my thoguht? And if my statement is true, what will be the scenario where we need the BindOnNewForm being true?