Can't select autocomplete items

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

Can't select autocomplete items

Kyle Cahoon
Hi OPS users, Or is it OF users?
 
I been using a script written by James Melanson for auto-complete in my html forms. You can have as many different auto-complete fields as you want for different item sets. It implements a true completion feature by showing a prompt in the input field for the completion of the term rather than the auto-suggest-select style which can also be useful, but for the form I'm using I prefer the word prompt. I used these forms with Xquery and Xupdate to add data to an eXist database from a regular HTML form. Now I want to use xforms in OF for the additional features. I don't think I can use Melanson's script because it works with 'onkeyup' only. The auto-suggest appearance feature in orbeon is cool but doesn't always allow me to select the item. On a number of attempts the itemset vanishes when I try to select one from the list. Any suggestions? Also, can I run Xquery directly in Orbeon?
 
Thanks to Orbeon for the great product, and the book-cast tutorial is excellent.
 
Kyle Cahoon
 


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Can't select autocomplete items

Kyle Cahoon
Hi,
 
I cut the list of items I was using in the xml file from 200+ to 40 and the autocomplete feature works perfectly. Next I'd like try accessing the list from an xml document stored in eXist or from a dynamically generated list document taken from a much larger database collection, or even directly from the collection preferably using xquery. If anyone knows how I might implement this with OF platform I would be all ears? Thanks.
----- Original Message -----
Sent: Monday, April 02, 2007 5:52 PM
Subject: [ops-users] Can't select autocomplete items

Hi OPS users, Or is it OF users?
 
I been using a script written by James Melanson for auto-complete in my html forms. You can have as many different auto-complete fields as you want for different item sets. It implements a true completion feature by showing a prompt in the input field for the completion of the term rather than the auto-suggest-select style which can also be useful, but for the form I'm using I prefer the word prompt. I used these forms with Xquery and Xupdate to add data to an eXist database from a regular HTML form. Now I want to use xforms in OF for the additional features. I don't think I can use Melanson's script because it works with 'onkeyup' only. The auto-suggest appearance feature in orbeon is cool but doesn't always allow me to select the item. On a number of attempts the itemset vanishes when I try to select one from the list. Any suggestions? Also, can I run Xquery directly in Orbeon?
 
Thanks to Orbeon for the great product, and the book-cast tutorial is excellent.
 
Kyle Cahoon
 



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Can't select autocomplete items

marc-62
Kyle Cahoon a écrit :
> Hi,
>  
> I cut the list of items I was using in the xml file from 200+ to 40
> and the autocomplete feature works perfectly. Next I'd like try
> accessing the list from an xml document stored in eXist or from a
> dynamically generated list document taken from a much larger database
> collection, or even directly from the collection preferably using
> xquery. If anyone knows how I might implement this with OF platform I
> would be all ears? Thanks.

Hi Kyle,

You can check the 'xforms-value-changed' event on the autocomplete
control and send a submission to update the XML itemset binding to this
control.

This submission may be a REST call on an eXist database, a call to a xpl
file where you may query a SQL database, a XML file, aWebService , a
call to a Java processor etc....

HTH,

Marc



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Can't select autocomplete items

Kyle Cahoon
Thanks Marc,

I've got the list coming from the database but now I getting the same
problem I was having before with not being able to select an item from the
list - most of the time I can select an item but frequently it won't work
(the list disappears leaving the single letter in the input field). I read
about the repeat problem and got the latest build, hopefully the glitch I
having will be remedied also.

Kyle

----- Original Message -----
From: "marc" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, April 03, 2007 3:46 AM
Subject: Re: [ops-users] Can't select autocomplete items


> Kyle Cahoon a écrit :
>> Hi,
>>
>> I cut the list of items I was using in the xml file from 200+ to 40
>> and the autocomplete feature works perfectly. Next I'd like try
>> accessing the list from an xml document stored in eXist or from a
>> dynamically generated list document taken from a much larger database
>> collection, or even directly from the collection preferably using
>> xquery. If anyone knows how I might implement this with OF platform I
>> would be all ears? Thanks.
>
> Hi Kyle,
>
> You can check the 'xforms-value-changed' event on the autocomplete
> control and send a submission to update the XML itemset binding to this
> control.
>
> This submission may be a REST call on an eXist database, a call to a xpl
> file where you may query a SQL database, a XML file, aWebService , a
> call to a Java processor etc....
>
> HTH,
>
> Marc
>
>

