Home Pulling out value from a Table
Reply: 0

Pulling out value from a Table

Devin Harris
1#
Devin Harris Published in 2017-12-07 21:33:47Z

For my Grails project I am loading user data into a table, the last column of the table just has buttons that say "Delete". This is for an admin page and so they can delete a user. I want to make the delete button function by pulling the username and name out of the table and being able to access that username and name in the controller so I can use other classes to delete the user out of my database(This is a school project so we are doing List). I'm not sure how to do so because it's not similar to a form where I can do something like param

<div class="container" id="Apps Table">
 <table class="table table-hover table-striped">
   <thead>
     <tr>
       <th>App Name</th>
       <th>Developer</th>
       <th>Link</th>
       <th>Category</th>
       <th>Votes</th>
       <th></th>
    </tr>
   </thead>
   <tbody>
    <g:each in="${reviewApps}">
       <tr>
         <td>${it.getAppName()}</td>
         <td>${it.getDeveloperName()}</td>
         <td>${it.getLink()}</td>
       <td>${it.getVotes()}</td>
       </tr>
     </g:each>
     <td>Snapchat</td>
     <td>Julie Dooley</td>
     <td>https://itunes.apple.com/us/app/snapchat/id447188370?mt=8</td>
     <td>Meditation</td>
     <td>1</td>
     <td> <button class="btn-info" id="View App">View App</button> </td>
     </tr>
   </tbody>
 </table>

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.300128 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO