Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 72416

How to bind the Thymleaf table column value to Java bean object

$
0
0

I have calculated the sum of the column of the table in jQuery and return the total value to thymeleaf view. How can i set the total value to in a Java model object.

JQuery Code:

$(function(){

       var grandTotal= 0;
       $("[id*=BuildingAsf]").each(function(){
           grandTotal=grandTotal+parseFloat($(this).html());
         //  alert( $( this ).text() );
       });

       totalBuildingAsf.html(grandTotal);
   });                       

HTML Code :

`<tr><td th:text="#{apx1_p1_pu_row_1_lbl}"></td>
 <td id="total-Building-asf" class="total-Building-asf" th:text="*{entityDetailRow.totalAsfBuilding.formattedValue}"></td></tr>`  

Viewing all articles
Browse latest Browse all 72416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>