Custom dynamic data dropdown control with control details changed

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom dynamic data dropdown control with control details changed

piechos
This post was updated on .
Hey,
I've done my custom dynamic data dropdown control and changed its control details:

<xbl:xbl xmlns:xh="http://www.w3.org/1999/xhtml"
         xmlns:xf="http://www.w3.org/2002/xforms"
         xmlns:ev="http://www.w3.org/2001/xml-events"
         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-dictionary-selector" element="my|dictionary-selector" xxbl:mode="lhha binding value">
        <fb:metadata>
            <fb:display-name lang="en">Dictionary 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:template>
                <my:dictionary-selector>
                    <xf:label ref=""/>
                    <xf:hint ref=""/>
                    <xf:help ref=""/>
                    <xf:alert ref=""/>
                        <xf:itemset ref="()">
                            <xf:label ref="()"/>
                            <xf:value ref="()"/>
                        </xf:itemset>
                </my:dictionary-selector>
            </fb:template>
            <fb:control-details>
                <xf:input ref="@resource">
                    <xf:label lang="en">Dictionary</xf:label>
                    <xf:hint lang="en">Dictionary name returning data used for the suggestions</xf:hint>
                </xf:input>
            </fb:control-details>
        </fb:metadata>
        <xbl:template>
            <xf:select1 appearance="minimal" ref="xxf:binding('my-dictionary-selector')">
                <xf:item>
                    <xf:label>[Select...]</xf:label>
                    <xf:value/>
                </xf:item>
                <xf:itemset nodeset="doc('http://localhost:8080/OrbeonForm/resources/dictionaries/colors')/collection/dictionary">
                    <xf:label ref="key"/>
                    <xf:value ref="value"/>
                </xf:itemset>
            </xf:select1>
        </xbl:template>
    </xbl:binding>


</xbl:xbl>

and it works (takes values from the given xml), but now I want to give the user oportunity to choose the name of dictionary. So in URL to the xml file (http://localhost:8080/form/resources/dictionaries/colors), in place of colors, I want to insert string which user put in dictionary input in control details. How can I achieve it? Is it gonna change dropdown list after user click apply in control details?
Reply | Threaded
Open this post in threaded view
|

Re: Custom dynamic data dropdown control with control details changed

Alessandro  Vernet
Administrator
Hi,

Are you saying that you'd like the form author to be able to type "colors" (or another string, obviously), in the Form Builder control details dialog, instead of having this hardcoded in the XBL source?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Custom dynamic data dropdown control with control details changed

piechos
Reply | Threaded
Open this post in threaded view
|

Re: Custom dynamic data dropdown control with control details changed

Alessandro  Vernet
Administrator
Is this still a current issue, since I gather the issue you referenced in this other thread has been resolved?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet