JSF复合组件Netbeans [英] JSF Composite Component Netbeans

查看:124
本文介绍了JSF复合组件Netbeans的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图开发jsf复合组件,但是netbeans ide抱怨找不到该命名空间的库.

I'm tried to develop jsf composite component but netbeans ide complaints the no library found for this namespace.

xmlns:cform ="http://java.sun.com/jsf/composite/cform"

xmlns:cform="http://java.sun.com/jsf/composite/cform"

有关的错误是什么?我应该在哪里放置复合组件(哪个文件夹)?

What is the error about ? Where should i put the composite component (which folder) ?

请帮助.

谢谢.

推荐答案

XML名称空间网址不正确.像这样声明一个名称空间:

The XML namespace url is incorrect. Declaring a namespace like so:

xmlns:composite="http://java.sun.com/jsf/composite"

将产生复合组件名称空间,例如<composite:interface>.

Will result in composite component namespace like <composite:interface> for example.

复合组件应位于WEB-INF/resources/[foldername]文件夹中,其中[foldername]是要保留复合组件的文件夹的名称.

Composite components should be in the WEB-INF/resources/[foldername] folder where [foldername] is the name of the folder you wish to keep composite components.

然后,您可以使用以下URL引用该文件夹中的复合组件,并提供您选择的给定名称空间.对于此示例,假设我在以下文件夹WEB-INF\resources\ptc中有一个名为avatarGenerator.xhtml的复合组件.

You can then reference your composite components in that folder with the following url and providing a given namespace of your choice. For this example lets say I have a composite component called avatarGenerator.xhtml inside of the following folder, WEB-INF\resources\ptc.

XML命名空间声明

xmlns:ptc="http://java.sun.com/jsf/composite/ptc"

使用avatarGenerator

<ptc:avatarGenerator attributeone="" attributetwo="">

这篇关于JSF复合组件Netbeans的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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