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 |
What do you want to have happen? A person chooses an entry from the autocomplete suggestion and then ________ ?
|
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 _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
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:
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
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:
_______________________________________________ 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
|
Free forum by Nabble | Edit this page |