Is the plan to have some implementations use the built-in browser ContextMenus? If so, it might be better to not leverage UI widgets in the API and use data objects instead. Then a bead could leverage the data and call the browser APIs or implement some custom context menu capability (which could be based on List).
On 1/9/23, 4:11 PM, "Hugo Ferreira" <hferreira...@gmail.com <mailto:hferreira...@gmail.com>> wrote: EXTERNAL: Use caution when clicking on links or opening attachments. Seems that the way is to extend from List and implement from IBead. I managed to put the dataProvider working but for some reason not the itemRenderer. This need more time to put it to work so I will came back to this topic latter. Harbs <harbs.li...@gmail.com <mailto:harbs.li...@gmail.com>> escreveu no dia domingo, 8/01/2023 à(s) 21:56: > No. My suggestion is that the ContextMenu should implement List (or > subclass it if that makes sense). > > Something like this: > > <j:beads> > <js:ContextMenu itemRenderer="com.foo.MyContextRenderer" > itemClick=“onItemClick(event)"> > <js:dataProvider> > <fx:Array id="fooArray"> > <fx:String>Check All</fx:String> > <fx:String>Uncheck All</fx:String> > </fx:Array> > </js:dataProvider> > </js:ContextMenu> > </j:beads> > > > On Jan 8, 2023, at 10:39 PM, Hugo Ferreira <hferreira...@gmail.com > > <mailto:hferreira...@gmail.com>> > wrote: > > > > Hi Harbs, > > > > I hadn't thought about that. > > In this case is a bead to work as an extension to any component and add > the > > context menu feature. > > In this case, the bead receives an array of elements. > > > > Your suggestion is to receive a List instead of an array of elements ? > > > > Harbs <harbs.li...@gmail.com <mailto:harbs.li...@gmail.com>> escreveu no > > dia domingo, 8/01/2023 à(s) > 07:14: > > > >> Yes. Thanks for working on this. :-) > >> > >> I’d suggest that a ContextMenu should be a kind of a List with a > >> dataProvider and ItemRenderers. That would fit into the common Royale > >> pattern and completely abstract the UI. > >> > >>> On Jan 8, 2023, at 9:05 AM, Yishay Weiss <yishayj...@hotmail.com > >>> <mailto:yishayj...@hotmail.com>> > wrote: > >>> > >>> Nice. > >>> > >>> Did you consider separating the display from the bead? For example, > >>> > >>> <js:Group id=”ctxm1”> > >>> <html:Div text="Check All“ > >>> > >>> click="checkAll(true)"/> > >>> > >>> <html:Div text=“Unchek All” > >>> > >>> visible="{this.isEditable()}" > >>> > >>> click="checkAll(false)"/> > >>> </js:Group> > >>> > >>> Could go under <fx:Declarations> and then > >>> > >>> <js:ContextMenu menuObject=”{ctxm1}”/> > >>> > >>> Could go under various elements. > >>> > >>> > >>> From: Hugo Ferreira<mailto:hferreira...@gmail.com > >>> <mailto:hferreira...@gmail.com>> > >>> Sent: Sunday, January 8, 2023 1:00 AM > >>> To: dev@royale.apache.org > >>> <mailto:dev@royale.apache.org><mailto:dev@royale.apache.org > >>> <mailto:dev@royale.apache.org>> > >>> Subject: Re: Right click bead for context menu > >>> > >>> Hi, > >>> > >>> I have committed today the ContextMenu component (no Jewel dependency). > >>> > >>> Example of usage: > >>> > >>> > >>> <j:beads> > >>> > >>> <js:ContextMenu> > >>> > >>> <html:Div text="Check All“ > >>> > >>> click="checkAll(true)"/> > >>> > >>> <html:Div text=“Unchek All” > >>> > >>> visible="{this.isEditable()}" > >>> > >>> click="checkAll(false)"/> > >>> > >>> </js:ContextMenu> > >>> > >>> </j:beads> > >>> > >>> > >>> The context menu can be added to any component area (inclusive and > tested > >>> in itemrender DataGrid). > >>> > >>> Hugo Ferreira <hferreira...@gmail.com <mailto:hferreira...@gmail.com>> > >>> escreveu no dia sábado, > 7/01/2023 > >>> à(s) 01:51: > >>> > >>>> Hi, > >>>> > >>>> Yes, it seems that this component does not exist at the moment in the > >>>> framework. > >>>> Meanwhile, I started to develop this component and it's now partial > >>>> finished and I am trying my best to make enough generic to add it to > the > >>>> framework. > >>>> > >>>> Thanks. > >>>> > >>>> Maria Jose Esteve <mjest...@iest.com <mailto:mjest...@iest.com>> > >>>> escreveu no dia sexta, > 6/01/2023 > >>>> à(s) 12:10: > >>>> > >>>>> I couldn't find it but I have seen them do work in mx. > >>>>> I have a custom implementation that needs some work but it works for > >> me, > >>>>> if you need it, let me know and I'll share it (Jewel) > >>>>> > >>>>> Hiedra > >>>>> > >>>>> -----Mensaje original----- > >>>>> De: Hugo Ferreira <hferreira...@gmail.com > >>>>> <mailto:hferreira...@gmail.com>> > >>>>> Enviado el: miércoles, 4 de enero de 2023 14:54 > >>>>> Para: dev@royale.apache.org <mailto:dev@royale.apache.org> > >>>>> Asunto: Right click bead for context menu > >>>>> > >>>>> Hi, > >>>>> > >>>>> There is already any bead to rigth click and context menu ? > >>>>> Like this: > >>>>> > >>>>> > >> > https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fitnext.io%2Fhow-to-create-a-custom-right-click-menu-with-javascript-9c368bb58724&data=05%7C01%7Caharui%40adobe.com%7Cb309cd5598184bad1fd808daf29f3187%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C638089062813293825%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=PN5OlKFA1zKaKacsevRx4ueMgZcD%2BvJTZq0h1jCJKyg%3D&reserved=0 > > <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fitnext.io%2Fhow-to-create-a-custom-right-click-menu-with-javascript-9c368bb58724&data=05%7C01%7Caharui%40adobe.com%7Cb309cd5598184bad1fd808daf29f3187%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C638089062813293825%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=PN5OlKFA1zKaKacsevRx4ueMgZcD%2BvJTZq0h1jCJKyg%3D&reserved=0> > >>>>> I didn't find and probably I will have to create it but before I > start > >> I > >>>>> would like to be sure that there isn't already something similar. > >>>>> > >>>>> Thank you. > >>>>> > >>>> > >>> > >> > >> > >