Show more 10 item Dynamic Data DropDown

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

Show more 10 item Dynamic Data DropDown


I modified the file countries.xpl to redirect and load data from my company from xml.

I need show much items in a dinamyc data dropdown.

I modified the countries.xpl in this line:

<xsl:copy-of select="/countries/country[starts-with(lower-case(name),lower-case($name))][10 >= position()]"/>

if i update the value "10" to number less 10, example "8", this works and i see only 8 items in the dinamyc data drop down.

but if i modify this value "10" to a number higher from 10 example "11" i see only 10 item in the dinamyc data, not 11 or more.

My questions is this: ¿It's possible show more than 10 item in the dynamic data dropdown?

¿It's correctly modified the number of the line <xsl:copy-of select="/countries...? or i need modified other line in the xpl?

I attacht the code from xpl to continued:

<p:config xmlns:p=""

    <p:param name="instance" type="input"/>
    <p:param name="data" type="output"/>

    <p:processor name="oxf:request">
        <p:input name="config">
                <include>/request/parameters/parameter[name = 'country-name']</include>
                <include>/request/parameters/parameter[name = 'all']</include>
        <p:output name="data" id="request"/>

    <p:processor name="oxf:xslt">
        <p:input name="data" href="countries.xml"/>
        <p:input name="request" href="#request"/>
        <p:input name="instance" href="#instance"/>
        <p:input name="config">
            <countries xsl:version="2.0">
                    select="if (doc('input:instance')/*/@xsi:nil = 'true')                                      (: No instance was posted to this service :)
                            then doc('input:request')/request/parameters/parameter[name = 'country-name']/value (: Try getting request parameter :)
                            else doc('input:instance')/instance/country-name                                    (: Use name in posted instance :)"/>
                    select="doc('input:request')/request/parameters/parameter[name = 'all']/value = 'true'"/>
                    <xsl:when test="empty($name)">
                        <xsl:copy-of select="/countries/country[$all or position() le 10]"/>
                        <xsl:copy-of select="/countries/country[starts-with(lower-case(name), lower-case($name))][11 >= position()]"/>
        <p:output name="data" ref="data"/>


Help my please.
 Many thanks Regards
Reply | Threaded
Open this post in threaded view

Re: Show more 10 item Dynamic Data DropDown

Alessandro  Vernet
Hi Alejandro,

You certainly can, by adding the `max-results-displayed` attribute on the `<fr:autocomplete>`. You can also find an example and more information about `max-results-displayed` in the following section of the documentation:

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