页面内容显示不出来 ,看不懂哪里出错了。
 main.jsp:
<%@ page contentType="text/html;charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>title</title>
<%@ include file="../../include/common.jsp"%>
<script type="text/javascript">
        //定义了一个命名空间,ExpertsMntn.main.xxxx可以直接调用
        $.namespace("ExpertsMntn.main");

        ExpertsMntn.main.add=function() {
            $("#ExpertsMntnDetailWin").dialog({
                href:'add',
                title:'添加',
                draggable:false,
                //设置dialog自由尺寸
                onResize:function(){ 
                    $('#ExpertsMntnGrid').datagrid('resize');
                }    
            }).dialog('open');
        };

        ExpertsMntn.main.edit=function() {
            var row = $('#ExpertsMntnGrid').datagrid('getSelections');     //getSelections:可以多行选中操作; getSelected:只能单行操作;
            if(row.length==1){
                $("#ExpertsMntnDetailWin").dialog({
                    href:'edit/'+row[0].id,
                    title:'编辑',
                    draggable:false,
                    onResize:function(){
                    $('#ExpertsMntnGrid').datagrid('resize');
                    }    
                }).dialog('open');
            }else{
                $.message.alert("Please select a record only!");
            }
        };

        ExpertsMntn.main.del=function() {

            //获取datagrid选中的数据行
            var row = $("#ExpertMntnGrid").datagrid('getSelections');    
            if(row.length>=1){
                //调用easyui的确认框
                $.message.comfirm('确认','确认删除?',function(r) {
                    if(r){
                        var ids = [ ];
                        //将选中的数据库的id压入ids[]数组;
                        for (var i = 0; i < row.length; i++) {
                            ids.push(row[i].id);
                        }
                        //调用jquery的post方法请求delete地址
                        $.post('del',{
                            ids:ids.join(',')
                        },function(result){         //动态页200状态post成功回调并且服务器返回标准json数据执行回调函数
                            if(result){
                                // reload data
                                $('#ExpertsMntnGrid').datagrid('clearSelections');
                                $('#ExpertsMntnGrid').datagrid('reload');
                            }
                        },"json");       //指定将服务器返回的内容处理成json类型(此外,还可以返回 html、text之类)
                    }
                });
            }else{
                $.message.alert('Please select a record only!');
            }
        };

        ExpertsMntn.main.listSearch=function() {
            $('#ExpertsMntnGrid').datagrid('load', {

            });
        };

        ExpertsMntn.main.init = function() {
            $('#ExpertsMntnGrid').datagrid({         //建表?建表插件用法
            url:'search',
            method:'get',
            pageSize:20,
            toolbar:'#',
            fit : true,
            pagination : true,
            idField : "id",                 //支持分页选择记录
            pagePosition : "bottom",
            rownumbers : true,
            border : false,
            singleSelect : false,
            striped : true,
            fitColumns : true,
            selectOnCheck : true,
            checkOnSelect : true,
            columns:[[{
                field:'check',
                title : '',
                checkbox : true
            },{
                field : 'id',
                title : '',
                width : 22,
                align : 'center',
                halign : 'center',
                sortable : true         
            },{
                field:'name',
                title:'姓名',
                width:22,
                align : 'center',
                halign : 'center',
                sortable : false
            },{
                field:'sex',
                title:'性别',
                width:22,
                align : 'center',
                halign : 'center',
                sortable : false
            },{
                field:'birthday',
                title:'出生日期',
                width:22,
                align : 'center',
                halign : 'center',
                sortable : false 
            },{
                field:'partymember',
                title:'政治状态',
                width:22,
                align : 'center',
                halign : 'center',
                sortable : false 
            },{
                field:'itemid',
                title:'专业',
                width:22,
                align : 'center',
                halign : 'center',
                sortable : false 
            },{
                field:'orgid',
                title:'所属组织',
                width:22,
                align : 'center',
                halign : 'center',
                sortable : false 
            },{
                field:'telephone',
                title:'联系方式',
                width:22,
                align : 'center',
                halign : 'center',
                sortable : false 
            },{
                field:'experience',
                title:'经历',
                width:22,
                align : 'center',
                halign : 'center',
                sortable : false 
            },{
                field:'remarks',
                title:'备注',
                width:22,
                align : 'center',
                halign : 'center',
                sortable : false 
            },{
                field:'content',
                title:'照片附件',
                width:22,
                align : 'center',
                halign : 'center',
                sortable : false 
            },{
                field:'photo-suffix',
                title:'照片文件后缀名',
                width:22,
                align : 'center',
                halign : 'center',
                sortable : false 
            }]],
            //查看操作,onDblClickRow
            onDblClickRow : function(index, row) {
                $('#ExpertsMntnGrid').datagrid("clearSelections");
                $('#ExpertsMntnGrid').datagrid("selectRow", index);
                $('#ExpertsMntnDetailWin').dialog({
                    href : 'view/' + row.id,
                    title : "查看",
                    draggable : false,
                    onResize : function() {
                        $('#ExpertsMntnGrid').datagrid('resize');
                    }
                }).dialog('open');
            }
        });
    };

    $(document).ready(function() {
        ExpertsMntn.main.init();
    });