--------------------------------------------------------------------------------


>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Can't select autocomplete items

Kyle Cahoon
I had to use the full path name in the xpl file to access the db.

<p:input name="data" href="http://localhost/exist/rest/db/countries.xml"/>

----- Original Message -----
From: "Kyle Cahoon" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, April 03, 2007 11:26 AM
Subject: Re: [ops-users] Can't select autocomplete items


Thanks Marc,

I've got the list coming from the database but now I getting the same
problem I was having before with not being able to select an item from the
list - most of the time I can select an item but frequently it won't work
(the list disappears leaving the single letter in the input field). I read
about the repeat problem and got the latest build, hopefully the glitch I
having will be remedied also.

Kyle

----- Original Message -----
From: "marc" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, April 03, 2007 3:46 AM
Subject: Re: [ops-users] Can't select autocomplete items


> Kyle Cahoon a écrit :
>> Hi,
>>
>> I cut the list of items I was using in the xml file from 200+ to 40
>> and the autocomplete feature works perfectly. Next I'd like try
>> accessing the list from an xml document stored in eXist or from a
>> dynamically generated list document taken from a much larger database
>> collection, or even directly from the collection preferably using
>> xquery. If anyone knows how I might implement this with OF platform I
>> would be all ears? Thanks.
>
> Hi Kyle,
>
> You can check the 'xforms-value-changed' event on the autocomplete
> control and send a submission to update the XML itemset binding to this
> control.
>
> This submission may be a REST call on an eXist database, a call to a xpl
> file where you may query a SQL database, a XML file, aWebService , a
> call to a Java processor etc....
>
> HTH,
>
> Marc
>
>

--------------------------------------------------------------------------------


>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>





--------------------------------------------------------------------------------


>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Can't select autocomplete items

Erik Bruchez
Administrator
In reply to this post by Kyle Cahoon
Kyle,

As Marc suggested, you can get a new set of data from a submission
everytime the user types a character.

But if you data set if not "too" large, you can store it into an
instance (preferably with xxforms:readonly="true" and
xxforms:shared="application") and write a "smarter" XPath expression
on xforms:itemset, for example:

<xforms:itemset
   nodeset="for $current in . return
     if (normalize-space($current) = '')
     then (instance('my')/entry/label)[position() le 10]
     else (instance('my')/entry/label[starts-with(.,
$current)])[position() le 10]">
   <xforms:label ref="."/>
   <xforms:value ref="."/>
</xforms:itemset>

This will keep the itemset small (here, at most 10 elements).

-Erik

Kyle Cahoon wrote:
 > Thanks Marc,
 >
 > I've got the list coming from the database but now I getting the same
 > problem I was having before with not being able to select an item from
 > the list - most of the time I can select an item but frequently it won't
 > work (the list disappears leaving the single letter in the input field).
 > I read about the repeat problem and got the latest build, hopefully the
 > glitch I having will be remedied also.
 >
 > Kyle
 >
 > ----- Original Message ----- From: "marc" <[hidden email]>
 > To: <[hidden email]>
 > Sent: Tuesday, April 03, 2007 3:46 AM
 > Subject: Re: [ops-users] Can't select autocomplete items
 >
 >
 >> Kyle Cahoon a écrit :
 >>> Hi,
 >>>
 >>> I cut the list of items I was using in the xml file from 200+ to 40
 >>> and the autocomplete feature works perfectly. Next I'd like try
 >>> accessing the list from an xml document stored in eXist or from a
 >>> dynamically generated list document taken from a much larger database
 >>> collection, or even directly from the collection preferably using
 >>> xquery. If anyone knows how I might implement this with OF platform I
 >>> would be all ears? Thanks.
 >>
 >> Hi Kyle,
 >>
 >> You can check the 'xforms-value-changed' event on the autocomplete
 >> control and send a submission to update the XML itemset binding to this
 >> control.
 >>
 >> This submission may be a REST call on an eXist database, a call to a xpl
 >> file where you may query a SQL database, a XML file, aWebService , a
 >> call to a Java processor etc....
 >>
 >> HTH,
 >>
 >> Marc

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Can't select autocomplete items

Kyle Cahoon
Thanks Erik,

Can I include an xpath expression when making the REST call to an eXist
collection within the src attribute of the instance to minimize the results
into a workable data set instance.

Kyle

----- Original Message -----
From: "Erik Bruchez" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, April 03, 2007 12:40 PM
Subject: Re: [ops-users] Can't select autocomplete items


> Kyle,
>
> As Marc suggested, you can get a new set of data from a submission
> everytime the user types a character.
>
> But if you data set if not "too" large, you can store it into an
> instance (preferably with xxforms:readonly="true" and
> xxforms:shared="application") and write a "smarter" XPath expression
> on xforms:itemset, for example:
>
> <xforms:itemset
>   nodeset="for $current in . return
>     if (normalize-space($current) = '')
>     then (instance('my')/entry/label)[position() le 10]
>     else (instance('my')/entry/label[starts-with(.,
> $current)])[position() le 10]">
>   <xforms:label ref="."/>
>   <xforms:value ref="."/>
> </xforms:itemset>
>
> This will keep the itemset small (here, at most 10 elements).
>
> -Erik
>
> Kyle Cahoon wrote:
> > Thanks Marc,
> >
> > I've got the list coming from the database but now I getting the same
> > problem I was having before with not being able to select an item from
> > the list - most of the time I can select an item but frequently it won't
> > work (the list disappears leaving the single letter in the input field).
> > I read about the repeat problem and got the latest build, hopefully the
> > glitch I having will be remedied also.
> >
> > Kyle
> >
> > ----- Original Message ----- From: "marc" <[hidden email]>
> > To: <[hidden email]>
> > Sent: Tuesday, April 03, 2007 3:46 AM
> > Subject: Re: [ops-users] Can't select autocomplete items
> >
> >
> >> Kyle Cahoon a écrit :
> >>> Hi,
> >>>
> >>> I cut the list of items I was using in the xml file from 200+ to 40
> >>> and the autocomplete feature works perfectly. Next I'd like try
> >>> accessing the list from an xml document stored in eXist or from a
> >>> dynamically generated list document taken from a much larger database
> >>> collection, or even directly from the collection preferably using
> >>> xquery. If anyone knows how I might implement this with OF platform I
> >>> would be all ears? Thanks.
> >>
> >> Hi Kyle,
> >>
> >> You can check the 'xforms-value-changed' event on the autocomplete
> >> control and send a submission to update the XML itemset binding to this
> >> control.
> >>
> >> This submission may be a REST call on an eXist database, a call to a
> >> xpl
> >> file where you may query a SQL database, a XML file, aWebService , a
> >> call to a Java processor etc....
> >>
> >> HTH,
> >>
> >> Marc
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>
>
>

--------------------------------------------------------------------------------


>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Accessing data from an eXist collection

Kyle Cahoon
In reply to this post by marc-62
Hi,

Ok I think I've figured out using submission to add a data set to an xforms
instance and to collect a subset of this for the item set. What I want to do
is something like the following (using the book-cast as an example):

I have separated the books from the sample-data.xml file into separate
book1.xml, book2.xml, book3.xml documents within a book-cast collection in
the eXist database. Next I created a sample-data.xq file:

for $books in collection('book-cast')/books return
<books>{$books/book}</books>

that returns a document identicle to the sample-data.xml file. Now I want to
access the data with something like the follwing:

<xforms:submission id="sample-data-submission" serialize="false"
method="get" action="/exist/rest/db/books/sample-data.xq"
replace="instance" instance="books-instance"/>

Is this feasible? If not, how can it be done?

Thanks for all the advice,

Kyle




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Accessing data from an eXist collection

Marcus-2
Hi Kyle,

sorry i have not the time to describe it in detail, but take a look at the
"Government Forms" Example. There they also save each document to a single
xml-file into a collection in exist! When you open the source direktory,
you'll find also subdirectories with detail information for each form!
(Schema, model, view, ...) And also there is an "summery-query.xml" file.
Here you can see how to get all data from one collection into one instance!

Hope that will help you.
Marcus


----- Original Message -----
From: "Kyle Cahoon" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, April 04, 2007 12:18 AM
Subject: [ops-users] Accessing data from an eXist collection


> Hi,
>
> Ok I think I've figured out using submission to add a data set to an
> xforms
> instance and to collect a subset of this for the item set. What I want to
> do
> is something like the following (using the book-cast as an example):
>
> I have separated the books from the sample-data.xml file into separate
> book1.xml, book2.xml, book3.xml documents within a book-cast collection in
> the eXist database. Next I created a sample-data.xq file:
>
> for $books in collection('book-cast')/books return
> <books>{$books/book}</books>
>
> that returns a document identicle to the sample-data.xml file. Now I want
> to
> access the data with something like the follwing:
>
> <xforms:submission id="sample-data-submission" serialize="false"
> method="get" action="/exist/rest/db/books/sample-data.xq"
> replace="instance" instance="books-instance"/>
>
> Is this feasible? If not, how can it be done?
>
> Thanks for all the advice,
>
> Kyle
>
>
>

--------------------------------------------------------------------------------


>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Accessing data from an eXist collection

fl.schmitt(ops-users)
In reply to this post by Kyle Cahoon
Hi Kyle,

> that returns a document identicle to the sample-data.xml file. Now I
> want to access the data with something like the follwing:

> <xforms:submission id="sample-data-submission" serialize="false"
> method="get" action="/exist/rest/db/books/sample-data.xq"
> replace="instance" instance="books-instance"/>

> Is this feasible? If not, how can it be done?

maybe this is what you intend:

http://www.orbeon.com/ops/doc/processors-submission#http-get

So you could use your submission as an input to the submission processor
and can access the query result - eigther on the processor output (if
the data needs to get manipulated before passed to the xforms page) or
connect the processor output to the pipeline output, so the data can get
accessed using XInclude or XSL:

http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-instance-initialization-pfc

HTH
florian



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Can't select autocomplete items

Erik Bruchez
Administrator
In reply to this post by Kyle Cahoon
Kyle,

You can either:

* Add a query parameter, e.g. using AVTs:

     action="/my/path/to/exist?limit={/my/limit}"

   and then extract the parameter from XQuery using the
   request:get-parameter() function, see:

     http://demo.exist-db.org/xquery/functions.xq

* Pass the entire XQuery on the action URL with a GET method instead
   of a POST method. This way you can dynamically buil your query
   directly in the action using AVTs. This is fine for short queries.

-Erik

Kyle Cahoon wrote:
 > Thanks Erik,
 >
 > Can I include an xpath expression when making the REST call to an eXist
 > collection within the src attribute of the instance to minimize the
 > results into a workable data set instance.
 >
 > Kyle
 >
 > ----- Original Message ----- From: "Erik Bruchez" <[hidden email]>
 > To: <[hidden email]>
 > Sent: Tuesday, April 03, 2007 12:40 PM
 > Subject: Re: [ops-users] Can't select autocomplete items
 >
 >
 >> Kyle,
 >>
 >> As Marc suggested, you can get a new set of data from a submission
 >> everytime the user types a character.
 >>
 >> But if you data set if not "too" large, you can store it into an
 >> instance (preferably with xxforms:readonly="true" and
 >> xxforms:shared="application") and write a "smarter" XPath expression
 >> on xforms:itemset, for example:
 >>
 >> <xforms:itemset
 >>   nodeset="for $current in . return
 >>     if (normalize-space($current) = '')
 >>     then (instance('my')/entry/label)[position() le 10]
 >>     else (instance('my')/entry/label[starts-with(.,
 >> $current)])[position() le 10]">
 >>   <xforms:label ref="."/>
 >>   <xforms:value ref="."/>
 >> </xforms:itemset>
 >>
 >> This will keep the itemset small (here, at most 10 elements).
 >>
 >> -Erik
 >>
 >> Kyle Cahoon wrote:
 >> > Thanks Marc,
 >> >
 >> > I've got the list coming from the database but now I getting the same
 >> > problem I was having before with not being able to select an item from
 >> > the list - most of the time I can select an item but frequently it
 >> won't
 >> > work (the list disappears leaving the single letter in the input
 >> field).
 >> > I read about the repeat problem and got the latest build,
