• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts Indexed problem

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to submit an entire collection from an action form?
All the examples I have seen uses iterate to display data alone. In
order to edit them, you will have to click on a link to get into a
seperate form. I am wondering whether it's possible to edit the data
in an iterate. For example, I have:

TaskId webLabel value
001 Company XXX
002 Result Good

Submit Cancel

I would like to be able to edit the value figure on this form and
then pass to a ActionForm to validate the values entered and then pass it to the action class to be saved.

Currently I have:

In this jsp

<logic:iterate id="misTaskData" name="misTaskDataVec">
<tr class="trClass">
<td class="tdClass" width="291"><bean:write name="misTaskData" property="webLabel"/></td>
<td class="tdClass" width="215"><html:text name="misTaskData" property="value" styleClass="textLargeClass" />
</td>
<html:hidden name="misTaskData" property="taskSumId"/>
<html:hidden name="misTaskData" property="taskId"/>
<html:hidden name="misTaskData" property="taskFieldId"/>
<html:hidden name="misTaskData" property="webFieldSize"/>
<html:hidden name="misTaskData" property="dataType"/>
</tr>
</logic:iterate>

I need to validate the data entered which can be done in the ActionForm but i do not know how to read the individual values
Could somebody provide an example on how should I do this please?

Thank you in advance
Anil Raju
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the Frameworks forum.
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Is it possible to submit an entire collection from an action form?



Yes, you can do it.




I need to validate the data entered which can be done in the ActionForm




If you want to validate data, you can use Struts Validation Framework to validation data.
AT http://www.javaranch.com/newsletter/Mar2003/newslettermar2003.jsp#struts

but i do not know how to read the individual values



What does "the individual values" mean ??
reply
    Bookmark Topic Watch Topic
  • New Topic