Virtual lists and item effects

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

Virtual lists and item effects

Cajus Pollmeier
Hi all,

given a virtual list with a couple of items that are managed on the server
side. I'm getting notifications when something changes in the list which
results in an updated model.

I'd like to add an effect if an item gets removed or updated. Is it possible to
determine if the affected item is visible and apply an effect (background color
flash, what ever) to it?

Thanks!
Cajus

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Virtual lists and item effects

Cajus Pollmeier
Am Donnerstag, 11. Oktober 2012, 12:07:55 schrieb Cajus Pollmeier:
> Hi all,
>
> given a virtual list with a couple of items that are managed on the server
> side. I'm getting notifications when something changes in the list which
> results in an updated model.
>
> I'd like to add an effect if an item gets removed or updated. Is it
> possible to determine if the affected item is visible and apply an effect
> (background color flash, what ever) to it?

Ok. I've derived the list for now. If there's a more elegant way to do it, let
me know ;-)

Cheers,
Cajus

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Virtual lists and item effects

Mustafa Sak-5
Hi Cajus,

I guess this is not trivial as you have to take into account that the virtual list is re using list-item widgets.
One way I can see is to set a new property in your own model, which determines that an entry was updated. So you could extend qx.ui.form.ListItem as your own widget. Than just introduce the list to create your widget as item in the delegation map[1]. Don't forget to bind your update property on your model with a property of your custom widget (bidirectional). Now your widget could listen to the event of his property and check if it self is already see-able (.isSeeable()) or not. If it is see-able, just trigger an visible effect, take a look at animation[2]. If not see-able register a listener once on appear event and trigger the animation. The tigger function should reset the value of the update property.

Such a solution should guarantee you to see updated items even if you scroll much later than the update process. With a bit more complexity you could set milliseconds (Date().getTime()) as update property value to determine if a lately appeared list item should still be animated or not.

I hope I could show a (may be) possible way. ;)

Regards Mustafa

[1] http://demo.qooxdoo.org/current/apiviewer/#qx.ui.list.core.IListDelegate
    http://manual.qooxdoo.org/devel/pages/data_binding/controller.html?highlight=delegate#delegate
[2] http://demo.qooxdoo.org/devel/apiviewer/#qx.bom.element.Animation


-----Urspr√ľngliche Nachricht-----
Von: Cajus Pollmeier [mailto:[hidden email]]
Gesendet: Donnerstag, 11. Oktober 2012 14:45
An: qooxdoo Development
Betreff: Re: [qooxdoo-devel] Virtual lists and item effects

Am Donnerstag, 11. Oktober 2012, 12:07:55 schrieb Cajus Pollmeier:
> Hi all,
>
> given a virtual list with a couple of items that are managed on the
> server side. I'm getting notifications when something changes in the
> list which results in an updated model.
>
> I'd like to add an effect if an item gets removed or updated. Is it
> possible to determine if the affected item is visible and apply an
> effect (background color flash, what ever) to it?

Ok. I've derived the list for now. If there's a more elegant way to do it, let me know ;-)

Cheers,
Cajus

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel