How to get feilds id value in servlet for inline datatable?

How to get feilds id value in servlet for inline datatable?

alpachadhaalpachadha Posts: 9Questions: 3Answers: 0

I am using below code,I want to retrieve changed value in servlet. How can get it? In example we have PHP but i want to have with java.

var editor; $(document).ready(function() { // Set up the editor editor = new jQuery.fn.dataTable.Editor({ ajax: "/merlin/DataTableServlet?&type=getEditNominationReport&nominationId=", table: "#reports", rowId: "id", fields: [ { label: "Nomination Id:", name: "Nomination_Id", id: "nominationId" }, { label: "Nominator:", name: "Nominator", id: "nominatorId" }, { label: "Nominee :", name: "Nominee", id: "nomineeId" }, { label: "Nomination Reason :", name: "Nomination_Reason", id: "nominationReason" } ] } ); // Activate an inline edit on click of a table cell $('#reports').on( 'click', 'tbody td.editable', function (e) { editor.inline( this, { buttons: { label: '>', fn: function () { this.submit(); } } //inline editing on cell } ); } ); $('#reports').DataTable( { dom: 'Bfrtlip', //Look here for what this means: http://datatables.net/reference/option/dom columns: [ { data: null, defaultContent: '', className: 'select-checkbox', orderable: false }, { data: "Nomination_Id", className: 'editable' }, { data: "Nomination_Date"}, { data: "Nominator" , className: 'editable' }, { data: "Nominee" , className: 'editable' }, { data: "Nominee_email" }, { data: "Nomination_Reason", className: 'editable'}, { data: "Nomination_Message" } ], select: { style: 'os', selector: 'td:first-child' }, buttons: [ { extend: 'excel', text: 'Export to Excel', }, { extend: 'create', editor: editor }, { extend: 'edit', editor: editor }, { extend: 'remove', editor: editor } ] } ); } );
    String nominationId = request.getParameter("nominationId");
        String nominatorId = request.getParameter("nominatorId");
        String nomineeId = request.getParameter("nomineeId");

These values are returning NULL

Servlet

public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
doGet(request,response);
}

public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{   
     FreseniusReportService reportService = null;
     String sStyle = "";
     String typeOfReport = "";
     try   {  
        reportService = new FreseniusReportService();
        sStyle = request.getParameter("style");
        String nominationId = request.getParameter("nominationId");
        String nominatorId = request.getParameter("nominatorId");
        String nomineeId = request.getParameter("nomineeId");

        typeOfReport = request.getParameter("type"); 
        if (typeOfReport.equalsIgnoreCase("getEditNominationReport")) { //Edit Nomination Report
             reportService.getEditNominationReport(request);    
        }else if (typeOfReport.equalsIgnoreCase("getDeleteNominationReport")) { //Delete Nomination Report
            reportService.getEditNominationReport(request); 
        }
        response.setContentType("text/html");
        ServletOutputStream out = response.getOutputStream();
        out.print("hello");
        //return "";
    }  catch(Exception e)   {
        System.out.println("Exception: " + e.getMessage());
    }
}
This discussion has been closed.