简体   繁体   English

道场和春天

[英]Dojo and Spring

I have created a JSP through which I am calling a Dojo dialogue (On click of a button). 我创建了一个JSP,通过该JSP我可以调用Dojo对话(单击按钮)。

But the code of the Dialogue ie., 但是对话的代码,即

<div>
................... 
</div>

is present on the same page. 在同一页面上。

Therefore I am unable to insert a controller (Servlet) in between the JSP and Dojo Dialogue. 因此,我无法在JSP和Dojo对话之间插入控制器 (Servlet)。

Please suggest a convenient way to insert a controller between Dojo dialogue and JSP. 请提出一种在Dojo对话和JSP之间插入控制器的简便方法。

Thank You Vishal Saxena 谢谢Vishal Saxena

Then I suppose you want to use the href attribute (then it will load the content in the dialog from an external page -> JSP). 然后,我假设您要使用href属性(然后它将从外部页面-> JSP加载对话框中的内容)。

The example code: 示例代码:

<div data-dojo-type="dijit/Dialog" title="My external dialog" href="yourJsp.html">
    ....
</div>

Is that what you meant? 这是你的意思吗?

EDIT : And in your controller you map it like: 编辑 :并在您的控制器中将其映射为:

@Controller
public class MainController {

        @RequestMapping(value = "/yourJsp.html")
        public String getDialog(ModelMap model) {
                ... // Do your stuff
        }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM