Removing full refresh

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

Removing full refresh

Murtaza Zaidi
Hi,

I have an autocomplete implemented on a text input. It is defined in the following manner:

                widget := html textInput.
widget script: (
html jQuery this autocomplete
autoFocus: true; 
search: [:string | self getRows: string]
labels: [:each | each formatSelectionRow]
callback: [:value :script | 
script callback: [self updateValue: value].
self renderOn: html]))

It is functional with a full refresh of the screen after a value is selected from the rows that get returned from the search block. I'm trying to remove this full refresh to improve user experience. Any ideas on how to do this? 


Thanks,
Murtaza

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Removing full refresh

Paul DeBruicker
What do you want to have happen?   A person chooses an entry from the autocomplete suggestion and then ________ ?





Murtaza Zaidi wrote
Hi,

I have an autocomplete implemented on a text input. It is defined in the
following manner:

                widget := html textInput.
widget script: (
html jQuery this autocomplete
autoFocus: true;
search: [:string | self getRows: string]
labels: [:each | each formatSelectionRow]
callback: [:value :script |
script callback: [self updateValue: value].
self renderOn: html]))

It is functional with a full refresh of the screen after a value is
selected from the rows that get returned from the search block. I'm trying
to remove this full refresh to improve user experience. Any ideas on how to
do this?


Thanks,
Murtaza

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Removing full refresh

Murtaza Zaidi
It should just re-render the text input field with the new value as opposed to refreshing the whole screen and re-rendering everything in the page.


On Tue, Mar 18, 2014 at 11:33 AM, Paul DeBruicker <[hidden email]> wrote:
What do you want to have happen?   A person chooses an entry from the
autocomplete suggestion and then ________ ?






Murtaza Zaidi wrote
> Hi,
>
> I have an autocomplete implemented on a text input. It is defined in the
> following manner:
>
>                 widget := html textInput.
> widget script: (
> html jQuery this autocomplete
> autoFocus: true;
> search: [:string | self getRows: string]
> labels: [:each | each formatSelectionRow]
> callback: [:value :script |
> script callback: [self updateValue: value].
> self renderOn: html]))
>
> It is functional with a full refresh of the screen after a value is
> selected from the rows that get returned from the search block. I'm trying
> to remove this full refresh to improve user experience. Any ideas on how
> to
> do this?
>
>
> Thanks,
> Murtaza
>
> _______________________________________________
> seaside mailing list

> seaside@.squeakfoundation

> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside





--
View this message in context: http://forum.world.st/Removing-full-refresh-tp4749616p4749621.html
Sent from the Seaside General mailing list archive at Nabble.com.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Removing full refresh

Johan Brichau-2
If I recall correctly, the JQueryUI Autocomplete does not trigger a page-refreshing callback.
The full refresh is probably coming from the form submission if you embedded the text input inside a form.

Suppress the form submission and add the script to be executed on selection to the :script argument of the callback block. It is identical to the script argument of a jQuery ajax #script: block

Johan


On 18 Mar 2014, at 17:04, Murtaza Zaidi <[hidden email]> wrote:

It should just re-render the text input field with the new value as opposed to refreshing the whole screen and re-rendering everything in the page.


On Tue, Mar 18, 2014 at 11:33 AM, Paul DeBruicker <[hidden email]> wrote:
What do you want to have happen?   A person chooses an entry from the
autocomplete suggestion and then ________ ?






Murtaza Zaidi wrote
> Hi,
>
> I have an autocomplete implemented on a text input. It is defined in the
> following manner:
>
>                 widget := html textInput.
> widget script: (
> html jQuery this autocomplete
> autoFocus: true;
> search: [:string | self getRows: string]
> labels: [:each | each formatSelectionRow]
> callback: [:value :script |
> script callback: [self updateValue: value].
> self renderOn: html]))
>
> It is functional with a full refresh of the screen after a value is
> selected from the rows that get returned from the search block. I'm trying
> to remove this full refresh to improve user experience. Any ideas on how
> to
> do this?
>
>
> Thanks,
> Murtaza
>
> _______________________________________________
> seaside mailing list

> seaside@.squeakfoundation

> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside





--
View this message in context: http://forum.world.st/Removing-full-refresh-tp4749616p4749621.html
Sent from the Seaside General mailing list archive at Nabble.com.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Removing full refresh

Bob Nemec
Thanks Johan, that works nicely. It's a matter of replacing the script callback: with script add: 


html jQuery this 
    autocomplete
         autoFocus: true; 
         search: [:string | self getNextBlockWithSearch: string]
         labels: [:each | each displaySelectionRow]
         callback: [:value :script | 
                 script add: (self ...code that does the callback updateValue: behaviour and runs 'load html: [:renderer | '...)]  

vs.

html jQuery this 
    autocomplete
         autoFocus: true; 
         search: [:string | self getNextBlockWithSearch: string]
         labels: [:each | each displaySelectionRow]
         callback: [:value :script | 
                 script callback: [self updateValue: value]]   <-- does the full page refresh

Bob Nemec 
(Murtaza and I were working on the same problem)


On Sunday, March 23, 2014 11:03:55 AM, Johan Brichau <[hidden email]> wrote:
If I recall correctly, the JQueryUI Autocomplete does not trigger a page-refreshing callback.
The full refresh is probably coming from the form submission if you embedded the text input inside a form.

Suppress the form submission and add the script to be executed on selection to the :script argument of the callback block. It is identical to the script argument of a jQuery ajax #script: block

Johan


On 18 Mar 2014, at 17:04, Murtaza Zaidi <[hidden email]> wrote:

It should just re-render the text input field with the new value as opposed to refreshing the whole screen and re-rendering everything in the page.


On Tue, Mar 18, 2014 at 11:33 AM, Paul DeBruicker <[hidden email]> wrote:
What do you want to have happen?   A person chooses an entry from the
autocomplete suggestion and then ________ ?






Murtaza Zaidi wrote
> Hi,
>
> I have an autocomplete implemented on a text input. It is defined in the
> following manner:
>
>                 widget := html textInput.
> widget script: (
> html jQuery this autocomplete
> autoFocus: true;
> search: [:string | self getRows: string]
> labels: [:each | each formatSelectionRow]
> callback: [:value :script |
> script callback: [self updateValue: value].
> self renderOn: html]))
>
> It is functional with a full refresh of the screen after a value is
> selected from the rows that get returned from the search block. I'm trying
> to remove this full refresh to improve user experience. Any ideas on how
> to
> do this?
>
>
> Thanks,
> Murtaza
>
> _______________________________________________
> seaside mailing list

> seaside@.squeakfoundation

> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside





--
View this message in context: http://forum.world.st/Removing-full-refresh-tp4749616p4749621.html
Sent from the Seaside General mailing list archive at Nabble.com.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Bob Nemec