【easyui】dialog中继续弹出dialog

  1. 下面代码使用spring mvc架构

  2. 在controller的跳转中,不要直接返回dialog需要展示的页面,直接跳转到一个container中

    @RequestMapping("/XXX")
    public String XXXX(HttpServletRequest request) {

        request.setAttribute("treatmentCycle", 5);
        request.setAttribute("respnseCycle", 1);

        return "/views/match/throw/throwRuleContainer";
    }
  1. 然后在container中,使用iframe加载需要弹出的dialog,并且将参数通过url的形式传进去
<script src="${pageContext.request.contextPath}/jslib/validate/validateAccount.js ">script>


    <iframe id="ifrmDetail" border="0px" width="550px" height="500px">iframe>

<script type="text/javascript">

var contribution = "${contribution}";
$(function(){  

    var url = "${pageContext.request.contextPath}/views/XXX/xxx/DDDD.jsp?contribution="+contribution;
    $("#ifrmDetail").attr("src",url);
}); 
script>

4, 实现一个dialog页面


<html>
    <head>
        <title>title>
        <meta charset="utf-8"/>
        <jsp:include page="../../../initlib/initAll.jsp">jsp:include>
        <script src="${pageContext.request.contextPath}/jslib/validate/validateAccount.js ">script>

        <script type="text/javascript">


        script>
    head>
    <body>
    <div class="easyui-layout" data-options="fit:true,border:false">
    <div data-options="region:'center',border:false" title="" style="overflow: hidden;padding:5px">
        <form id="form" method="post">
            <fieldset>
                <legend>响应规则legend>
                <table class="table" style="width: 100%;">
                    <tr>
                        <th>贡献度th>
                        <td colspan="6">
                            <input id = "contribution" readOnly="true" type="text" name="contribution" class="easyui-validatebox"
                                   value="${contribution}" data-options="required:true" maxlength="50"
                                   style="width:100px; height:23px;border:none;background-color: white;""/>
                        
                    
                
            
        
    

你可能感兴趣的:(web开发)