Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8214297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:24:49+00:00 2026-06-07T11:24:49+00:00

I create a custom component for SelectOneRadio , and I register it in xyz.taglib.xml

  • 0

I create a custom component for SelectOneRadio, and I register it in xyz.taglib.xml and so far it works. The only problem is that my NetBeans cannot see my tag attribute in auto-complete. For example, if I have layout="pageDirection" in my custom component, then it render correctly, but when I (Ctrl + space) I do not see layout, value … attributes. Here is how I register my custom component in my WEB-INF/faces-config.xml, I have

<component>
    <component-type>com.xyz.om.ui.component.SelectOneRadio</component-type>
    <component-class>
        com.xyz.om.ui.component.SelectOneRadio
    </component-class>
    <component-extension>
        <component-family>com.xyz.om.ui.component.SelectOneRadio</component-family>
        <renderer-type>com.xyz.om.ui.renderer.SelectOneRadioRenderer</renderer-type>
    </component-extension>
</component>
<render-kit>
    <renderer>
        <component-family>com.xyz.om.ui.component.SelectOneRadio</component-family>
        <renderer-type>com.xyz.om.ui.renderer.SelectOneRadioRenderer</renderer-type>
        <renderer-class>
            com.xyz.om.ui.renderer.SelectOneRadioRenderer
        </renderer-class>    
    </renderer>
</render-kit>

In my WEB-INF/xyz.taglib.xml, I have

<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
            version="2.0">
<namespace>http://example.com/ui</namespace>
<tag>
    <tag-name>selectOneRadio</tag-name>
    <component>
        <component-type>com.xyz.om.ui.component.SelectOneRadio</component-type>
        <renderer-type>com.xyz.om.ui.renderer.SelectOneRadioRenderer</renderer-type>            
    </component>
</tag>
</facelet-taglib>

so I register the xyz.taglib.xml in web.xml as follow

<context-param>
    <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
    <param-value>/WEB-INF/xyz.taglib.xml</param-value>
</context-param>

After this steps, if I Ctrl + space (Netbeans) on the custom component, I can only see class, id, parent , rendered, rendererType, transient. So I try create a xyz.tld under WEB-INF, like this

<?xml version="1.0" encoding="UTF-8"?>
<taglib version="2.1" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd">
<tlib-version>1.0</tlib-version>
<short-name>xyz</short-name>
<uri>http://example.com/ui</uri>

<tag>       
    <name>selectOneRadio</name>
    <tag-class>com.xyz.om.ui.tag.SelectOneRadioTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
        <description>
            xyz description
        </description>
        <name>name</name>
        <required>false</required>
        <deferred-value>
            <type>java.lang.String</type>
        </deferred-value>         

    </attribute>
</tag>
</taglib>

but still the name attribute does not show in netbeans when I write out the tag. I guess my question is how to get netbeans to auto-complete my custom component’s attributes, because everything works, but no auto-complete is a pain

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:24:51+00:00Added an answer on June 7, 2026 at 11:24 am

    The attributes are autocompleted based on the .taglib.xml file. You need to register every individual attribute in the <tag> element.

    <tag>
        <tag-name>selectOneRadio</tag-name>
        <component>
            <component-type>com.xyz.om.ui.component.SelectOneRadio</component-type>
            <renderer-type>com.xyz.om.ui.renderer.SelectOneRadioRenderer</renderer-type>            
        </component>
        <attribute>
            <name>id</name>
            <required>false</required>
            <type>java.lang.String</type>
        </attribute>
        <attribute>
            <name>binding</name>
            <required>false</required>
            <type>javax.faces.component.UIComponent</type>
        </attribute>
        <attribute>
            <name>rendered</name>
            <required>false</required>
            <type>java.lang.Boolean</type>
        </attribute>
        <!-- Etc.. -->
    </tag>
    

    The .tld is only mandatory when you plan to support JSP next to Facelets as well. Note that JSF 2.0 itself doesn’t support JSP, it’ll run in JSF 1.2 fallback modus.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to create a custom component that gets it's layout from an XML file
I'm trying to create simple custom component that draws Bitmap. It works fine when
When I create a custom component, I define a property which is array that
I create a custom component to override the linkButton to make it behave that
I am trying to create a custom component in flex that consists of a
I'm trying to create a custom component that when instantiated in form builder it
I need to create a custom Component with JSF 2.0 (not composite component), that
I've got a custom component that I need to use if I create a
I need to create a custom component which consist of a drop down box,
I'm trying to create a custom component to extend PrimeFaces. I have a simple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.