Hi @ all,

 

I stuck on a problem. I don’t now how to prepoulate a Actionform. What I’m doing is this:

 

On my showFVKNAdminAction I receive a value from the previous ActionForm and put it in the request so that the next handleFVKNAction have this value.

I also put a attribute in the request so that the handleFVKNAction knows that it has to act like a “show” action not like a “update” action. Then I get the my values that are relevant for me out of the database. I put this List into my Viewmodel and the handleFVKNForm. Then I forward to the jsp.

 

In the JSP I get my Viewmodell and show my values on my page with the logic:iterate tag

<bean:define      id="fvknList"

                        name="FVKN"

                        property="fvknList"

                        scope="session"

                        type="java.util.List"/>

 

 

 

 

html:form action="/handleFVKNAction" method="post" >

            <logic:iterate name="fvknList" id="line" indexId="lineNo" type="FVKN">

                 

                  <tr>

                        <td><%=lineNo.intValue()+1%></td>

                        <td><bean:write name="line" property="fieldName"  filter="true" /></td>

..

..

..

 

This works so far.

 

But when I hit the submit button the handleFVKNForm is empty. Why is that so?

What I want is to get my List from the database, display it on the jsp page and if the submit button will be pressed it should update this list in my database.

I think my failure is, that this fvknList is from my Viewmodel but I should get it from my prepopulated form bean, right? But obviously I don’t know how to do that

 

Any suggestions for a better way to solve this problem?

 

Reply via email to