hopefully the
 >> > glitch I having will be remedied also.
 >> >
 >> > Kyle
 >> >
 >> > ----- Original Message ----- From: "marc" <[hidden email]>
 >> > To: <[hidden email]>
 >> > Sent: Tuesday, April 03, 2007 3:46 AM
 >> > Subject: Re: [ops-users] Can't select autocomplete items
 >> >
 >> >
 >> >> Kyle Cahoon a écrit :
 >> >>> Hi,
 >> >>>
 >> >>> I cut the list of items I was using in the xml file from 200+ to 40
 >> >>> and the autocomplete feature works perfectly. Next I'd like try
 >> >>> accessing the list from an xml document stored in eXist or from a
 >> >>> dynamically generated list document taken from a much larger
database
 >> >>> collection, or even directly from the collection preferably using
 >> >>> xquery. If anyone knows how I might implement this with OF
platform I
 >> >>> would be all ears? Thanks.
 >> >>
 >> >> Hi Kyle,
 >> >>
 >> >> You can check the 'xforms-value-changed' event on the autocomplete
 >> >> control and send a submission to update the XML itemset binding to
 >> this
 >> >> control.
 >> >>
 >> >> This submission may be a REST call on an eXist database, a call to
 >> a >> xpl
 >> >> file where you may query a SQL database, a XML file, aWebService , a
 >> >> call to a Java processor etc....
 >> >>
 >> >> HTH,
 >> >>
 >> >> Marc

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

REST call to eXist w/ parameters from xfoms:submission

Kyle Cahoon
Thanks Erik,

I'm wondering why the following REST call to eXist works:

<xforms:submission id="sample-data-submission" serialize="false"
method="get"
action="/exist/rest/db/books/sample-data.xml" replace="instance"
instance="books-instance"/>

and this doesn't:

<xforms:submission id="sample-data-submission" serialize="false"
method="get"
action="/exist/rest/db/books?_query=//books&_wrap=no" replace="instance"
instance="books-instance"/>

When used with http://localhost in the browser, it returns identicle
documents.

Kyle



----- Original Message -----
From: "Erik Bruchez" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, April 04, 2007 11:59 AM
Subject: Re: [ops-users] Can't select autocomplete items


> Kyle,
>
> You can either:
>
> * Add a query parameter, e.g. using AVTs:
>
>     action="/my/path/to/exist?limit={/my/limit}"
>
>   and then extract the parameter from XQuery using the
>   request:get-parameter() function, see:
>
>     http://demo.exist-db.org/xquery/functions.xq
>
> * Pass the entire XQuery on the action URL with a GET method instead
>   of a POST method. This way you can dynamically buil your query
>   directly in the action using AVTs. This is fine for short queries.
>
> -Erik
>
> Kyle Cahoon wrote:
> > Thanks Erik,
> >
> > Can I include an xpath expression when making the REST call to an eXist
> > collection within the src attribute of the instance to minimize the
> > results into a workable data set instance.
> >
> > Kyle
> >
> > ----- Original Message ----- From: "Erik Bruchez" <[hidden email]>
> > To: <[hidden email]>
> > Sent: Tuesday, April 03, 2007 12:40 PM
> > Subject: Re: [ops-users] Can't select autocomplete items
> >
> >
> >> Kyle,
> >>
> >> As Marc suggested, you can get a new set of data from a submission
> >> everytime the user types a character.
> >>
> >> But if you data set if not "too" large, you can store it into an
> >> instance (preferably with xxforms:readonly="true" and
> >> xxforms:shared="application") and write a "smarter" XPath expression
> >> on xforms:itemset, for example:
> >>
> >> <xforms:itemset
> >>   nodeset="for $current in . return
> >>     if (normalize-space($current) = '')
> >>     then (instance('my')/entry/label)[position() le 10]
> >>     else (instance('my')/entry/label[starts-with(.,
> >> $current)])[position() le 10]">
> >>   <xforms:label ref="."/>
> >>   <xforms:value ref="."/>
> >> </xforms:itemset>
> >>
> >> This will keep the itemset small (here, at most 10 elements).
> >>
> >> -Erik
> >>
> >> Kyle Cahoon wrote:
> >> > Thanks Marc,
> >> >
> >> > I've got the list coming from the database but now I getting the same
> >> > problem I was having before with not being able to select an item
> >> > from
> >> > the list - most of the time I can select an item but frequently it
> >> won't
> >> > work (the list disappears leaving the single letter in the input
> >> field).
> >> > I read about the repeat problem and got the latest build,
> hopefully the
> >> > glitch I having will be remedied also.
> >> >
> >> > Kyle
> >> >
> >> > ----- Original Message ----- From: "marc" <[hidden email]>
> >> > To: <[hidden email]>
> >> > Sent: Tuesday, April 03, 2007 3:46 AM
> >> > Subject: Re: [ops-users] Can't select autocomplete items
> >> >
> >> >
> >> >> Kyle Cahoon a écrit :
> >> >>> Hi,
> >> >>>
> >> >>> I cut the list of items I was using in the xml file from 200+ to 40
> >> >>> and the autocomplete feature works perfectly. Next I'd like try
> >> >>> accessing the list from an xml document stored in eXist or from a
> >> >>> dynamically generated list document taken from a much larger
> database
> >> >>> collection, or even directly from the collection preferably using
> >> >>> xquery. If anyone knows how I might implement this with OF
> platform I
> >> >>> would be all ears? Thanks.
> >> >>
> >> >> Hi Kyle,
> >> >>
> >> >> You can check the 'xforms-value-changed' event on the autocomplete
> >> >> control and send a submission to update the XML itemset binding to
> >> this
> >> >> control.
> >> >>
> >> >> This submission may be a REST call on an eXist database, a call to
> >> a >> xpl
> >> >> file where you may query a SQL database, a XML file, aWebService , a
> >> >> call to a Java processor etc....
> >> >>
> >> >> HTH,
> >> >>
> >> >> Marc
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>
>
>


