troubleshooting Question

JSP - Loop through HTML table for changes - update javabean

Avatar of vandy02
vandy02Flag for United States of America asked on
1 Comment1 Solution677 ViewsLast Modified:
I have asked for assistance on a similar question where I did get some help and was able to display a table.  However, I do not know how to loop through the html table and then send the changes to get updated.
This is my previous question: JSP - Edit table containing Beans / XML
This is where I got started:

I was told to loop through the table and find those that are checked.  Then send the information to my JavaBean

          <TH><input type="checkbox" name="masterChk"/></TH>


      java.util.Iterator folio = portfolio.getPortfolio();
      Stock stock = null;
      int recordCnt = 0;      
      while (folio.hasNext())
            stock = (Stock);
            String stockSymbol = stock.getSymbol();
            String stockName = stock.getName();
            Float stockPrice = stock.getPrice();
                  <TD><input type="checkbox" name="chk<%=recordCnt%>" value="<%=stockSymbol%>"/></TD>
                  <TD><input type=text name="stockPrice<%=recordCnt%>" value="<%=stockPrice%>"></TD>
Murali Murugesan
Full stack Java developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros