简体   繁体   English

如何在OSGI中使用JSF组件库

[英]How to use JSF component library with OSGI

I have a very specific questions about using JSF and component libraries. 关于使用JSF和组件库,我有一个非常具体的问题。

I tested to build WAB (OSG-fied WAR) package with Primefaces. 我测试用Primefaces构建WAB(OSG-fied WAR)包。 It turns out that there are problems in integrating JSF and Primefaces when using OSGI. 事实证明,在使用OSGI时,集成JSF和Primefaces存在问题。

There are several ways to integrate JSF and Primefaces which I want to ask how to atchieve: 有几种方法可以集成JSF和Primefaces,我想问一下如何实现:

  1. I can build Primefaces.jar as OSGI bundle. 我可以将Primefaces.jar构建为OSGI包。 I can export the Java methods as services but there are xml configuration files and etc which I suppose I cannot use in separate OSGI bundle. 我可以将Java方法导出为服务,但是有xml配置文件等,我想我不能在单独的OSGI包中使用。 Is this correct or am I wrong? 这是正确的还是我错了?

  2. Is it possible to make a custom build of Mojarra with integrated Primefaces components. 是否可以使用集成的Primefaces组件定制Mojarra。 If I manage to do this I can simply deploy the modified Mojarra as Glassfish module build an use it very simple and efficient. 如果我设法做到这一点,我可以简单地部署修改后的Mojarra作为Glassfish模块构建使用它非常简单和有效。 If someone managed to achieve this would you share some information about it? 如果有人设法实现这一目标,你会分享一些有关它的信息吗?

Deploy Primefaces.jar as OSGI bundle in Glassfish. 在Glassfish Primefaces.jar部署为OSGI包。 Copy the tags declaration from primefaces-p.taglib.xml . primefaces-p.taglib.xml复制标签声明。 And also take a look at this tutorial how to create custom tags. 另请参阅本教程如何创建自定义标记。 I'm not sure but you also need to copy/paste the JS, css and pictures into you bundle. 我不确定,但你还需要将JS,css和图片复制/粘贴到你的包中。

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

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