Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

html:form tag inside logic:iterate

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
It's a pleasure to see superheros taking such an interest in science. And this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic