Hi there!
I have a few questions about using autocomplete: 1) Is the autocomplete feature only available in the trunk but not in the latest stable releases? Awkwardly I seem to remeber that I read something about it/used this in a version before 3.9? By beeing only present in the resource section of <http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components/autocom plete> the note "introduced after the 3.9 release" seems to imply that the other parts have been available before, right? 2) Is there going to be a new stable community based version available soon? The last stable was AFAICS released in 2011/05. 3) What's going to happen, if the value the user enters is not listed in the xml source the service returns and the user exits the autocomplete form field? Is the value going to remain or is it deleted? Can I somehow persist the value in the field? For us it is perfectly ok if the users enters a value which is not in the list of proposals, because we don't know any foreign country train station though they are valid. 4) Unfortunately I can't get any autocomplete field in my form. Do I have to add/activate/run anything? I inserted the following into my forms model and body section: Model: <xforms:instance id="train-stations"> <itemlist xmlns=""/> </xforms:instance> <xforms:instance id="train-stations-params"> <params xmlns=""> <search/> </params> </xforms:instance> <xforms:submission id="train-stations-update" validate="false" action="http://.../bc/list?type=train&query={instance('train-station s-params')//search}" method="post" serialization="application/xml" ref="instance('ticket')" replace="instance" instance="ticket"/> ------------------------------------------------------------------------ --------------------------------- Body: <fr:autocomplete ref="/train/@code" labelrefs="/train/@name" resource="http://.../bc/list?type=train&query={$fr-search-value}" max-results-displayed="10"> <xforms:label>Country code: </xforms:label> <xforms:itemset nodeset="//item"> <xforms:label ref="text()"/> <xforms:value ref="@code"/> </xforms:itemset> </fr:autocomplete> <fr:autocomplete ref="instance('train-stations')//item/@code" labelref="instance('train-stations')//item" id="dynamic-autocomplete" dynamic-itemset="true"> <!-- React to user searching --> <xforms:action ev:event="fr-search-changed"> <xxforms:variable name="search-value" select="event('fr-search-value')"/> <xxforms:variable name="make-suggestion" select="string-length($search-value) >= 0"/> <xforms:action if="$make-suggestion"> <!-- Update itemset --> <xforms:setvalue ref="instance('train-stations-params')//search" value="$search-value"/> <xforms:send submission="train-stations-update"/> </xforms:action> <xforms:action if="not($make-suggestion)"> <!-- Delete itemset --> <xforms:delete nodeset="instance('train-stations')//item"/> </xforms:action> </xforms:action> <xforms:label>Train station: </xforms:label> <xforms:itemset nodeset="instance('train-stations')//item"> <xforms:label ref="."/> <xforms:value ref="@code"/> </xforms:itemset> </fr:autocomplete> ------------------------------------------------------------------------ --------------------------------- As you can see I tried the resource method as well as the dynamic method. I'm not that sure about the dynamic method part because the wiki is not that explicit about it and I miss explanations for the usage of all the different instances. Though I guess the input should have appeared at least, shouldn't it? It's perfectly understandable the resource method doesn't work - we're using "Orbeon Forms 3.9.0.rc1.201103220245 CE". But what's wrong about the dynamic part? Oh, it's not about a missing namespace - xmlns:fr="http://orbeon.org/oxf/xml/form-runner" is defined ;-) Thanks a lot in advance, Thorsten -- 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 |
Hi!
Can't anyone help me on that topic? Sorry, that I have to push that issue! Thanks, JT > -----Ursprüngliche Nachricht----- > Von: Stumpf, Jens Thorsten [mailto:Thorsten.Stumpf- > [hidden email]] > Gesendet: Dienstag, 17. April 2012 21:48 > An: [hidden email] > Betreff: [ops-users] Autocomplete > > Hi there! > > I have a few questions about using autocomplete: > > 1) > Is the autocomplete feature only available in the trunk but not in the latest > stable releases? > Awkwardly I seem to remeber that I read something about it/used this in a > version before 3.9? > By beeing only present in the resource section of > <http://wiki.orbeon.com/forms/doc/developer-guide/xbl- > components/autocom > plete> the note "introduced after the 3.9 release" seems to imply that > the other parts have been available before, right? > > 2) > Is there going to be a new stable community based version available soon? > The last stable was AFAICS released in 2011/05. > > 3) > What's going to happen, if the value the user enters is not listed in the xml > source the service returns and the user exits the autocomplete form field? > Is the value going to remain or is it deleted? > Can I somehow persist the value in the field? For us it is perfectly ok if the > users enters a value which is not in the list of proposals, because we don't > know any foreign country train station though they are valid. > > 4) > Unfortunately I can't get any autocomplete field in my form. Do I have to > add/activate/run anything? > I inserted the following into my forms model and body section: > > Model: > > <xforms:instance id="train-stations"> > <itemlist xmlns=""/> > </xforms:instance> > <xforms:instance id="train-stations-params"> > <params xmlns=""> > <search/> > </params> > </xforms:instance> > <xforms:submission id="train-stations-update" > validate="false" > action="http://.../bc/list?type=train&query={instance('train-station > s-params')//search}" method="post" serialization="application/xml" > ref="instance('ticket')" replace="instance" instance="ticket"/> > ------------------------------------------------------------------------ > --------------------------------- > > Body: > <fr:autocomplete ref="/train/@code" labelrefs="/train/@name" > > resource="http://.../bc/list?type=train&query={$fr-search-value}" > max-results-displayed="10"> > <xforms:label>Country code: </xforms:label> > <xforms:itemset nodeset="//item"> > <xforms:label ref="text()"/> > <xforms:value ref="@code"/> > </xforms:itemset> > </fr:autocomplete> > > <fr:autocomplete > ref="instance('train-stations')//item/@code" > labelref="instance('train-stations')//item" > id="dynamic-autocomplete" > dynamic-itemset="true"> > > <!-- React to user searching --> > <xforms:action ev:event="fr-search-changed"> > <xxforms:variable name="search-value" > select="event('fr-search-value')"/> > <xxforms:variable name="make-suggestion" > select="string-length($search-value) >= 0"/> > <xforms:action if="$make-suggestion"> > <!-- Update itemset --> > <xforms:setvalue ref="instance('train-stations-params')//search" > value="$search-value"/> > <xforms:send > submission="train-stations-update"/> > </xforms:action> > <xforms:action if="not($make-suggestion)"> > <!-- Delete itemset --> > <xforms:delete > nodeset="instance('train-stations')//item"/> > </xforms:action> > </xforms:action> > > <xforms:label>Train station: </xforms:label> > <xforms:itemset > nodeset="instance('train-stations')//item"> > <xforms:label ref="."/> > <xforms:value ref="@code"/> > </xforms:itemset> > </fr:autocomplete> > ------------------------------------------------------------------------ > --------------------------------- > > As you can see I tried the resource method as well as the dynamic method. > I'm not that sure about the dynamic method part because the wiki is not that > explicit about it and I miss explanations for the usage of all the different > instances. > Though I guess the input should have appeared at least, shouldn't it? > > It's perfectly understandable the resource method doesn't work - we're > using "Orbeon Forms 3.9.0.rc1.201103220245 CE". > But what's wrong about the dynamic part? > Oh, it's not about a missing namespace - > xmlns:fr="http://orbeon.org/oxf/xml/form-runner" is defined ;-) > > Thanks a lot in advance, > > Thorsten -- 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 |
Administrator
|
In reply to this post by Thorsten Stumpf
Hi Thorsten,
1. It is available in 3.9, but a number of improvements / fixes went into the autocomplete since the. 2. We plan to have a major release "soon", but I would say that we are at least one month away at this point. 3. The value will be deleted. If you want the value to stay, write the service to always return an item with the value entered by users. 4. Hard to say by just looking at the code. I'd recommend you try your code on a nightly build. If the problem is still there, create a reproducible example and post it here. If not, and the issue is 3.9-only, also feel free to create a reproducible example and post it here, but you're a bit less likely to get a response ;). I hope this helps (and no problem for the gentle push!). Alex On Tue, Apr 17, 2012 at 12:48 PM, Stumpf, Jens Thorsten <[hidden email]> wrote: > Hi there! > > I have a few questions about using autocomplete: > > 1) > Is the autocomplete feature only available in the trunk but not in the > latest stable releases? > Awkwardly I seem to remeber that I read something about it/used this in > a version before 3.9? > By beeing only present in the resource section of > <http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components/autocom > plete> the note "introduced after the 3.9 release" seems to imply that > the other parts have been available before, right? > > 2) > Is there going to be a new stable community based version available > soon? > The last stable was AFAICS released in 2011/05. > > 3) > What's going to happen, if the value the user enters is not listed in > the xml source the service returns and the user exits the autocomplete > form field? > Is the value going to remain or is it deleted? > Can I somehow persist the value in the field? For us it is perfectly ok > if the users enters a value which is not in the list of proposals, > because we don't know any foreign country train station though they are > valid. > > 4) > Unfortunately I can't get any autocomplete field in my form. Do I have > to add/activate/run anything? > I inserted the following into my forms model and body section: > > Model: > > <xforms:instance id="train-stations"> > <itemlist xmlns=""/> > </xforms:instance> > <xforms:instance id="train-stations-params"> > <params xmlns=""> > <search/> > </params> > </xforms:instance> > <xforms:submission id="train-stations-update" > validate="false" > action="http://.../bc/list?type=train&query={instance('train-station > s-params')//search}" method="post" serialization="application/xml" > ref="instance('ticket')" replace="instance" instance="ticket"/> > ------------------------------------------------------------------------ > --------------------------------- > > Body: > <fr:autocomplete ref="/train/@code" labelrefs="/train/@name" > > resource="http://.../bc/list?type=train&query={$fr-search-value}" > max-results-displayed="10"> > <xforms:label>Country code: </xforms:label> > <xforms:itemset nodeset="//item"> > <xforms:label ref="text()"/> > <xforms:value ref="@code"/> > </xforms:itemset> > </fr:autocomplete> > > <fr:autocomplete > ref="instance('train-stations')//item/@code" > labelref="instance('train-stations')//item" > id="dynamic-autocomplete" > dynamic-itemset="true"> > > <!-- React to user searching --> > <xforms:action ev:event="fr-search-changed"> > <xxforms:variable name="search-value" > select="event('fr-search-value')"/> > <xxforms:variable name="make-suggestion" > select="string-length($search-value) >= 0"/> > <xforms:action if="$make-suggestion"> > <!-- Update itemset --> > <xforms:setvalue > ref="instance('train-stations-params')//search" > value="$search-value"/> > <xforms:send > submission="train-stations-update"/> > </xforms:action> > <xforms:action if="not($make-suggestion)"> > <!-- Delete itemset --> > <xforms:delete > nodeset="instance('train-stations')//item"/> > </xforms:action> > </xforms:action> > > <xforms:label>Train station: </xforms:label> > <xforms:itemset > nodeset="instance('train-stations')//item"> > <xforms:label ref="."/> > <xforms:value ref="@code"/> > </xforms:itemset> > </fr:autocomplete> > ------------------------------------------------------------------------ > --------------------------------- > > As you can see I tried the resource method as well as the dynamic > method. > I'm not that sure about the dynamic method part because the wiki is not > that explicit about it and I miss explanations for the usage of all the > different instances. > Though I guess the input should have appeared at least, shouldn't it? > > It's perfectly understandable the resource method doesn't work - we're > using "Orbeon Forms 3.9.0.rc1.201103220245 CE". > But what's wrong about the dynamic part? > Oh, it's not about a missing namespace - > xmlns:fr="http://orbeon.org/oxf/xml/form-runner" is defined ;-) > > Thanks a lot in advance, > > Thorsten > > > -- > 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 -- 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 |