The values ​​are not populated in the jquery database for a G…

存储架构 Hello, buddy! (源链)

I am fetching a list of values from the controller-action
to load into the data-table
.I have checked that values are getting fetched succesfully from my controller action, but the values are not getting load ed into the data-table
.And it shows

No data available

Here is my Controller.

package com.standout.utilityapplication
import grails.plugin.springsecurity.annotation.Secured

@Secured(['ROLE_ADMIN'])
class ReportController {
    AdminService adminService
    def report() { 

        println ("--Inside ReportController");
    }
    def searchAjax(){
        String criteria = params.search_criteria
        println ("criteria "+criteria)
        if(criteria.equalsIgnoreCase("Employee ID")){
        def resultSet = adminService.getReportById(params)
        println("----------------+++++ "+resultSet)
        [bill_details:resultSet]
        }

}
}

Here is my GSP.


   Report
   
   
   
   
   

function displayTable(){
    $(function() {
    $('#example').DataTable();
    })
    document.getElementById('reportSearch').style.display = ''

}
    





Employee Id Bill Date Amount No. of Persons Bank Submission Date Bank Submission Status Bill Date Reimbursed Restaurant Name Team
Employee Id Bill Date Amount No. of Persons Bank Submission Date Bank Submission Status Bill Date Reimbursed Restaurant Name Team
${it.employee_id} ${it.bill_submitted_dt} ${it.amount} ${it.number_of_persons} ${it.presented_bank_dt} ${it.presented_bank_fl} ${it.receipt_dt} ${it.reimbursed} ${it.restaurant_name} ${it.team}


Could anyone tell me what to do?

Please try using below code snippest.

html-table
content from gsp
file You can add other custom things to the table as per your wish.

Branch Name User Name First Name Last Name Contact Number

jquery
content for loading / pouplating
data in the data-table

var userDetailsDataTable = "";

userDetailsDataTableReload :  function(){

userDetailsDataTable = $('#userDataTable').DataTable();
userDetailsDataTable.destroy();

userDetailsDataTable = $('#userDataTable').DataTable({
    "ajax": '../restaurantManagement/fetchUserDetails'
});

}

from here, we are giving call to the controller action fetchUserDetails

controller-action
content

Map userDetailsMap      =   [:]

    List userDetailsList    =   userManagementService.fetchAllUsersByRestaurantId(restaurantId)

    userDetailsMap << [data : userDetailsList]

    render userDetailsMap as JSON

Let me know if it gives you problem.

您可能感兴趣的

Query Memory Flow JQuery JSONP I need to perform jsonp long polling in highly dynamic web application, however I'm experiencing massive memory leaks. Initially I've used Socket.IO a...
Best practices to put in a man page What is the Best Practice method to record visits by page / object Take my profile for example, or any question n...
How to Install OctoberCMS on Ubuntu 16.04 LTS OctoberCMS is a free, open source and self hosted content management system written in PHP and based on the Laravel framework. OctoberCMS allows you t...
Django之ORM基础 ORM简介 ORM概念 对象关系映射(Object Relational Mapping,简称ORM)模式是一种为了解决面向对象与关系数据库存在的互不匹配的现象的技术。 简单的说,ORM是通过使用描述对象和数据库之间映射的元数据,将程序中的对象自动持久化到关系数据库中。 ORM在业务...
数据库的使用你可能忽略了这些 数据库的管理是一个非常专业的事情,对数据库的调优、监控一般是由数据库工程师完成,但是开发人员也经常与数据库打交道,即使是简单的增删改查也是有很多窍门,这里,一起来聊聊数据库中很容易忽略的问题。 字段长度省着点用 先说说我们常用的类型的存储长度: 列类型 ...
Hello, buddy!责编内容来自:Hello, buddy! (源链) | 更多关于

阅读提示:酷辣虫无法对本内容的真实性提供任何保证,请自行验证并承担相关的风险与后果!
本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » The values &ZeroWidthSpace;&ZeroWidthSpace;are not populated in the jquery database for a G…



专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录