H
Hamvil
Hi,
I have a problem with with the struts framework. I've already looked
in the news for an answer but i've found nothing.
Basically i would like to fill a form with the data obtained from a
database. Here follow a small part of the code:
try {
actionForm = registerManager.loadProfile(id);
} catch (Exception e) {}
basically actionForm is the one passed by the execute mathod.
The method loadProfile returns an object RegisterBean (which extends
ActionForm) that contain the user data loaded from the database.
After the output is forwarded to edit.jsp, but nothing is displayed in
the form.
If for example i replace the previous code with:
((RegisterBean)actionForm).setName("Something");
everything works fine and the name is correctly displayed in the form.
It seems that by assigning to the actionForm another object the struts
environment lost the binding with the form.
Can anyone help me???
Thanks
Roberto
I have a problem with with the struts framework. I've already looked
in the news for an answer but i've found nothing.
Basically i would like to fill a form with the data obtained from a
database. Here follow a small part of the code:
try {
actionForm = registerManager.loadProfile(id);
} catch (Exception e) {}
basically actionForm is the one passed by the execute mathod.
The method loadProfile returns an object RegisterBean (which extends
ActionForm) that contain the user data loaded from the database.
After the output is forwarded to edit.jsp, but nothing is displayed in
the form.
If for example i replace the previous code with:
((RegisterBean)actionForm).setName("Something");
everything works fine and the name is correctly displayed in the form.
It seems that by assigning to the actionForm another object the struts
environment lost the binding with the form.
Can anyone help me???
Thanks
Roberto