Reply in-Line:

Jagdish Arora wrote:

On my ActionForm, I have a lot of HTML input elements, which come from the
domain object (Shipment).  To copy them to the ActionForm (in displayPage(),
and from the ActionForm (in saveShipment()), I have quite repetitive code
such as:

// in displayPage..
form.setName (shipment.getName());
form.setEndDate (shipment.getEndDate());
..
..  // 26 such lines.

// in saveShipment..
shipment.setName (form.getName());

Beanutil.copyProperties() will handle bean names that are
exactly the same. The struts example uses it.

shipment.setBeginDate (form.getBeginName());

Bean names are different and so won't be copied.

-Rob


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to