PDA

View Full Version : How to learn what line it is active for "gui:dataTable"



svSeba
Jan 24th, 2011, 10:25 AM
Hello)

The viewcode:


<gui:dataTable
controller="user" action="shTableJSON"
columnDefs="[
[key:'id',label:'ID',resizeable: true],
[key:'name',label:'Name', formatter:'text',
editor:[controller:'user', action:'shTableChange', config:[disableBtns:true]],
sortable:true, resizeable: true],

]"
<g:actionSubmit value="Submit" />

/>


Code for editing: (It works)


def shTableChange = {
def pshift = Shift.get(params.id)
pshift."$params.field" = params.newValue
pshift.save()
render "success"
}


Delete,Create of an active element:


def Submit = {
"How to learn what line it is active for "gui:dataTable" ????"
}

Please help me!

svSeba
Jan 25th, 2011, 05:24 AM
I could solve a problem. I can share a code)