mRender spring security tag

mRender spring security tag

unixsshunixssh Posts: 3Questions: 0Answers: 0
edited January 2014 in General
Hi community,

I have this code:
[code]
$(document).ready(function() {
$('#example').dataTable( {
"aoColumnDefs": [
{
// `data` refers to the data for the cell (defined by `mData`, which
// defaults to the column being worked with, in this case is the first
// Using `row[0]` is equivalent.
"mRender": function ( data, type, row ) {

return '
show these for only admins
';

},
"aTargets": [ 0 ]
}
]
} );
} );
[/code]

I need to know if the security tag inside mRender function is properly rendered as html and working correctly.

Thank you.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    I suspect probably not, but really don't know :-). Please link to a live test case.

    Allan
  • unixsshunixssh Posts: 3Questions: 0Answers: 0
    In fact i tried, i couldn't handle it to work and i don't understand why..mRender render html , i'll try more. Why do you think is not working? :)
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    My guess was based on the fact that the tag will be rendered by the server-side process. But mRender is run on the client-side - so the server would never see the tag to create it. At the moment it will just be dumping a tag no browser will recognise into the DOM.

    Allan
This discussion has been closed.