"Leslie P. Polzer" <[email protected]> writes:
> On Aug 14, 11:20 am, John Fremlin <[email protected]> wrote:
>
>> One major issue is that if isearch box is marked dirty then when the
>> ajax call comes back, it will overwrite any further user input. This is
>> extremely annoying with slow AJAX.
>>
>> I would like to fix this before tidying up. Maybe the mixin approach is 
>> wrong?
>
> I don't think the mixin approach is responsible for this.
>
> We rather seem to need a piece of custom Javascript to deal with this.
> Proposal after the AJAX request has completed:

Am I correct in thinking that only dirty objects are updated by the AJAX
request? (If not that is a shame.) If so, then the trick is to make sure
that the filter input box is not marked dirty.

The solution as I see it is to make a parent widget, attach the dataseq
and the filter as children of this widget, and mark on the dataseq dirty
when the filter changes.

Therefore the mixin approach is out, and a container approach is in.

>   1. protect the text field against further modification

That sounds rather irritating for the poor user.

>   2. save the current contents of the text field
>   3. take the response of the AJAX request and apply it
>   4. restore the previously saved contents

I'd rather use the container approach instead. However, if for some
reason that were not feasible, and magic JavaScript is needed, I'd
rather say --

    (1) Do the AJAX request. 

    (2) On receipt of the AJAX answer, if the isearch contents have
changed, then do not apply but discard the AJAX answer (and potentially
make a new request).

[...]


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to