【问题标题】:Spring MVC Controller to Load table in Modal Dialog BoxSpring MVC 控制器在模态对话框中加载表
【发布时间】:2015-10-13 17:52:21
【问题描述】:

我的控制器将返回一年的班级卷号和学生姓名作为 List 对象。结果应显示为模态 Dailog 框。我无法打开盒子。

如果我通过 AJAX 方式调用它,那么我需要动态创建表。所以请提出正确的方法。

【问题讨论】:

    标签: ajax spring model-view-controller bootstrap-modal


    【解决方案1】:
    For example Bootstrap Modal Plugin, u can activate class 'show' and jstl  :
    
     1. In spring mvc controller :
    
        model.addAttribute("student_list",studentList);
    
        2. in jsp
    
        <c:if test="${not empty student_list}">
            <div id="mymodal" class="modal show" ....>
            Modal Dialog Box
            </div>
        </c:if>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-19
      • 1970-01-01
      • 2011-10-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多