Grails: Edit and Delete links not working

后端 未结 1 1007
春和景丽
春和景丽 2021-01-17 03:20

I created an extra column and added icons at the end of the list for editing and deleting an event.

Here is what I have



        
相关标签:
1条回答
  • 2021-01-17 04:10
    <g:form id="${it.id}"> 
       <span class="simple">
         <g:actionSubmit class="editar" action="edit" 
                         value="${message(code:'default.button.editar.label', 
                                          default: '&nbsp;&nbsp;&nbsp;')}" />
       </span>
       <span class="simple">
         <g:actionSubmit class="eliminar" action="delete" 
                         value="${message(code: 'default.button.eliminar.label', 
                                          default: '&nbsp;&nbsp;&nbsp;')}" 
                         onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Esta seguro que desea Eliminar?')}');" />
       </span>
     </g:form>
    

    In summary: replace the value="${it.id}" in your g:form tag with id="{it.id}" and remove the hiddenField for ID. I think that will correct the problem.

    Let me know if it doesn't work...

    0 讨论(0)
提交回复
热议问题