Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

ArrayList and tags

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a form in where I have setup when a "Add Channel" button is pressed it adds to a table a new html:text field.

in my struts-config.xml I have the following:

<form-bean name="channelProcessing" type="actionForm.job.ChannelProcessingActionForm">
<form-property name="channelCollection" type="java.util.ArrayList"/>
</form-bean>

I have a bean class called ChannelProcessing.java which contains a getter and setter for a String value name channelNumber (along with other values which are used for html:text fields --- but I need to get help on this one in order for the rest to fall out).

Since there are several buttons on the page the ChannelProcessingAction extends the LookupDispatchAction class.

When the "Add Channel" button is pressed; inside the action I create a object of type ChannelProcessing and place it in the channelCollection ArrayList.

On the form I have the following logic loop:
</logic:iterate id="aChannel" name="channelProcesing" property="channelCollection">
Channel #: <html:text name="aChannel" property="channelNumber" indexed="true"/>
</logic:iterate>

However when I get to the final submit I am unable to get the value of any html:text field that was entered in.

Can anyone tell me what my mistake is?

Thanks
 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check out one of my earlier questions in struts saloon

Marc explains why the List values may not be coming thru.
 
Climb the rope! CLIMB THE ROPE! You too tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic