This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes html:form tag inside logic:iterate Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "html:form tag inside logic:iterate" Watch "html:form tag inside logic:iterate" New topic
Author

html:form tag inside logic:iterate

Gizzmo Zeuzere
Ranch Hand

Joined: May 11, 2001
Posts: 45
Hello.
I have a problem with <html:form> tag that is inside <logic:iterate> tag.
Here is code :
<html:form action="Note.do?action=addNote" name="noteForm" type="note.NoteForm">
<Table>
<logic:iterate id="Note" name="noteForm" property="notes">
<TR>
<TD>
<html:hidden name="Note" property="net" indexed="true"/>
<bean:write name="Note" property="net"/>
</TD>
<TD>
<html:hidden name="Note" property="nc" indexed="true"/>
<bean:write name="Note" property="nc"/>
</TD>
<TD>
<html:text name="Note" property="note" size="16" maxlength="16" indexed="true"/><br>
</TD>
</TR>
</logic:iterate>
</Table>
<html:submit property="submit" value="MAJ"/>
</html:form>
I have a form NoteForm with a property notes (Collection).
When I initialise the page, all the information are present. But when i submit nothing have changed. It 's always the same values in the collection. Is it possible to use the same collection for getting eand setting a collection ?
What could be the problem?
Please, help.
Gizzmo
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4725

Would you mind posting your ActionForm?
I think I see what you're trying to do (and how to fix it) but it's hard to give advice without seeing the ActionForm.


A good workman is known by his tools.
Hakim Myster
Greenhorn

Joined: May 23, 2005
Posts: 1
Hello,
i have the same problem. I search for a solution if u have it !
An invoice contains many articles, I must allow to insert lines represent articles inside an invoice.

--------------
<html:form action="/saveInvoice" method="post">
<logic:iterate name="invoiceForm" property="articles" id="article">
<html:text indexed="true" name="article" property="name"/>
.....
</logic:iterate>
<html:submit/>
</html:form>
--------------

I can display values in jsp page. But when i submit form i can't obtain the new values (it isn't synchronised with the form).

Thansks.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: html:form tag inside logic:iterate
 
Similar Threads
Indexed tags and form beans
Html Radio buttons and Arraylist
List Objects in Form Bean has null values...mostly
Arraylist in JSP with Html radio
How to get results from indexed fields????