问题描述
我有一个表格,用户提交并返回一个结果,但它需要几秒钟返回结果。我知道我可以使用Grails的formRemote 来异步执行调用和更新页面上的一个div,但我想要做的完全是另一种展示页面(有一些等待图形和其他信息)。
I have a form that the user submits and returns a result, but it takes a couple of seconds to return the result. I know I can use grails formRemote http://grails.org/doc/latest/ref/Tags/formRemote.html to execute the call asynchronously and update a div on the page, but what I want to do is show another page entirely (with some wait graphics and other information).
有没有一种简单的方法在Grails中做到这一点?
Is there an easy way to do this in grails?
推荐答案
您可以asynchroniously将数据发送到服务器(阿贾克斯,formRemote),显示等待的图形UTIL你得到回应。并重定向得到响应之后导致页面(你应该有存储状态的地方,也可能有结果页面唯一的URL)
You can send data to server asynchroniously (ajax, formRemote), showing 'wait graphics' util you get a response. And redirect to result page right after getting response (and you should have to store state somewhere, and probably have unique url for result page)
这篇关于Grails的显示在表格等待页面提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!