java中有Updatepanel控件(如ASp.net)
我基本上是一个.net开发人员,我现在正在开发一个java web项目,
在这里我基本上需要从后端获取值(比如生成一个随机数)并在前端每秒更新该随机数,我想为此使用 jquery,
在 ASP.net 中,我知道我可以有一个 updatepanel 并使用 _doPostBack 来更新面板而不刷新整个页面。
这可能是一个愚蠢的问题,但我是一个java新手。
任何具有相同功能的帮助/示例将不胜感激。
谢谢。
Im basically a .net developer, I am now working on a java web project,
here i need to basically get values from the back end (say generating a random number) and update that random number every second on the front end, i want to use jquery for this,
in ASP.net, i know that I can have an updatepanel and use _doPostBack to update the panel without refreshing the whole page.
It might be a stupid question but im a java newbie.
Any help/examples of something that does the same would be greatly appreciated.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Java 中,您可以使用 JSF 和诸如 MyFaces 或 IceFaces。 .NET 开发人员需要大量时间来学习这些技术。
如果您打算同时使用 .NET 和 Java,我建议您花一些时间来很好地学习 jQuery 和客户端编程。 这些知识可以在两个世界中为您服务。 使用 jQuery 实现 UpdatePanel 功能是一项简单的任务。 只需创建一个返回内容的服务并使用 $.load() 加载它即可。
In Java you would do something like this with JSF and a rendering kit like MyFaces or IceFaces. A .NET developer would need considerable time to learn these technologies.
If you are going to use both .NET and Java, I recommend to invest some time to learn jQuery and client programming really well. This knowledge can serve you in both worlds. It is a trivial task to implement UpdatePanel functionality with jQuery. Just create a service that returns the content and load it with $.load().