> The JavaBeans spec defines indexed getters and putters only for things
> that pass and return arrays, not Lists. Therefore, this isn't going to
> get recognized as a property by the standard introspector.
>
> Commons-beanutils tries to extend the model so that you can use List-based
> properties like this, but looks like it doesn't cover this particular use
> case. Could you please post a bug with a small example that illustrates
> it?
Done.
Another question on this same topic. How would I create a custom converter
that changes my POJOs into ActionForms? Currently, I do this the
(seemingly) hard way:
// get HSCRFMaster (with children) from persistence layer
HSCRFMasterDAO formDAO = factory.createHSCRFMasterDAO();
HSCRFMaster h = formDAO.getHSCRFMaster(Long.valueOf(form.getId()));
// create form for the UI and populate
HSCRFMasterForm hscrfForm = new HSCRFMasterForm();
BeanUtils.copyProperties(hscrfForm, h);
// loop through the Mux List and use forms instead of POJOs
ArrayList muxList = hscrfForm.getMuxs();
for (int i = 0; i < muxList.size(); i++) {
HSCRFMux m = (HSCRFMux) muxList.get(i);
// create form for the UI and populate
HSCRFMuxForm muxForm = new HSCRFMuxForm();
BeanUtils.copyProperties(muxForm, m);
muxList.set(i, muxForm);
}
hscrfForm.setMuxs(muxList);
I'd love to have the copyProperties do the work of creating forms for the
children. All my ActionForms are generated using XDoclet, so they have the
same name as the POJO + the word "Form".
Thanks,
Matt
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>