This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Read table values in Action  RSS feed

Kieran O'Callaghan
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My application stores information on courses, companies, students and results. Students can be associated to one or more companies.
On the update student page the user has the option to associate or disconsolate companies with a student.

So far I have the full list of companies listed on the update student page along with the correct the Boolean values (associated or not associated).
Also the user and associate or disassociate companies by checking or unchecking a tick box for each of the companies.
The problem I am having is in the Update Student Action, I am not able to read the company details and the boolean values from the table on the update student page.

I do not know how to save this student - company relationship in the Student Form, I have tried saving the values in the session and reading them from there but updates I make on the update student page are not picked up. Also I cannot figure out how to read directly the values on the update student jsp to the update student action.

HELP!!! I am out of ideas!
I hope my explanation is clear.
Here is a code snippet from the update student JSP. I am able to populate the table below from the DB using values I have read in the Get Student Action.

<table border ="1">
<tr><td><b>Company Name</b></td>
<td><b>Company Type</b></td>
<td><b>True or False</b></td>

<c:forEach var="c" items="${companyList}">
<td><cut value="${c.companyName}"/></td>
<td><cut value="${c.companyType}"/></td>
<td><cut value="${c.associatedWithStudent}"/></td>
<c:if test="${c.associatedWithStudent==true}">
<input checked="checked" type="checkbox" name="${c.companyName}" value="${c.companyId}" />
<c:if test="${c.associatedWithStudent==false}">
<input type="checkbox" name="${c.companyName}" value="${c.companyId}"/>

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!