>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Accessing data from an eXist collection

Kyle Cahoon
In reply to this post by fl.schmitt(ops-users)
Thanks Florian,

I think the power of the MVC design is becoming clearer to me. I'll try to
work it as you suggest.

Kyle

----- Original Message -----
From: "Florian Schmitt" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, April 04, 2007 3:58 AM
Subject: Re: [ops-users] Accessing data from an eXist collection


> Hi Kyle,
>
>> that returns a document identicle to the sample-data.xml file. Now I
>> want to access the data with something like the follwing:
>
>> <xforms:submission id="sample-data-submission" serialize="false"
>> method="get" action="/exist/rest/db/books/sample-data.xq"
>> replace="instance" instance="books-instance"/>
>
>> Is this feasible? If not, how can it be done?
>
> maybe this is what you intend:
>
> http://www.orbeon.com/ops/doc/processors-submission#http-get
>
> So you could use your submission as an input to the submission processor
> and can access the query result - eigther on the processor output (if
> the data needs to get manipulated before passed to the xforms page) or
> connect the processor output to the pipeline output, so the data can get
> accessed using XInclude or XSL:
>
> http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-instance-initialization-pfc
>
> HTH
> florian
>
>

--------------------------------------------------------------------------------


>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: REST call to eXist w/ parameters from xfoms:submission

Alessandro Vernet
Administrator
In reply to this post by Kyle Cahoon
On 4/4/07, Kyle Cahoon <[hidden email]> wrote:
> <xforms:submission id="sample-data-submission" serialize="false"
> method="get"
> action="/exist/rest/db/books?_query=//books&_wrap=no" replace="instance"
> instance="books-instance"/>

The & in the above code is incorrect: you should have &amp; there, and
you should get a parsing error with the above code as-is.

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Accessing data from an eXist collection

Alessandro Vernet
Administrator
In reply to this post by Kyle Cahoon
On 4/3/07, Kyle Cahoon <[hidden email]> wrote:
> for $books in collection('book-cast')/books return
> <books>{$books/book}</books>

Kyle,

You can also do this with a simple submission:

<xforms:submission id="get-snapshots" method="get"
action="/exist/rest/db/ccm/snapshot?_query=
        for $books in collection('book-cast')/books return
        element books {{ $books/book}}"
    replace="instance" instance="books-instance"/>

Notice:

* The {{ }} which escapes the curly braces, which would otherwise be
interpreted as AVTs.
* The "element books {{ ... }}" instead of "<books>{{ ... }}</books>"
used here so we don't have to escape angled brackets at this is
written in an attribute.

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws