Hi Hugo, I think your want something like TDJ ExampleAndSourceCodeTabbedSectionContent [1]
That's the main component page used in each page in TDJ to add the examples, but maintains title, description and tabs to example and source code. strandChildren is the place where "chrome" elements are located Then you have an API to add elements that comes from the MXML content in the right place without removing things in chrome. The concept comes from Basic Panel. [1] https://github.com/apache/royale-asjs/blob/0842e11ede8bb28cddd3c2bd7c4fa092989defe8/examples/jewel/TourDeJewel/src/main/royale/components/ExampleAndSourceCodeTabbedSectionContent.as El jue., 2 jul. 2020 a las 22:31, Hugo Ferreira (<[email protected]>) escribió: > Hi, > > I have my own component from a Card called Form.mxml: > <?xml version="1.0" encoding="utf-8"?> > <j:Card xmlns:fx="http://ns.adobe.com/mxml/2009" > xmlns:js="library://ns.apache.org/royale/basic" > xmlns:html="library://ns.apache.org/royale/html" > xmlns:j="library://ns.apache.org/royale/jewel" > initComplete="init()"> > ... > <!-- A lot of things like custom header, etc ... --> > ... > > Then I create a Login.mxml that extends from Form.mxml: > <?xml version="1.0" encoding="UTF-8"?> > <f:Form xmlns:fx="http://ns.adobe.com/mxml/2009" > xmlns:html="library://ns.apache.org/royale/html" > xmlns:j="library://ns.apache.org/royale/jewel" > xmlns:js="library://ns.apache.org/royale/basic" > > The issue, is, if I don't put anything inside my <f:Form, then I see at > runtime the Form.mxml content, however if I put tags inside <f:Form, I see > the <f:Form content but not the Form.mxml header, etc.. like if Login.mxml > extends directly from Card and not Form. > > I already tried to put the content of inside <j:CardPrimaryContent> but > it's the same result. > > The goal of Form.mxml it's to have a standard behaviour in all my Cards > without repeat code. > -- Carlos Rovira http://about.me/carlosrovira
