Okay forget the beanutils...

<form-property name="fullname" type="java.lang.String" />

theForm.set("fullname",registerDTO.getFullname());

..or

<form-property name="mybean" type="cz.chalu.struts.modules.completeregister.ComplRegisterDTO" />

theForm.set("mybean", registerDTO);


Hope this gets you there..


Mark

On Sunday, August 31, 2003, at 05:24 PM, Jiri Chaloupka wrote:

Yes, nested tags, I must look at ...
so now I have it without nested, form definition is now without it.

but still I got

java.lang.IllegalArgumentException: No destination bean specified
at org.apache.commons.beanutils.BeanUtils.copyProperties(BeanUtils.java:22 0)
at cz.chalu.struts.modules.completeregister.LoadDataAction.execute(LoadDat aAction.java:32)


What is missing? I my action class (execute method) I have:

public ActionForward execute(...){
LoadDataService service = new LoadDataService();
ComplRegisterDTO registerDTO = service.loadUser(request);
BeanUtils.copyProperties(form, registerDTO);
return null;
}

If I understand well, in BeanUtils.copyProperties I copy data from DTO into form defined in execute method?
Or something other is wrong?


Thanks


Mark Lowe wrote:


Okay assuming the following..

<form-bean name="registerFull" type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="id" type="java.lang.Integer" />
<form-property name="fullname" type="java.lang.String" />
<form-property name="notify" type="java.lang.Integer" />
</form-bean>


..

<html:text property="fullname" />
<html:text property="id" />
<html:text property="notify />

or if you are nesting you bean which in that case i wouldn't (too short).

<form-property name="mybean" type="cz.chalu.struts.modules.completeregister.ComplRegisterDTO">

Then assuming that fullname, id, and notify are all properties of ComplRegisterDTO.

<html:text property="mybean.fullname" />
<html:text property="mybean.id" />
<html:text property="mybean.notify" />

Cheers Mark






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



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



Reply via email to