show-full-itemset-dropdown="true" in fr:autocomplete doesn't display a button added next to the text field

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

show-full-itemset-dropdown="true" in fr:autocomplete doesn't display a button added next to the text field

jesintha_p
Hi all,

I recently downloaded orbeon3.8 CE and am trying to use the  fr:autocomplete tag, everything is working except that it is not showing the full list. The button that should be displaying next to the input box is not displaying. Below is my code.
                            <fr:autocomplete ref ="." dynamic-itemset ="false" show-full-itemset-dropdown = "true">
                                 <xforms:itemset nodeset="instance('nameTypeInstance')/meta:enumeration-item">
                                                <xforms:label ref="meta:value[@type='Value']"/>
                                                <xforms:value ref="meta:value[@type='Value']"/>
                                        </xforms:itemset>
          </fr:autocomplete> 
Can someone please tell me what is going wrong or am i missing on something.
Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: show-full-itemset-dropdown="true" in fr:autocomplete doesn't display a button added next to the text field

Alessandro  Vernet
Administrator
This feature has been added after the 3.8 release, so if this is the version you are using, that explains why you are not seeing that full list icon. I added a note in the documentation to mention when this was added.

http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components/autocomplete#TOC-Displaying-all-the-items

Maybe you can get the 3.9 RC1, and check if it works for for you in that version:

http://blog.orbeon.com/2011/03/orbeon-forms-390-release-candidate-1.html

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

Re: show-full-itemset-dropdown="true" in fr:autocomplete doesn't display a button added next to the text field

jesintha_p
Thanks Alessandro Vernet ,

it works fine in 3.9 RC1.

I have two more clarification. It would be great if you can help me.
 1.   I want to have a static auto-complete box but i don't want to load the instance on the load of the page as it  is more consuming( we have around 350 drop downs) and i want to load the instance on focus of the drop-down, The DOMFocusIn event doesn't work here. CAn you please guide me regarding what can be done to achieve this functionality. As i am told that the users will attempt to change only one or 2 boxes.

2.  I am using the dispatch event to load the dropdown on the edit screen, this fires the value on change events and fr- changed event (if it is a dynamic autocomplete box). IS there a way to filter out calling of the value on change and fr-changed event only when called from a specific  dispatch event.

Thanks in advance,
Jesi
Reply | Threaded
Open this post in threaded view
|

Re: show-full-itemset-dropdown="true" in fr:autocomplete doesn't display a button added next to the text field

Alessandro  Vernet
Administrator
Hi Jesi,

1. I added some code to forward the DOMFocusIn and DOMFocusOut to the component (it will be in the next nightly build):

https://github.com/orbeon/orbeon-forms/commit/96e651925bbb7d88612a6235a0dac2148ee86724

This way you can write:

<fr:autocomplete ...>
    <xforms:message ev:event="DOMFocusIn">Focus</xforms:message>

Here I just put an event handler that shows a message, but you should be able to write an event handler that loads the data by calling a service. Note that you won't be able to use this with the "show-full-itemset-dropdown" dropdown, as you'll only get the focus event when users click inside the text field, not when they click on the drop-down button.

2. What do you mean by "using the dispatch event to load the dropdown on the edit screen"?

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

Re: show-full-itemset-dropdown="true" in fr:autocomplete doesn't display a button added next to the text field

jesintha_p
HI Alex,
Thanks for your reply.

I meant when i bind a xpath with the auto-complete box with the ref="" attribute, and type in a value and save it. I reopen that and i want the already saved value in it.

For eg. i select Country "India", i want it show "india" in the autocomplete box when i open the xforms again in edit mode. This is not working by default so i am using the dispatch event to make it show the data.

I do have some code in the xforms-value-changed and fr-search-changed event, i don't want the dispatch event to trigger the xforms-value-changed and fr-search-changed event.

Just wanted to know if this is possible.

Thanks,
Jesi
Reply | Threaded
Open this post in threaded view
|

Re: show-full-itemset-dropdown="true" in fr:autocomplete doesn't display a button added next to the text field

Alessandro  Vernet
Administrator
Jesi,

Are you using the static or dynamic mode? If the static mode, and you have an item with that value, then the corresponding label should show up automatically. If using the dynamic mode, then you need to dispatch fr-set-label. You'll find more about this in this section:

http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components/autocomplete#TOC-Setting-by-value

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