> I am new to struts and have a basic question regarding bean
>
> I am collecting some data(its a plain java bean) in an 'Action'
> from database and want to show that data on a jsp page from where
> it can be edited and submitted to some other 'Action' in the form
> of 'ActionForm'
>
> I want to know what is the best approach of doing this
1. Create actions:
showMyForm.do (ShowMyFormAction class)
updateMyData.do (UpdateMyDataAction class)
2. Create ActionForm - for example MyForm class/form-name - and assign it to
updateMyData.do mapping in request scope
3. in ShowMyFormAction do something like this:
MyForm prefilledForm = new MyForm();
// ... set data from DB here
Request.setAttribute("MyForm","prefilledForm");
4. on page returned by ShowMyForm use struts HTML taglib:
<html:form action="/updateMyData.do">
<html:input property="somePropertyFromMyForm" />
...
</html:form>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]