简体   繁体   English

GSP页面看起来好像没有被浏览器解释

[英]GSP page looks like not being interpreted by the browser

I have a grails application that after execute an action to load some datatable, I click on a link on the datatable that re-execute the same action and load the same page again - SO, when it load for the second time (after click on the link) looks like the browser didn´t process any javascript on my page - just ignore it. 我有一个grails应用程序,该应用程序在执行要加载某些数据表的操作后,单击该数据表上的链接,该链接重新执行相同的操作并再次加载同一页-因此,第二次加载时(单击链接)看起来像浏览器没有处理我页面上的任何javascript-只需忽略它即可。

The grails action is very simple, something like: grails动作非常简单,类似于:

def index() {
        render (view: "page.gsp" ,model: [model])
    }

What could be happen? 会发生什么?

UPDATE 更新

Hi, moderators, please, close/delete this question because I found the solution and it is - basically - not related to grails but Javascript/Jquery istead. 嗨,主持人,请关闭/删除此问题,因为我找到了解决方案,并且它基本上与grails无关,而是与Javascript / Jquery无关。 So, this question does not make sense. 因此,这个问题没有道理。 Thanks for you guys who tries to help me. 谢谢你们努力帮助我的人。

First thing browser never get's a .gsp page it will always get an html which can be interpreted by browser. 首先,浏览器永远不会获得.gsp页面,它将始终获得可被浏览器解释的html。 There is a syntax problem please use below code 有语法问题,请使用以下代码

render (view: "page" ,model: [model]) 渲染(视图:“页面”,模型:[模型])

also check https://grails.github.io/grails-doc/latest/guide/theWebLayer.html#gsp 还请检查https://grails.github.io/grails-doc/latest/guide/theWebLayer.html#gsp

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

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