I’m doing a Java ee “online shop” project for my uni, and one of the requirements is that an admin user should be able to edit products details.
I have a html table that represents all products in my online store. The content for the table is taken from the database table.
It looks like:
<forEach var="product" items="${productList}" varStatus="iter">
<tr class="${((iter.index % 2) == 1) ? 'lightBlue' : 'white'} tableRow">
<td>${product.name}</td>
<td>${product.price}</td>
<td>${product.description}</td>
</tr>
</foreach>
Is there a way of editing data in my database table, using this html table without such things as JavaScript?
Not from a static html table per say that I know of, but you could provide a button that says edit, which leads to opening of an HTML form for your needs –
http://www.w3schools.com/html/html_forms.asp
Then use POST or GET request to send the data to the server.