Hi;
I'm an Orbeon novice and am tasked with learning and developing a tool in Orbeon Forms (with a view to learning enough to maintain existing Orbeon workflows). I'm really struggling to find answers/examples to do simple tasks/explain what it is that I'm supposed to be doing. I hope I'm missing something about how to search and/or read the forum and documentation. I have done the tutorials ("Hello" and "book-cast", but they don't seem to really help me to implement what I need to. Anyway: One of the things I'm trying to do currently is create an autocomplete drop-down which retrieves suggestions dynamically. I have seen the example at http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components/autocomplete however I don't quite understand what I need to do to get it working. Suggestions are retrieved from a uri akin to: http://mywebsite.com/personSearch.do?q=Berrisford&start=0&rows=20&sortField=p.displayname&sortOrder=asc and it returns something akin to: <?xml version="1.0" encoding="UTF-8"?> <results> <status>success</status> <result> <persons totalRecords="1" rows="20" start="0"> <person> <pid>my-user-pid</pid> <displayname>Surname, Berrisford</displayname> <theemail>berrisfordathome.com</theemail> </person> </persons> </result> </results> 1. Could someone kindly explain to me (walk me through) how to create this kind of autocomplete please? The aim is to have it update whenever the user inputs anything into the seach box. 2. Also I would like to retrieve, store and display all (3) person attributes in an instance. Is this possible with autocomplete (it seems to only allow for "label" and "value")? If so, how is this done (please)? 3. Is there some sort of "alternative strategy" to reading/searching the Orbeon documentation? So far I find myself going round and round in circles without being able to get any in depth examples/instructions about what I want to do. I feel I must be missing something fundamental here. |
Administrator
|
Hi Berrisford, On Wed, Nov 28, 2012 at 6:02 AM, Berrisford <[hidden email]> wrote:
1. Could someone kindly explain to me (walk me through) how to create this Are you using Form Builder, or writing XForms by hand? If you're writing XForms, I recommend you use the autocomplete in "resource" mode. And Form Builder provides a UI for the autocomplete in resource mode. Now, for this you'll need to use a 4.0 milestone build, as the resource mode wasn't available in 3.9. For the syntax, see the example in this section:
In your case, you would have: <xforms:itemset nodeset="/results/result/persons/person">
<xforms:label ref="displayname"/> <xforms:value ref="pid"/> </xforms:itemset> 2. Also I would like to retrieve, store and display all (3) person Only the following are stored in the instance: - The value, pointed to by ref.
- The label, pointed to by labelref. 3. Is there some sort of "alternative strategy" to reading/searching the I am using Google ;). Besides what Google can find for you, for the autocomplete, unit tests also shows you some different way in which it can be used. E.g. for the autocomplete:
And of course, if you can't find something, feel free to just ask a question here, and we'll do our best to answer. Alex Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alessandro;
Thanks for your response. Seems I have a number of problems then:
I’m writing XForms by hand. The aim is to use XPL models and xml views.
Unfortunately, I’m currently bound to using Orbeon 3.8 (!!), so it seems, that’s
a total no, no. (I’m [unfortunately] not at liberty to upgrade). Based on the
nature of the autocomplete (as you’re saying), seems autocomplete is
inappropriate for what I want anyway, as I would like to display details such as
email, pid and name to the user for confirmation. I suppose they could be
concatenated, but not very elegant/user friendly. Seems like a (data)table
might be more appropriate here.
Thanks...
************************************************* Berrisford Edwards [hidden email] Ph: +447917464336 From: [hidden email]
Sent: Tuesday, December 04, 2012 12:20 AM
To: [hidden email]
Subject: Re: Auto complete example Hi Berrisford,
On Wed, Nov 28, 2012 at 6:02 AM, Berrisford <<A
href="wlmailhtml:/user/SendEmail.jtp?type=node&node=4656056&i=0"
rel=nofollow target=_top link="external">[hidden email]>
wrote:
1. Could someone kindly explain to me (walk me through) how to create this Are you using Form Builder, or writing XForms by hand? If you're writing
XForms, I recommend you use the autocomplete in "resource" mode. And Form
Builder provides a UI for the autocomplete in resource mode. Now, for this
you'll need to use a 4.0 milestone build, as the resource mode wasn't available
in 3.9. For the syntax, see the example in this section:
In your case, you would have:
  <xforms:itemset nodeset="/results/result/persons/person">
    <xforms:label
ref="displayname"/>
    <xforms:value ref="pid"/>
  </xforms:itemset> 2. Also I would like to retrieve, store and display all (3) person Only the following are stored in the instance:
- The value, pointed to by ref.
- The label, pointed to by labelref.
Â
3. Is there some sort of "alternative strategy" to reading/searching the I am using Google ;). Besides what Google can find for you, for the
autocomplete, unit tests also shows you some different way in which it can be
used. E.g. for the autocomplete:
And of course, if you can't find something, feel free to just ask a
question here, and we'll do our best to answer.
Alex Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- You receive this message as a subscriber of the <A href="wlmailhtml:/user/SendEmail.jtp?type=node&node=4656056&i=1" rel=nofollow target=_top link="external">[hidden email] mailing list. To unsubscribe: mailto:<A href="wlmailhtml:/user/SendEmail.jtp?type=node&node=4656056&i=2" rel=nofollow target=_top link="external">[hidden email] For general help: mailto:<A href="wlmailhtml:/user/SendEmail.jtp?type=node&node=4656056&i=3" rel=nofollow target=_top link="external">[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws If you reply to this email, your message will be
added to the discussion below: http://orbeon-forms-ops-users.24843.n4.nabble.com/Auto-complete-example-tp4656027p4656056.html
|
Administrator
|
Hi Berrisford,
You're correct: if you need to show multiple pieces on information related to each item, then the autocomplete, even as it stands in 4.0, is not a very good match. In that case, a table, which you could implement to be auto filtered based on the value users enter in field, seems like a better match.
Alex On Monday, December 3, 2012, Berrisford wrote:
-- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |