English 中文(简体)
How to create a grouped XBL control
原标题:

I am trying to create an XBL control which groups together a xform date, a drop down and a text box in Orbeon with the following code snippet:

<xbl:binding id="fb-generalform" element="fr|GeneralForm">
    <metadata xmlns="http://orbeon.org/oxf/xml/form-builder">
        <display-name lang="en">General Form</display-name>
        <display-name lang="fr">Bouton navigateur</display-name>
        <icon lang="en">
            <small-icon>/forms/orbeon/builder/images/button.png</small-icon>
            <large-icon>/forms/orbeon/builder/images/button.png</large-icon>
        </icon> 
        <datatype>xs:string</datatype>
        <template>
            <xforms:select id="" appearance="xxforms:tree" ref="" xmlns="">
                <xforms:label ref=""/>
                <xforms:hint ref=""/>
                <xforms:help ref=""/>
                <xforms:alert ref="$fr-resources/detail/labels/alert"/>
                <xforms:itemset nodeset="">
                    <xforms:label ref="label"/>
                    <xforms:value ref="value"/>
                </xforms:itemset>
            </xforms:select>                
        </template>             
    </metadata>
</xbl:binding>

It works properly with one control but when I try to add more controls in the template, it does not reflect any changes on the screen. It only displays one control on the UI.

Can someone please guide me how can I make a grouped XBL control?

-Thanks

问题回答

The issue is that you are implementing the component inside the metadata/template. Instead, what you want to put inside <template> is how the component is to be used. That is: if you were writing XForms by hand (not using Form Builder), and were to use that component, what would it look like? Instead, the implementation of the component goes into <xbl:template>, which is missing in your code.

A simple example which you might find to be good inspiration is the date picker, for which you can see the source code.





相关问题
xform data grid

I am using orbeon to process my xforms. I am attempting to create a data grid that I can use to copy and paste rows/columns of data from my clipboard (excel). Do you have any clue how I can implement ...

Connect Chiba xForm to a restful web service (exist db)

I need to read an xml instance from an exist db. I am attempting to connect chiba to a restful web service via the following command: <xf:model> <xf:instance id="data-instance" ...

ISML PAC to XForm Conversion

Are there any tools or write-ups that can help in converting ISML PACs to XForms? Does anyone have experience in such a conversion?

XForms: how to deal with instance data that changes?

At the moment I am working on an XForms application to mutate XML data. This data comes from a local XML file. The file is exported from another application in a static way and read into the ...

Client side XForms processing tools [closed]

What would be the best client side javascript based XForms processor? I m trying to migrate plugin (activeX) based Xforms processing solution to a javascript based client side processor. But the ...

Default Values in XForms Input

I have an XForm that has certain fields that may often be left blank (optional street address). Is there is technique to set a default value for that field, preferably a space (I am running into weird ...

热门标签