Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-13 Thread Piotr Zarzycki
Peter, I'm for going with dispatch one event once removeAll is done in ArrayList. - of course I agree to set selectedIndex to -1. I can take your suggestion in case of the name. I will then create a bead which is taking care of the renderers in least in case that event. Thanks for the input.

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-13 Thread Peter Ent
I really don't know what is the best solution. I would have either a .beginUpdate() and .endUpdate() function on ArrayList so it wouldn't dispatch anything until the end (for both adding and removing) or have .removeAll() dispatch a single event at the end. Not sure if either is PAYG in this case.

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-12 Thread Piotr Zarzycki
If yes I will simply create bead which take care of scenario where we are removing all items from the ArrayList. Thanks, Piotr 2017-12-12 23:25 GMT+01:00 Piotr Zarzycki : > Peter, > > I did fix all issues in MDL Table and playing with your >

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-12 Thread Piotr Zarzycki
Peter, I did fix all issues in MDL Table and playing with your DynamicRemoveItemRendererForArrayListData. If I do on ArrayList.removeAll - I'm getting ITEM_REMOVED, but one time. From the user perspective I don't know actually what has happened. How to proceed if I'm using your bead in that case

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-11 Thread Piotr Zarzycki
Peter, I see issue in MDL Table after your changes, but in general they should work once I fix it. Thanks, Piotr 2017-12-11 18:56 GMT+01:00 Piotr Zarzycki : > Peter, > > I will try your changes soon. I was thinking what you did write earlier > and maybe I wasn't

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-11 Thread Peter Ent
I have a in my test. Its defaults.css entry has DataItemRendererFactoryForArrayData. When I add in the dynamic mapper via MXML, that supersedes the one specified in defaults.css. That happens because the MXML bead of type IDataProviderItemRendererMapper is already on the strand so the one

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-11 Thread Piotr Zarzycki
Peter, Your changes exposed an issue in MDL Table. Each rows should be added to tbody, but it were included outside. I have fixed issue and everything is working nicely - at least in the apache example MDLDynamicTableExample. Still you should compare those beads

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-11 Thread Piotr Zarzycki
Peter, I will try your changes soon. I was thinking what you did write earlier and maybe I wasn't enough clear. I'm talking right now about following cases. Let's say that you have list or MDL Table doesn't matter and you did specify in your css file following class: .myList {

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-11 Thread Peter Ent
I committed the change to the remove bead after running the MDLExample with no errors in the browser console. Hope this works! —peter On 12/11/17, 10:45 AM, "Piotr Zarzycki" wrote: >Hi Peter, > >If I remember correctly I was using those beads [1] and as

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-11 Thread Piotr Zarzycki
Hi Peter, If I remember correctly I was using those beads [1] and as IDataProviderItemRendererMapper: DynamicItemsRendererFactoryForArrayListData - declared in CSS. You can take a look into the example MDLDynamicTableExample. With your solution where we are looking actually into the events from

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-11 Thread Peter Ent
In the PAYG world of Royale, we need to keep a number of features separate so apps are not weighed down by unused code. I originally had a bead that refreshed all item renderers by deleting them from the DataGroup and re-creating them. I also had a bead that just created itemRenderers on demand

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-10 Thread piotrz
Hi Peter, Ok DynamicItemsRendererFactoryForArrayListData is now working perfectly. Unfortunately I just tried DynamicRemoveItemRendererForArrayListData and got NPE. This time dataProviderModel is being null

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-09 Thread Piotr Zarzycki
Peter, I think the same and it was working the same previously, cause my code was working like that. Remove bead should be adjusted also. I think additionally that name of Dynamic bead should be different. Thanks, Piotr On Sat, Dec 9, 2017, 22:01 Peter Ent wrote: > I’m

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-09 Thread Peter Ent
I’m thinking that all changes should go through a model and not the data source. The model can interface with that. So: model.getItemAt() and model.addItem() and so forth. This way the data source can be anything. Then our models like ArrayListSelectionModel can dispatch those events. We can

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-09 Thread Peter Ent
Piotr, The model classes do not dispatch CollectionEvents - only ArrayList (or something like it) dispatches those events. So we cannot listen on the model. What I've done, however, is change things in DynamicŠ so that when the dataProvider does change (or is initially present), then a listener

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-09 Thread Peter Ent
Thanks for pointing that out. I’ll try to get to it over the weekend. I think there is an issue/concept we need to sort out: listen on Model vs dataProvider. Peter > On Dec 9, 2017, at 6:17 AM, Piotr Zarzycki wrote: > > Peter, > > That's when my initial

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-09 Thread Piotr Zarzycki
Peter, That's when my initial implementation of that bead was to listen on model instead directly on dataProvider. I'm using following beads [1] for MDL Table and bead DynamicItemsRendererFactoryForArrayListData is being added through CSS. I hope that details help. [1]

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-09 Thread piotrz
Hi Peter, I just tried newest build of Royale. I didn't use your new bead yet, but I had use the "DynamicItemsRendererFactoryForArrayListData", so decided to first build project without any changes. I'm getting NPE in this bead, cause my dataProvider initially is simply null.

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-08 Thread Peter Ent
Hi. I just pushed my changes. I changed DynamicItemsRenderer… a little bit and added a new bead, DynamicRemoteItemRendererForArrayListData so you can just attach that bead to the List strand and it will remove the itemRenderer. I wound up making a couple of smaller changes in the DataGroup and

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-07 Thread Piotr Zarzycki
Cool! Look forward to your commit! :) Thanks, Piotr 2017-12-07 22:19 GMT+01:00 Peter Ent : > It looks like, after discussing this with Alex, we will use > DynamicItemsRendererFactoryForArrayListData to refresh and insert items > and if you want to remove items, add in

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-07 Thread Peter Ent
It looks like, after discussing this with Alex, we will use DynamicItemsRendererFactoryForArrayListData to refresh and insert items and if you want to remove items, add in the RemoveItemRendererBead. I'll probably think of a better name for that one. ‹peter On 12/7/17, 4:03 PM, "Piotr Zarzycki"

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-07 Thread Piotr Zarzycki
My thoughts about DynamicItemsRendererFactoryForArrayListData was initially that this bead allows for Adding and Removing items from List. I just didn't have chance to finish it. As I said you can even remove it and use your own. In whatever direction you will go I just need solution which allows

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-07 Thread Piotr Zarzycki
Hi Peter, If your new Beads, will be doing also adding, you can even replace my DynamicItemsRendererFactoryForArrayListData. I'm ok in whatever direction you will go. There is an example which is using that bead [1] [1]

[Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-07 Thread Peter Ent
I'm trying to see if my new RemoveItemRendererBead works with DynamicItemsRendererFactoryForArrayListData and discovered that this class is listening to the model for the ITEM_ADDED event. The model doesn't dispatch the event - the dataProvider (ArrayList) dispatches the event. The model