javascript - How to insert spring form tag in jquery mRender -


i have table in spring form , first column checkbox each line of table. want insert spring form:checkbox, variable not replaced value. there example:

"aocolumns" : [ {                             "mrender": function ( data, type, full ) {                                 if(full.estatus!="removed"){                                     var identifier=full.identifier;                                 return '<form:checkbox path="useridstodelete" value="' + identifier + '" onchange="togglecheckbox()"/>';                                 }                                     return '';                                  }}, {                             "mdataprop" : "firstname"                         }, {                             "mdataprop" : "lastname"                         }, {                             "mdataprop" : "email"                         }, {                             "mdataprop" : "staffnumber"                         }, {                             "mdataprop" : "enrollementtypename" ,  "bvisible" : '${!enrollmenttypepage}'                         }, {                             "mdataprop" : "organizationtitle",  "bvisible" : '${allview}'                          }, {                             "mdataprop" : "status"                         } ] 

when inspect checkbox element : <input id="useridstodelete1" name="useridstodelete" onchange="togglecheckbox()" type="checkbox" value="' + identifier + '">

however, when put in "mrender" html input without spring form tag , replace identifier variable.

i resolved issue adding input html without using spring tag form.

"aocolumns" : [ {                             "mrender": function ( data, type, full ) {                                 if(full.estatus!="removed"){                                      var identifier=full.identifier;                                     var checkbox='<input name="useridstodelete" onchange="togglecheckbox()" type="checkbox" value="'+identifier+'">'+                                        '<input type="hidden" name="_useridstodelete" value="on">';                                  return checkbox ;                                   }                                return '';                                  }}, {                             "mdataprop" : "firstname"                         }, {                             "mdataprop" : "lastname"                         }, {                             "mdataprop" : "email"                         }, {                             "mdataprop" : "staffnumber"                         }, {                             "mdataprop" : "enrollementtypename" ,  "bvisible" : '${!enrollmenttypepage}'                         }, {                             "mdataprop" : "organizationtitle",  "bvisible" : '${allview}'                          }, {                             "mdataprop" : "status"                         } ] 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -