Applet与JSF集成 - 例如 [英] Applet and JSF Integration - example

查看:158
本文介绍了Applet与JSF集成 - 例如的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有教程或JSF一个简单的小程序的例子吗?我如何从一个小程序执行到托管bean的请求?

Is there a tutorial or a simple applet example with JSF? How do I perform a request to a Managed Bean from an applet?

推荐答案

JSF(因此管理豆)在服务器上执行生成HTML;小程序执行客户机上 - 所以你不能只传递到小程序托管bean参考

JSF (and hence managed beans) executes on the server to produce HTML; An applet executes on the client's machine - so you can't just pass a reference to a managed bean to an applet.

如果你只需要在启动时从托管bean将值传递给一个小程序,你可以使用&LT;参数&GT; 子元素的<一个href=\"http://download.oracle.com/javase/6/docs/technotes/guides/deployment/deployment-guide/applet.html\"相对=nofollow>标记通过这个值。

If you just need to pass a value from a managed bean to an Applet at start time, you can use the <param> sub-element of the tag to pass this value.

如果您需要某种到托管bean动态访问,这将是一个困难得多 - 基本上,你需要建立某种即是由托管bean的支持,使小程序可以让Web服务的HTTP请求返回到服务器,以获得需要的值。

If you need some kind of dynamic access to the managed bean, it's going to be a lot harder - basically, you'll need to build some kind of web service that's backed by the managed bean so that the applet can make http requests back to the server to get the values it needs.

这篇关于Applet与JSF集成 - 例如的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