Hi Carlos, IMO, you don't have to have a dataProvider as a public API to also offer selectedIndex/Item/Tab. No refactoring is needed, just changing the name.
Flex Navigators used selectedIndex as will other Royale Navigators and the Royale emulation components. "active" and "activation" have other meanings (active Window is the window getting input). I'm not even sure "activable" is a word, my spell checker doesn't like it. My 2 cents, -Alex On 12/27/18, 1:22 AM, "Carlos Rovira" <[email protected]> wrote: Hi Alex, currently this components shows content based on the "name" of the screen (some days ago was "id" what I want to avoid due to id conflicts). They don't have the concept of dataProvider/selectedItem/selectedIndex. It could be refactor but don't have clear if we need this kind of navigation components use the same paradigm like list component. In my case I didn't find the need while working with this, maybe others could need it? The components in Jewel that are "navigation components" are: * ApplicationMainContent * TabBarContent * WizardContent As well we could create new versions based on dataProvider API so people can choose between both depending on their needs and that will be more PAYG. In the other hand, those components are only the content part, and for example we have TabBar that is the list of tab buttons (with dataProvider API) that can be used with a TabBarContent to navigate it, but the former delegates the selection (based on name property) to the latter. Thoughts? El jue., 27 dic. 2018 a las 2:44, Alex Harui (<[email protected]>) escribió: > I'm wondering what "active" or "activatable" means and how it is different > from selectedIndex/Item/Tab used elsewhere. > > -Alex > > On 12/26/18, 5:13 AM, "Harbs" <[email protected]> wrote: > > I’m fine with any of those suggestions. I don’t see why name can’t > work. > > I think anything is better than “activableName”… ;-) > > My $0.02, > Harbs > > > On Dec 26, 2018, at 1:10 PM, Carlos Rovira < > [email protected]> wrote: > > > > Hi Harbs, > > > > until now I used "id" in html tag to switch between contents, but I > want to > > avoid "id" if possible for this reason this change. > > We only need some component property, so don't need to have "id" > suffix or > > prefix. I think it could be even "name", but maybe that's already > used and > > can create some conflict. We can change to "activeId" as well as you > > proposed, but we can even try some shorter one, maybe "nameId" if > "name is > > not available for this use? > > > > > > > > El mié., 26 dic. 2018 a las 11:08, Harbs (<[email protected]>) > escribió: > > > >> “activableName” sounds kind of awkward. What about activeName > instead? Or > >> ActiveId? ActiveId seems the best fit considering it’s using the > element id > >> if I understand correctly. > >> > >> > >>> On Dec 26, 2018, at 11:50 AM, [email protected] wrote: > >>> > >>> This is an automated email from the ASF dual-hosted git repository. > >>> > >>> carlosrovira pushed a commit to branch develop > >>> in repository > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.git&data=02%7C01%7Caharui%40adobe.com%7C7136d39b0085415062a208d66bdcdca9%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636814993674111621&sdata=OQuSZwFm%2BjJn2UA%2FUgWXSaSzyHJ30a%2B4eDVs7PjLGRA%3D&reserved=0 > >>> > >>> > >>> The following commit(s) were added to refs/heads/develop by this > push: > >>> new f47a24a improve IActivable to not rely on ids and use new > >> activableName property > >>> f47a24a is described below > >>> > >>> commit f47a24a6cade10a8da297f2f9cd86dc4632754e6 > >>> Author: Carlos Rovira <[email protected]> > >>> AuthorDate: Wed Dec 26 10:50:21 2018 +0100 > >>> > >>> improve IActivable to not rely on ids and use new activableName > >> property > >>> --- > >>> .../apache/royale/jewel/ApplicationMainContent.as | 6 +++--- > >>> .../org/apache/royale/jewel/SectionContent.as | 23 > >> ++++++++++++++++++++++ > >>> .../org/apache/royale/jewel/TabBarContent.as | 6 +++--- > >>> .../org/apache/royale/jewel/WizardContent.as | 6 +++--- > >>> .../royale/jewel/supportClasses/IActivable.as | 11 +++++++++++ > >>> 5 files changed, 43 insertions(+), 9 deletions(-) > >>> > >>> diff --git > >> > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ApplicationMainContent.as > >> > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ApplicationMainContent.as > >>> index 21c47a0..389c209 100644 > >>> --- > >> > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ApplicationMainContent.as > >>> +++ > >> > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ApplicationMainContent.as > >>> @@ -85,14 +85,14 @@ package org.apache.royale.jewel > >>> /** > >>> * shows a concrete content and hides the rest > >>> * > >>> - * @param id, the id of the container to show > >>> + * @param activableName, the activableName of the > >> container to show > >>> * > >>> * @langversion 3.0 > >>> * @playerversion Flash 10.2 > >>> * @playerversion AIR 2.6 > >>> * @productversion Royale 0.9.4 > >>> */ > >>> - public function showContent(id:String):void > >>> + public function showContent(activableName:String):void > >>> { > >>> try > >>> { > >>> @@ -100,7 +100,7 @@ package org.apache.royale.jewel > >>> { > >>> var content:IActivable = > >> getElementAt(i) as IActivable; > >>> > >>> - if(content.id == id) > >>> + if(content.activableName == > >> activableName) > >>> { > >>> content.isActive = > true; > >>> } > >>> diff --git > >> > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/SectionContent.as > >> > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/SectionContent.as > >>> index 056514e..515320e 100644 > >>> --- > >> > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/SectionContent.as > >>> +++ > >> > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/SectionContent.as > >>> @@ -87,5 +87,28 @@ package org.apache.royale.jewel > >>> toggleClass("is-active", _isActive); > >>> } > >>> } > >>> + > >>> + private var _activableName:String; > >>> + > >>> + /** > >>> + * activableName is the name od this activable content > >>> + * > >>> + * @langversion 3.0 > >>> + * @playerversion Flash 10.2 > >>> + * @playerversion AIR 2.6 > >>> + * @productversion Royale 0.9.4 > >>> + */ > >>> + public function get activableName():String > >>> + { > >>> + return _activableName; > >>> + } > >>> + > >>> + public function set activableName(value:String):void > >>> + { > >>> + if (_activableName != value) > >>> + { > >>> + _activableName = value; > >>> + } > >>> + } > >>> } > >>> } > >>> diff --git > >> > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TabBarContent.as > >> > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TabBarContent.as > >>> index 7bd118e..91b95d1 100644 > >>> --- > >> > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TabBarContent.as > >>> +++ > >> > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TabBarContent.as > >>> @@ -56,14 +56,14 @@ package org.apache.royale.jewel > >>> /** > >>> * shows a concrete content and hides the rest > >>> * > >>> - * @param id, the id of the container to show > >>> + * @param name, the name of the container to show > >>> * > >>> * @langversion 3.0 > >>> * @playerversion Flash 10.2 > >>> * @playerversion AIR 2.6 > >>> * @productversion Royale 0.9.4 > >>> */ > >>> - public function showContent(id:String):void > >>> + public function showContent(activableName:String):void > >>> { > >>> try > >>> { > >>> @@ -71,7 +71,7 @@ package org.apache.royale.jewel > >>> { > >>> var content:IActivable = > >> getElementAt(i) as IActivable; > >>> > >>> - if(content.id == id) > >>> + if(content.activableName == > >> activableName) > >>> { > >>> content.isActive = > true; > >>> } > >>> diff --git > >> > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/WizardContent.as > >> > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/WizardContent.as > >>> index 31521a8..ad94fea 100644 > >>> --- > >> > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/WizardContent.as > >>> +++ > >> > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/WizardContent.as > >>> @@ -57,14 +57,14 @@ package org.apache.royale.jewel > >>> /** > >>> * shows a concrete content and hides the rest > >>> * > >>> - * @param id, the id of the container to show > >>> + * @param activableName, the activableName of the > >> container to show > >>> * > >>> * @langversion 3.0 > >>> * @playerversion Flash 10.2 > >>> * @playerversion AIR 2.6 > >>> * @productversion Royale 0.9.4 > >>> */ > >>> - public function showContent(id:String):void > >>> + public function showContent(activableName:String):void > >>> { > >>> try > >>> { > >>> @@ -72,7 +72,7 @@ package org.apache.royale.jewel > >>> { > >>> var content:IActivable = > >> getElementAt(i) as IActivable; > >>> > >>> - if(content.id == id) > >>> + if(content.activableName == > >> activableName) > >>> { > >>> content.isActive = > true; > >>> } > >>> diff --git > >> > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/IActivable.as > >> > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/IActivable.as > >>> index 603fc2e..bb344e9 100644 > >>> --- > >> > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/IActivable.as > >>> +++ > >> > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/IActivable.as > >>> @@ -41,5 +41,16 @@ package org.apache.royale.jewel.supportClasses > >>> */ > >>> function get isActive():Boolean; > >>> function set isActive(value:Boolean):void; > >>> + > >>> + /** > >>> + * activableName is the name od this activable content > >>> + * > >>> + * @langversion 3.0 > >>> + * @playerversion Flash 10.2 > >>> + * @playerversion AIR 2.6 > >>> + * @productversion Royale 0.9.4 > >>> + */ > >>> + function get activableName():String; > >>> + function set activableName(value:String):void; > >>> } > >>> } > >>> > >> > >> > > > > -- > > > > < > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.codeoscopic.com&data=02%7C01%7Caharui%40adobe.com%7C7136d39b0085415062a208d66bdcdca9%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636814993674121630&sdata=STa7FuJ1in1QvRclRk7h8XUOIcC3neXNjUVzWO6sZJw%3D&reserved=0 > > > > > > Carlos Rovira > > > > Presidente Ejecutivo > > > > M: +34 607 22 60 05 > > > > > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.codeoscopic.com&data=02%7C01%7Caharui%40adobe.com%7C7136d39b0085415062a208d66bdcdca9%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636814993674121630&sdata=STa7FuJ1in1QvRclRk7h8XUOIcC3neXNjUVzWO6sZJw%3D&reserved=0 > > > > > > Conócenos en 1 minuto! < > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Favant2.es%2F%23video&data=02%7C01%7Caharui%40adobe.com%7C7136d39b0085415062a208d66bdcdca9%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636814993674121630&sdata=HqBMnbd4nAzG%2BkU%2Ba9gWGDhHRhIxhIo2M3GvDOukUh8%3D&reserved=0 > > > > > > > > AVISO LEGAL: La información contenida en este correo electrónico, y > en su > > caso en los documentos adjuntos, es información privilegiada para uso > > exclusivo de la persona y/o personas a las que va dirigido. No está > > permitido el acceso a este mensaje a cualquier otra persona distinta > a los > > indicados. Si Usted no es uno de los destinatarios, cualquier > duplicación, > > reproducción, distribución, así como cualquier uso de la información > > contenida en él o cualquiera otra acción u omisión tomada en > relación con > > el mismo, está prohibida y puede ser ilegal. En dicho caso, por > favor, > > notifíquelo al remitente y proceda a la eliminación de este correo > > electrónico, así como de sus adjuntos si los hubiere. En > cumplimiento de la > > legislación española vigente en materia de protección de datos de > carácter > > personal y del RGPD 679/2016 le informamos que sus datos están siendo > > objeto de tratamiento por parte de CODEOSCOPIC S.A. con > CIFA85677342, con > > la finalidad del mantenimiento y gestión de relaciones comerciales y > > administrativas. La base jurídica del tratamiento es el interés > legítimo de > > la empresa. No se prevén cesiones de sus datos, salvo que exista una > > obligación legal. Para ejercitar sus derechos puede dirigirse a > CODEOSCOPIC > > S.A., domiciliada enPaseo de la Habana, 9-11, 28036 de Madrid > (MADRID), o > > bien por email [email protected], con el fin de ejercer sus > derechos de > > acceso, rectificación, supresión (derecho al olvido), limitación de > > tratamiento, portabilidad de los datos, oposición, y a no ser objeto > de > > decisiones automatizadas, indicando como Asunto: “Derechos Ley > Protección > > de Datos”, y adjuntando fotocopia de su DNI. Delegado de protección > de > > datos:[email protected] > > > > -- Carlos Rovira https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C7136d39b0085415062a208d66bdcdca9%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636814993674121630&sdata=GzCpnAeEiuARKtWGV6lqhaPtSy7T7dBhUynGJVmdrF4%3D&reserved=0
