problem with autocomplete

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

problem with autocomplete

ricetrac

Hello,

 

I use in my forms an dynamic autocomplete like this :

 

<fr:autocomplete ref="/form/FormCommunOrbeon/DemandeTiers/mvAdresses/CTierAdresseVO[mbUsuel='true']/msCodePostale" dynamic-itemset="true" class="INPUT92" style="width: 5em; z-index:10">

                <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) >= 1"/>

                                <xforms:action if="$make-suggestion">

                                               <xforms:setvalue ref="instance('villechoisi')/msCodePostale" value="$search-value"/>

                                               <xforms:send submission="autoCompleteA"/>

                                </xforms:action>

                </xforms:action>

                <xforms:itemset nodeset="instance('ville')/codepostal">

                                <xforms:label ref="."/>

                                <xforms:value ref="."/>

                </xforms:itemset>

                <xforms:alert>Veuillez saisir le code postal</xforms:alert>

</fr:autocomplete>

 

 

 

There are several pages, and can move to next page or return to a previous page.

A main instance is transmitted from one page to another.

With this autocomplete, I update the field « /form/FormCommunOrbeon/DemandeTiers/mvAdresses/CTierAdresseVO[mbUsuel='true']/msCodePostale » in the main instance. When I go to the next page, the value of this field is well preserved.

But when I return to this page, this field is empty !

 

The autocomplete field empty, because all my other fields of my form have retained their value correctly.

 

When I arrived the first time on this page, and that the field already contains a value, that value is deleted.

 

It is a bug, or a limit of the autocomplete ? or there is a solution to preserve the value ?

 

Thank You.

 

Julien.

 


Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente não imprimindo este correio electrónico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

--
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
Reply | Threaded
Open this post in threaded view
|

Re: problem with autocomplete

Ethan Gruber
Hi Julien,

You need to set the label of the autocomplete on form load.  I think this thread will help: http://orbeon-forms-ops-users.24843.n4.nabble.com/Setting-content-of-text-field-in-fr-autocomplete-td2216656.html

Ethan

On Tue, Aug 31, 2010 at 1:41 PM, Bittard, Julien <[hidden email]> wrote:

Hello,

 

I use in my forms an dynamic autocomplete like this :

 

<fr:autocomplete ref="/form/FormCommunOrbeon/DemandeTiers/mvAdresses/CTierAdresseVO[mbUsuel='true']/msCodePostale" dynamic-itemset="true" class="INPUT92" style="width: 5em; z-index:10">

                <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) >= 1"/>

                                <xforms:action if="$make-suggestion">

                                               <xforms:setvalue ref="instance('villechoisi')/msCodePostale" value="$search-value"/>

                                               <xforms:send submission="autoCompleteA"/>

                                </xforms:action>

                </xforms:action>

                <xforms:itemset nodeset="instance('ville')/codepostal">

                                <xforms:label ref="."/>

                                <xforms:value ref="."/>

                </xforms:itemset>

                <xforms:alert>Veuillez saisir le code postal</xforms:alert>

</fr:autocomplete>

 

 

 

There are several pages, and can move to next page or return to a previous page.

A main instance is transmitted from one page to another.

With this autocomplete, I update the field « /form/FormCommunOrbeon/DemandeTiers/mvAdresses/CTierAdresseVO[mbUsuel='true']/msCodePostale » in the main instance. When I go to the next page, the value of this field is well preserved.

But when I return to this page, this field is empty !

 

The autocomplete field empty, because all my other fields of my form have retained their value correctly.

 

When I arrived the first time on this page, and that the field already contains a value, that value is deleted.

 

It is a bug, or a limit of the autocomplete ? or there is a solution to preserve the value ?

 

Thank You.

 

Julien.

 


Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente não imprimindo este correio electrónico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.


--
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




--
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
Reply | Threaded
Open this post in threaded view
|

RE: Re: problem with autocomplete

ricetrac

Hello Ehtan,

 

yes that was it, thank you very much.

I saw this in the documentation, but I did not actually understood what it was for.

 

But now I have another problem. To update my list, I am calling an XPL file that takes an xml file very large (3 MB) in this way :

 

<p:processor name="oxf:xslt">

        <p:input name="data" href="oxf:/config/perso/communesPostales.xml"/>

</p:processor>

 

And after several uses of the autocomplete, I have an OutOfMemory on my application. I put only 512 MB memory max on my jvm, but until I add that autocomplete, 512 MB was enough.

Is there another way to load a file in a processor to reduce memory consumption ?

 

Thank You.

 

Julien.

 

De : Ethan Gruber [mailto:[hidden email]]
Envoyé : mardi 31 août 2010 20:00
À : [hidden email]
Objet : [ops-users] Re: problem with autocomplete

 

Hi Julien,

You need to set the label of the autocomplete on form load.  I think this thread will help: http://orbeon-forms-ops-users.24843.n4.nabble.com/Setting-content-of-text-field-in-fr-autocomplete-td2216656.html

Ethan

On Tue, Aug 31, 2010 at 1:41 PM, Bittard, Julien <[hidden email]> wrote:

Hello,

 

I use in my forms an dynamic autocomplete like this :

 

<fr:autocomplete ref="/form/FormCommunOrbeon/DemandeTiers/mvAdresses/CTierAdresseVO[mbUsuel='true']/msCodePostale" dynamic-itemset="true" class="INPUT92" style="width: 5em; z-index:10">

                <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) >= 1"/>

                                <xforms:action if="$make-suggestion">

                                               <xforms:setvalue ref="instance('villechoisi')/msCodePostale" value="$search-value"/>

                                               <xforms:send submission="autoCompleteA"/>

                                </xforms:action>

                </xforms:action>

                <xforms:itemset nodeset="instance('ville')/codepostal">

                                <xforms:label ref="."/>

                                <xforms:value ref="."/>

                </xforms:itemset>

                <xforms:alert>Veuillez saisir le code postal</xforms:alert>

</fr:autocomplete>

 

 

 

There are several pages, and can move to next page or return to a previous page.

A main instance is transmitted from one page to another.

With this autocomplete, I update the field « /form/FormCommunOrbeon/DemandeTiers/mvAdresses/CTierAdresseVO[mbUsuel='true']/msCodePostale » in the main instance. When I go to the next page, the value of this field is well preserved.

But when I return to this page, this field is empty !

 

The autocomplete field empty, because all my other fields of my form have retained their value correctly.

 

When I arrived the first time on this page, and that the field already contains a value, that value is deleted.

 

It is a bug, or a limit of the autocomplete ? or there is a solution to preserve the value ?

 

Thank You.

 

Julien.

 


Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente não imprimindo este correio electrónico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.



--
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

 


Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente não imprimindo este correio electrónico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

--
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
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: problem with autocomplete

Erik Bruchez
Administrator
If I remember well, a 3 MB file will likely take 10 x that much in
memory with an efficient implementation, more with an inefficient one.
With XPL, you might have the case where that file, or a transformation
thereof, will be in memory several times. It might take dozens of MB
in the end.

Not sure what's the best way here. The XForms engine has readonly
cached instances (although that is PE only now), which use the Saxon
TinyTree as representation. That might be compact enough, and you will
have only one representation in memory, on which you can run XPath.

Or, you could use eXist and XQuery.

-Erik

On Wed, Sep 1, 2010 at 5:38 AM, Bittard, Julien
<[hidden email]> wrote:

> Hello Ehtan,
>
>
>
> yes that was it, thank you very much.
>
> I saw this in the documentation, but I did not actually understood what it
> was for.
>
>
>
> But now I have another problem. To update my list, I am calling an XPL file
> that takes an xml file very large (3 MB) in this way :
>
>
>
> <p:processor name="oxf:xslt">
>
>         <p:input name="data" href="oxf:/config/perso/communesPostales.xml"/>
>
> …
>
> </p:processor>
>
>
>
> And after several uses of the autocomplete, I have an OutOfMemory on my
> application. I put only 512 MB memory max on my jvm, but until I add that
> autocomplete, 512 MB was enough.
>
> Is there another way to load a file in a processor to reduce memory
> consumption ?
>
>
>
> Thank You.
>
>
>
> Julien.
>
>
>
> De : Ethan Gruber [mailto:[hidden email]]
> Envoyé : mardi 31 août 2010 20:00
> À : [hidden email]
> Objet : [ops-users] Re: problem with autocomplete
>
>
>
> Hi Julien,
>
> You need to set the label of the autocomplete on form load.  I think this
> thread will help:
> http://orbeon-forms-ops-users.24843.n4.nabble.com/Setting-content-of-text-field-in-fr-autocomplete-td2216656.html
>
> Ethan
>
> On Tue, Aug 31, 2010 at 1:41 PM, Bittard, Julien <[hidden email]>
> wrote:
>
> Hello,
>
>
>
> I use in my forms an dynamic autocomplete like this :
>
>
>
> <fr:autocomplete
> ref="/form/FormCommunOrbeon/DemandeTiers/mvAdresses/CTierAdresseVO[mbUsuel='true']/msCodePostale"
> dynamic-itemset="true" class="INPUT92" style="width: 5em; z-index:10">
>
>                 <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) >= 1"/>
>
>                                 <xforms:action if="$make-suggestion">
>
>                                                <xforms:setvalue
> ref="instance('villechoisi')/msCodePostale" value="$search-value"/>
>
>                                                <xforms:send
> submission="autoCompleteA"/>
>
>                                 </xforms:action>
>
>                 </xforms:action>
>
>                 <xforms:itemset nodeset="instance('ville')/codepostal">
>
>                                 <xforms:label ref="."/>
>
>                                 <xforms:value ref="."/>
>
>                 </xforms:itemset>
>
>                 <xforms:alert>Veuillez saisir le code postal</xforms:alert>
>
> </fr:autocomplete>
>
>
>
>
>
>
>
> There are several pages, and can move to next page or return to a previous
> page.
>
> A main instance is transmitted from one page to another.
>
> With this autocomplete, I update the field
> « /form/FormCommunOrbeon/DemandeTiers/mvAdresses/CTierAdresseVO[mbUsuel='true']/msCodePostale »
> in the main instance. When I go to the next page, the value of this field is
> well preserved.
>
> But when I return to this page, this field is empty !
>
>
>
> The autocomplete field empty, because all my other fields of my form have
> retained their value correctly.
>
>
>
> When I arrived the first time on this page, and that the field already
> contains a value, that value is deleted.
>
>
>
> It is a bug, or a limit of the autocomplete ? or there is a solution to
> preserve the value ?
>
>
>
> Thank You.
>
>
>
> Julien.
>
>
>
> Please help Logica to respect the environment by not printing this email /
> Pour contribuer comme Logica au respect de l'environnement, merci de ne pas
> imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen
> Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a
> respeitar o ambiente não imprimindo este correio electrónico. This e-mail
> and any attachment is for authorised use by the intended recipient(s) only.
> It may contain proprietary material, confidential information and/or be
> subject to legal privilege. It should not be copied, disclosed to, retained
> or used by, any other party. If you are not an intended recipient then
> please promptly delete this e-mail and any attachment and all copies and
> inform the sender. Thank you.
>
> --
> 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
>
>
>
> Please help Logica to respect the environment by not printing this email /
> Pour contribuer comme Logica au respect de l'environnement, merci de ne pas
> imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen
> Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a
> respeitar o ambiente não imprimindo este correio electrónico. This e-mail
> and any attachment is for authorised use by the intended recipient(s) only.
> It may contain proprietary material, confidential information and/or be
> subject to legal privilege. It should not be copied, disclosed to, retained
> or used by, any other party. If you are not an intended recipient then
> please promptly delete this e-mail and any attachment and all copies and
> inform the sender. Thank you.
>
> --
> 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
>
>


--
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
Reply | Threaded
Open this post in threaded view
|

RE: Re: RE: Re: problem with autocomplete

ricetrac
Hi Erik

Finally I put my big file in the database eXist on my application, and I access it via a query xquery: the result is much faster and less memory intensive.

Thank You

Julien.

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la part de Erik Bruchez
Envoyé : jeudi 2 septembre 2010 08:11
À : [hidden email]
Objet : [ops-users] Re: RE: Re: problem with autocomplete

If I remember well, a 3 MB file will likely take 10 x that much in memory with an efficient implementation, more with an inefficient one.
With XPL, you might have the case where that file, or a transformation thereof, will be in memory several times. It might take dozens of MB in the end.

Not sure what's the best way here. The XForms engine has readonly cached instances (although that is PE only now), which use the Saxon TinyTree as representation. That might be compact enough, and you will have only one representation in memory, on which you can run XPath.

Or, you could use eXist and XQuery.

-Erik

On Wed, Sep 1, 2010 at 5:38 AM, Bittard, Julien <[hidden email]> wrote:

> Hello Ehtan,
>
>
>
> yes that was it, thank you very much.
>
> I saw this in the documentation, but I did not actually understood
> what it was for.
>
>
>
> But now I have another problem. To update my list, I am calling an XPL
> file that takes an xml file very large (3 MB) in this way :
>
>
>
> <p:processor name="oxf:xslt">
>
>         <p:input name="data"
> href="oxf:/config/perso/communesPostales.xml"/>
>
> ...
>
> </p:processor>
>
>
>
> And after several uses of the autocomplete, I have an OutOfMemory on
> my application. I put only 512 MB memory max on my jvm, but until I
> add that autocomplete, 512 MB was enough.
>
> Is there another way to load a file in a processor to reduce memory
> consumption ?
>
>
>
> Thank You.
>
>
>
> Julien.
>
>
>
> De : Ethan Gruber [mailto:[hidden email]] Envoyé : mardi 31 août
> 2010 20:00 À : [hidden email] Objet : [ops-users] Re: problem with
> autocomplete
>
>
>
> Hi Julien,
>
> You need to set the label of the autocomplete on form load.  I think
> this thread will help:
> http://orbeon-forms-ops-users.24843.n4.nabble.com/Setting-content-of-t
> ext-field-in-fr-autocomplete-td2216656.html
>
> Ethan
>
> On Tue, Aug 31, 2010 at 1:41 PM, Bittard, Julien
> <[hidden email]>
> wrote:
>
> Hello,
>
>
>
> I use in my forms an dynamic autocomplete like this :
>
>
>
> <fr:autocomplete
> ref="/form/FormCommunOrbeon/DemandeTiers/mvAdresses/CTierAdresseVO[mbUsuel='true']/msCodePostale"
> dynamic-itemset="true" class="INPUT92" style="width: 5em; z-index:10">
>
>                 <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) >= 1"/>
>
>                                 <xforms:action if="$make-suggestion">
>
>                                                <xforms:setvalue
> ref="instance('villechoisi')/msCodePostale" value="$search-value"/>
>
>                                                <xforms:send
> submission="autoCompleteA"/>
>
>                                 </xforms:action>
>
>                 </xforms:action>
>
>                 <xforms:itemset
> nodeset="instance('ville')/codepostal">
>
>                                 <xforms:label ref="."/>
>
>                                 <xforms:value ref="."/>
>
>                 </xforms:itemset>
>
>                 <xforms:alert>Veuillez saisir le code
> postal</xforms:alert>
>
> </fr:autocomplete>
>
>
>
>
>
>
>
> There are several pages, and can move to next page or return to a
> previous page.
>
> A main instance is transmitted from one page to another.
>
> With this autocomplete, I update the field « 
> /form/FormCommunOrbeon/DemandeTiers/mvAdresses/CTierAdresseVO[mbUsuel=
> 'true']/msCodePostale » in the main instance. When I go to the next
> page, the value of this field is well preserved.
>
> But when I return to this page, this field is empty !
>
>
>
> The autocomplete field empty, because all my other fields of my form
> have retained their value correctly.
>
>
>
> When I arrived the first time on this page, and that the field already
> contains a value, that value is deleted.
>
>
>
> It is a bug, or a limit of the autocomplete ? or there is a solution
> to preserve the value ?
>
>
>
> Thank You.
>
>
>
> Julien.
>
>
>
> Please help Logica to respect the environment by not printing this
> email / Pour contribuer comme Logica au respect de l'environnement,
> merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht
> nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. /
> Por favor ajude a Logica a respeitar o ambiente não imprimindo este
> correio electrónico. This e-mail and any attachment is for authorised use by the intended recipient(s) only.
> It may contain proprietary material, confidential information and/or
> be subject to legal privilege. It should not be copied, disclosed to,
> retained or used by, any other party. If you are not an intended
> recipient then please promptly delete this e-mail and any attachment
> and all copies and inform the sender. Thank you.
>
> --
> 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
>
>
>
> Please help Logica to respect the environment by not printing this
> email / Pour contribuer comme Logica au respect de l'environnement,
> merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht
> nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. /
> Por favor ajude a Logica a respeitar o ambiente não imprimindo este
> correio electrónico. This e-mail and any attachment is for authorised use by the intended recipient(s) only.
> It may contain proprietary material, confidential information and/or
> be subject to legal privilege. It should not be copied, disclosed to,
> retained or used by, any other party. If you are not an intended
> recipient then please promptly delete this e-mail and any attachment
> and all copies and inform the sender. Thank you.
>
> --
> 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
>
>
Please help Logica to respect the environment by not printing this email  / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. /  Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico.



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.




--
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