开发者

JSF (facelets) IDE code completion

I have tried to create new Facelets (JSF 1.2) component (using Java code). The component works perfectly, but the problem is, that I have no code completion for attributes in my IDE (Netbeans 6.9.1) for ihis tag. I think, that I am missing some part of configuration (in plain JSF there were tags for attributes, but I havent found them in for facelets config)....


Component:

public class MenuUIComponent extends UIComponentBase {
    public void encodeBegin(FacesContext context) throws IOException {
 开发者_JAVA百科       // ...
    }
}

Faces config:

<component>
    <component-type>flexibla2.menu</component-type>
    <component-class>cz.flexibla2.client.component.MenuUIComponent</component-class>
</component>

My taglib (flexibla2.taglib.xml)

<facelet-taglib>
    <namespace>http://flexibla2/taglib</namespace>
    <tag>
        <tag-name>menu</tag-name>
        <component>
            <component-type>flexibla2.menu</component-type>
        </component>
    </tag>
</facelet-taglib>

Web xml

<context-param>
    <param-name>facelets.LIBRARIES</param-name>
    <param-value>/WEB-INF/flexibla2.taglib.xml</param-value>
</context-param>

When I try to call to use my component

<flexibla2:menu root="#{clientPageBean.rootCategory}" />

The attribute root is market by IDE as not known (red uderscored) with error message: "The attribute root is not defined in component's interface"

Thanks for your help.


There doesn't seem to be an easy solution for this at the moment. The way all major component sets seem to do it, is 'simply' providing an old .tld file in addition to the taglib.xml one.

SeamFaces has a proposal for declaring those tag properties directly on the component via annotations. See http://seamframework.org/Seam3/FacesModule. This won't help anyone now, but if you're interested in this feature you can express your interest for it at their forums.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