</script>
</head>
<body>
<div class="easyui-layout" fit="true" border="false" >
    <div region="north" border="false" >
        <div id="toolbar" border="false" class="dialog-toolbar" style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #DDDDDD">
            <a href="#" class="easyui-linkbutton"
                data-options="plain:true,iconCls:'icon-add'" onclick="ExpertsMntn.main.add()">添加</a>
            <a href="#" class="easyui-linkbutton"
                data-options="plain:true,iconCls:'icon-edit'" onclick="ExpertsMntn.main.edit()">编辑</a>
            <a href="#" class="easyui-linkbutton"
                data-options="plain:true,iconCls:'icon-remove'" onclick="ExpertsMntn.main.del()">删除</a>
        </div>
    </div>
    <div region="center" border="false" style="width: 100%; height: 100%">
            <table id="ExpertsMntnGrid"></table>
    </div>
    <div id="ExpertsMntnDetailWin" class="easyui-dialog" title=""
        style="width: 450px; height: 750px;"
        data-options="modal:true,closed:true"></div>
</div>  
</body>
</html>

detail.jsp:
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="../../include/header.jsp"%>
<script type="text/javascript">
    $.namespace("ExpertsMntn.detail");

    ExpertsMntn.id="${(ExpertsMntnEntity.id)==null?0:(ExpertsMntnEntity.id)}";
    ExpertsMntn.detail.mode = "${mode}";

    ExpertsMntn.detail.save = function(){
        var url = $.ctx+'/zjkwh/save/'+ ExpertsMntn.id;
        $('#ExpertsMntnForm').form('submit', {
            url: url,
            onSubmit: function(param) {
                if(ExpertsMntn.detail.mode=='edit'){
                    return $(this).form('validate');
                }
                var flag = false;
                $.ajax({
                    type : "post",
                    url : 'check',
                    dataType : "json",
                    data : {
                        id : $('#id').val()
                    },
                    async : false,
                    success : function(result) {
                        if (result == true) {
                            flag = true;
                        }
                    }
                });

                if(!flag){
                    return $(this).form('validate');
                } else {
                    $.messager.alert('数据已存在');
                    $('#ExpertsMntnGrid').datagrid('load');
                    return !flag;
                }
            },
            success: function(result) {
                var data = (new Function("","return "+ result))();
                $('#ExpertsMntnGrid').datagrid('reload');
                if (data.id) {
                    ExpertsMntn.id = data.id;
                    $.messager.alert('提示', '保存成功!','',function(){
                            $('#ExpertsMntnDetailWin').dialog('close');
                    });
                } else {
                    $.messager.show({
                        title: 'Error',
                        msg: result
                    });
                }
            }
        });
    }

    $(document).ready(function() {

    });
</script>
<div class="easyui-layout" region="center" style="height:700px;border:1px dashed #FFFFFF">
    <c:if test="${(mode=='edit') || (mode=='add')}">
        <div class="editform" style="border:1px dashed #FFFFFF">
            <form id="ExpertsMntnForm" method="post" novalidate
                style="margin-bottom: 0">
                <input id="id" name="id" type="hidden"
                    value="${ExpertsMntnEntity.id }" />

                <ul style="list-style-type: none; height: 5px"></ul>
            "validType:'length[1,50]'"
                        value="${ExpertsMntnEntity.wonawardz}" size="20"
                        style="width: 140px;height:30px;line-height:30px;border-style:none;margin-right:3px;float: left;background: url('${ctx}/static/images/inputbg.png') ;background-size: 100% 100%;
                            filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${ctx}/static/images/inputbg.png', sizingMethod='scale')\9;" />
                    </li>
                </ul>-->
        </div>
    </c:if>
    <c:if test="${mode=='view'}">
        <div class="editform">
            <table border=1>
                <tbody>
                    <tr>
                        <td class="label"><label>&nbps;ID:</label></td>
                        <td>${expertsMntnEntity.id}</td>
                    </tr>
                    <tr>
                        <td class="label"><label>姓名:</label></td>
                        <td>${expertsMntnEntity.name}</td>
                    </tr>
                    <tr>
                        <td class="label"><label>性别:</label></td>
                        <td>${expertsMntnEntity.sex}</td>
                    </tr>
                    <tr>
                        <td class="label"><label>出生日期:</label></td>
                        <td>${expertsMntnEntity.birthday}</td>
                    </tr>
                    <tr>
                        <td class="label"><label>专业:</label></td>
                        <td>${expertsMntnEntity.itemid}</td>
                    </tr>
                    <tr>
                        <td class="label"><label>获得奖项:</label></td>
                        <td>${expertsMntnEntity.wonawardz}</td>
                    </tr>
                    <tr>
                        <td class="label"><label>经历:</label></td>
                        <td>${expertsMntnEntity.experience}</td>
                    </tr>
                    <tr>
                        <td class="label"><label>备注:</label></td>
                        <td>${expertsMntnEntity.remarks }</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </c:if>
</div>

只有添加才能显示出内容,编辑和查看操作在对话框中显示不出来,就连div框都显示不了!对话框能打开,但是里面什么东西都没有!

2个回答

这种代码看着辣眼睛啊

有没有报异常啊,
有的话把错误日志贴出来
这个代码好多,看不下去

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!