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 8973615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:29:12+00:00 2026-06-15T18:29:12+00:00

Here is my custom control: <?xml version=1.0 encoding=UTF-8?> <xbl:xbl xmlns:xhtml=http://www.w3.org/1999/xhtml xmlns:xforms=http://www.w3.org/2002/xforms xmlns:xs=http://www.w3.org/2001/XMLSchema xmlns:ev=http://www.w3.org/2001/xml-events xmlns:xi=http://www.w3.org/2001/XInclude

  • 0

Here is my custom control:

<?xml version="1.0" encoding="UTF-8"?>

<xbl:xbl xmlns:xhtml="http://www.w3.org/1999/xhtml"
         xmlns:xforms="http://www.w3.org/2002/xforms"
         xmlns:xs="http://www.w3.org/2001/XMLSchema"
         xmlns:ev="http://www.w3.org/2001/xml-events"
         xmlns:xi="http://www.w3.org/2001/XInclude"
         xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
         xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
         xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
         xmlns:saxon="http://saxon.sf.net/"
         xmlns:xbl="http://www.w3.org/ns/xbl">

    <metadata xmlns="http://orbeon.org/oxf/xml/form-builder">
        <display-name lang="en">Custom Controls</display-name>
    </metadata>

    <xbl:binding id="fb-input-country-selector" element="xforms|country-selector">
        <metadata xmlns="http://orbeon.org/oxf/xml/form-builder">
            <display-name lang="en">Country Selector</display-name>
            <icon lang="en">
                <small-icon>/forms/orbeon/builder/images/dropdown.png</small-icon>
                <large-icon>/forms/orbeon/builder/images/dropdown.png</large-icon>
            </icon>
            <datatype>xforms:string</datatype>
            <template>
                <xforms:select1 id="" appearance="minimal" ref="" xmlns="">
                    <xforms:label ref=""/>
                    <xforms:hint ref=""/>
                    <xforms:help ref=""/>
                    <xforms:alert ref="$fr-resources/detail/labels/alert"/>
                    <xforms:item>
                        <xforms:label>[Select...]</xforms:label>
                        <xforms:value/>
                    </xforms:item>
                    <xforms:itemset nodeset="doc('oxf:/apps/xforms-controls/services/countries.xml')/countries/country">
                        <xforms:label ref="name"/>
                        <xforms:value ref="us-code"/>
                    </xforms:itemset>
                </xforms:select1>
            </template>
        </metadata>
    </xbl:binding>
</xbl:xbl>

The problem is that the data items are not grabbed from the XML, but if I introduce the template itself in the form structure, it works.

Anyone have any ideea?

  • 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-15T18:29:14+00:00Added an answer on June 15, 2026 at 6:29 pm

    Creating XBL components is tricky. At least the first time you do it. A few things:

    1. To avoid confusions, I recommend you define components in your own namespace. In the example below, I used xmlns:my="http://www.example.com/".
    2. The content of fb:template is how using the component looks like, not its implementation. So, it should look like:

      <fb:template>
          <my:country-selector>
              <xforms:label ref=""/>
              <xforms:hint ref=""/>
              <xforms:help ref=""/>
              <xforms:alert ref=""/>
          </my:country-selector>
      </fb:template>
      
    3. The implementation is inside xbl:template.

    4. So the component can be found at runtime, you need to place it in a directory xbl/my/country-selector/country-selector.xbl. The my part of the directory is mapped to the namespace by you adding the following property in your properties-local.xml:

      <property as="xs:string"  name="oxf.xforms.xbl.mapping.my"
                                value="http://www.example.com/"/>
      

      (Often, we use the same name for the directory and the prefix, but they don’t need to be the same. E.g. the fr:* components are in a directory called orbeon.)

    5. So Form Builder shows your component in the sidebar, you need to add a property like:

      <property as="xs:string"  name="oxf.fb.toolbox.group.other.uri.*.*"
                value="oxf:/xbl/my/country-selector/country-selector.xbl"/>
      

    And here is the full source for country-selector.xbl:

    <xbl:xbl xmlns:xh="http://www.w3.org/1999/xhtml"
             xmlns:xforms="http://www.w3.org/2002/xforms"
             xmlns:xs="http://www.w3.org/2001/XMLSchema"
             xmlns:ev="http://www.w3.org/2001/xml-events"
             xmlns:xi="http://www.w3.org/2001/XInclude"
             xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
             xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
             xmlns:my="http://www.example.com/"
             xmlns:saxon="http://saxon.sf.net/"
             xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
             xmlns:xbl="http://www.w3.org/ns/xbl"
             xmlns:xxbl="http://orbeon.org/oxf/xml/xbl">
    
        <metadata xmlns="http://orbeon.org/oxf/xml/form-builder">
            <display-name lang="en">Custom Controls</display-name>
        </metadata>
    
        <xbl:binding id="my-country-selector" element="my|country-selector" xxbl:mode="lhha binding value">
            <fb:metadata>
                <fb:display-name lang="en">Country Selector</fb:display-name>
                <fb:icon lang="en">
                    <fb:small-icon>/forms/orbeon/builder/images/dropdown.png</fb:small-icon>
                    <fb:large-icon>/forms/orbeon/builder/images/dropdown.png</fb:large-icon>
                </fb:icon>
                <fb:datatype>xforms:string</fb:datatype>
                <fb:template>
                    <my:country-selector>
                        <xforms:label ref=""/>
                        <xforms:hint ref=""/>
                        <xforms:help ref=""/>
                        <xforms:alert ref=""/>
                    </my:country-selector>
                </fb:template>
            </fb:metadata>
            <xbl:template>
                <xforms:select1 appearance="minimal" ref="xxf:binding('my-country-selector')">
                    <xforms:item>
                        <xforms:label>[Select...]</xforms:label>
                        <xforms:value/>
                    </xforms:item>
                    <xforms:itemset nodeset="doc('oxf:/forms/orbeon/controls/service/countries.xml')/countries/country">
                        <xforms:label ref="name"/>
                        <xforms:value ref="us-code"/>
                    </xforms:itemset>
                </xforms:select1>
            </xbl:template>
        </xbl:binding>
    </xbl:xbl>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my my_lifts_list.xml: <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=wrap_content android:layout_height=wrap_content android:orientation=vertical android:background=@drawable/white_linen> <LinearLayout android:id=@+id/bottom_control_bar
I have an xml with control definitions <?xml version=1.0 encoding=utf-8?> <Controls> <TabControl> <Properties> <Dock>5</Dock>
Here is my page: http://budclarychevy.com/custom/parts-specials-test My aim is to have the images clickable and
I created a custom control in my ASP MVC application. Here is the Html
I learnt about DesignMode here How to refresh a winform custom control at design
I've got and idea on how to create custom control here: Android interface -
I'm having some trouble styling a custom control that I built. Here's the control
Here is my Web.config file: <?xml version=1.0?> <configuration> <system.web> <customErrors mode=Off /> <compilation debug=true
Ok guys and gals, here is my problem: I've built a custom control that
I build my own widget with dojo as discussed here: Custom Widget Now, I

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.