Hi,
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
<g:form value="${it.id}">
<g:hiddenField name="id" value="${it.id}" />
<span class="simple"><g:actionSubmit class="editar" action="edit" value="${message(code: 'default.button.editar.label', default: ' ')}" /></span>
<span class="simple"><g:actionSubmit class="eliminar" action="delete" value="${message(code: 'default.button.eliminar.label', default: ' ')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Esta seguro que desea Eliminar?')}');" /></span>
</g:form>
I wrote The ID is ${it.id}
and it recognizes it and gives me the ID number, so I don't know where the problem is. Any help would be highly appreciated. Thanks.
Update
So I figured the mistake was in the controller where edit and delete are defined
def edit = {
def entryInstance = Entry.get(params.id)
if (!entryInstance) {
flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'entry.label', default: 'Proyecto/Ruta'), params.id])}"
redirect(action: "list")
}
else {
return [entryInstance: entryInstance]
}
}
I think since it says params.id in the get parameters I not working right, what other alternatives do I have??