Why is the passing of variables through url not working spring mvc?

Why is the passing of variables through url not working spring mvc?

patreeeeekpatreeeeek Posts: 14Questions: 7Answers: 0

Hi!

I don't know what's wrong with this code. Can you guys help me? Its saying undefined when I print out the variable at my controller class.

     $(document).ready(function () {

                $('#datatables').DataTable({
                    "dom": '<"toolbar">frtip',
                    "responsive": true,
                    "ordering": false,
                    "scrollY": "550px",
                    "scrollCollapse": true,
                    "ajax": "smsSenders.json",
                    "aoColumns": [
                        {"mData": "sender"},
                        {"mData": "content"},
                        {"mData": "receiveTime"},
                        {"mData": "sender",
                            "fnCreatedCell": function (nTd, oData) {
                                $(nTd).html("<i class='ti-pencil-alt btn btn-simple btn-assign btn-icon' data-toggle='modal' data-mode='asign'></i>\n\n\
                                <a href='${pageContext.request.contextPath}/conversation?sender="+ oData.sender +"'><i class='ti-comment-alt btn btn-simple btn-reply btn-icon' data-toggle='modal' data-mode='conversation'></i></a>\
                             ");
                            }
                        }
                    ],
                    language: {
                        "search": "_INPUT_",
                        searchPlaceholder: "Search records"
                    }

                });

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    Hi @patreeeeek ,

    We're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.