Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-20 Thread piotrz
I think it depends whether you will show me some scenario where it need it. I think some components you may never use as dynamic - you will always use it in mxml. I know that we have states where components even in mxml can be dynamically created, but I need to see such scenario to make them dyna

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-19 Thread sankar
piotrz wrote > I just introduce another bead which may be helpful for custom component, > but in most cases will be used inside MDL components UpgradeChildren. > > I've just make as default possible to create dynamically following > components: > Button, > RadioButton, > CheckBox, > TextArea, > T

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-18 Thread piotrz
Hi Carlos, No problem :) Thanks! Santanau, I just introduce another bead which may be helpful for custom component, but in most cases will be used inside MDL components UpgradeChildren. I've just make as default possible to create dynamically following components: Button, RadioButton, CheckBox

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-16 Thread Carlos Rovira
Hi Piotr, sorry, just see this, but as you said I'm very busy this days and even can't take the time to look to all the threads going on. I can't analyze right now the changes you want to do, but I trust you and I'm sure what you plan will be the right way to go. Hope I can return in some days as

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-16 Thread sankar
piotrz wrote > I'm thinking on adding as "default" to components ability for dynamic > creation without any "isDynamic" property etc. I wanted to discuss it with > Carlos in the other thread, but he is busy currently, so I'm still waiting > for his input. Hi Piotr, That sounds nice. Although I do

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-15 Thread piotrz
Hi Santanau, I'm thinking on adding as "default" to components ability for dynamic creation without any "isDynamic" property etc. I wanted to discuss it with Carlos in the other thread, but he is busy currently, so I'm still waiting for his input. If I got it positiv I will start work and you shou

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-15 Thread sankar
piotrz wrote > In that case it was problem with function which I've called from > javascript [1] > > [1] https://paste.apache.org/FyB8 Hi Piotr, I was busy for quite some time from the updates here. Thank you! for the link you shared. That actually fix the problem for dynamically adding componen

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-06 Thread piotrz
Carlos, I'm bringing back to live this thread with question about default upgrade. Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context: http://apache-flex-development.247.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p60154.html Sent from the Apac

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-04 Thread Alex Harui
Hi Piotr, Congratulations on finding the problem. You might want to make a set of externs or typedefs for MDL. That would prevent renaming of these functions and type check those functions as well. See the way I put together the BarcodeScanner.swc in the flex-tourjs repo. -Alex On 3/4/17, 4:

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-04 Thread piotrz
Santanau, I just pushed fix for problem with release version of your application. Alex, In that case it was problem with function which I've called from javascript [1] [1] https://paste.apache.org/FyB8 Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context:

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-03 Thread piotrz
I have found in MDL library that process of upgrade won't occur if component is already upgraded. In this case I could get rid off this isDynamic property and just add upgrade ability as default. What do you think Carlos ? Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this mes

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-03 Thread piotrz
In order to refresh dynamically created element in some cases I have to upgrade also subcomponent. In each scenario it can be something else. I've created UpgradeElement which can upgrade only simple component. In case of Button this will be working: var btn:Button = new Button(); btn.addBead(

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-03 Thread Alex Harui
On 3/3/17, 8:00 AM, "piotrz" wrote: >I didn't think about such scenario, so it look like we should expose >isDynamic also to MXML. That might work, although it can't be a constructor parameter. MXML doesn't allow constructor parameters. I would rather explore why whatever isDynamic does can'

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-03 Thread piotrz
I didn't think about such scenario, so it look like we should expose isDynamic also to MXML. Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context: http://apache-flex-development.247.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p60043.html Sent from

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-03 Thread Harbs
Yeah. Debugging these things are not fun. Chrome also allows you to set breakpoints on DOM elements. I’ve found this useful in breaking at a specific place in the lifecycle to see what’s going on. > On Mar 3, 2017, at 7:24 AM, Alex Harui wrote: > > > > On 3/2/17, 8:51 PM, "piotrz" wrote: >

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-02 Thread Alex Harui
On 3/2/17, 8:51 PM, "piotrz" wrote: >I will try to fight with this. The problem is that in this case I don't >have >any exception in the console. :) Yuk. I think I would next examine the DOM. Compare it against the js-debug version. If DOM objects are missing in js-release, then I would set

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-02 Thread piotrz
I will try to fight with this. The problem is that in this case I don't have any exception in the console. :) Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context: http://apache-flex-development.247.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p600

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-02 Thread Alex Harui
On 3/2/17, 5:59 PM, "piotrz" wrote: >Alex, > >What could help you to fix that. Should I try to find in minified JS my >potential class and show it here? I don't know how much time you have, but it would be great if you simply tried to debug into it on your own. Maybe you will find a set of to

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-02 Thread piotrz
Alex, What could help you to fix that. Should I try to find in minified JS my potential class and show it here? Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context: http://apache-flex-development.247.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-02 Thread Alex Harui
On 3/2/17, 9:19 AM, "piotrz" wrote: >Alex, > >Do you think because it is something with variable renaming in release >version? >I remember that this problem come back to us. Almost every time js-debug works and js-release doesn't, it has to do with renaming. It is a pain to figure out (at le

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-02 Thread piotrz
Alex, Do you think because it is something with variable renaming in release version? I remember that this problem come back to us. Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context: http://apache-flex-development.247.n4.nabble.com/FlexJS-MDL-Dynamic-C

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-02 Thread sankar
piotrz wrote > var tmpComp:Button = new Button(true); - need to be true in constructor. I've seen such usage of addition do not works in compiled "bin-release" version. Things not works like 'ripple' etc. in "bin-release" version. Thanks! -- View this message in context: http://apache-flex-d

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-02 Thread Alex Harui
Piotr, Santanu may be right that there are dynamic MXML scenarios involving states and includeIn/excludeFrom. In those cases, the instances are created by MXMLDataInterpreter just like other MXML tags, but may not be added to the DOM until much later, or removed and re-added as states change. I

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-02 Thread piotrz
Sankar, Code which you are showing me should work without the problem. var tmpComp:Button = new Button(true); - need to be true in constructor. This: You don't need any action cause MDL will handle this one. Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this messag

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-02 Thread sankar
piotrz wrote > Ok but you didn't add this Grid to MXML, you will add this component by > addElement yes ? > > Maybe I do not understand your use cases - provide me an example if you > can. Hi Piotr, My test was pretty basic with FlexJS MDL default components only. Here's the basic test case whe

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-02 Thread piotrz
Sankar, Ok but you didn't add this Grid to MXML, you will add this component by addElement yes ? If you are adding Grid in MXML - It will be initialized on his own - MDL will upgrade it automatically. Maybe I do not understand your use cases - provide me an example if you can. If you have cre

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-02 Thread sankar
Hi Piotr, I may oppose this your opinion: piotrz wrote > I don't see any advantage to have this property in MXML. Dynamic component > is supposed to be created from code new Button(true). Say I have an external Grid component which has many buttons and TextFields declared in MXML tag - and I wan

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-02 Thread piotrz
Hi Sankar, I don't see any advantage to have this property in MXML. Dynamic component is supposed to be created from code new Button(true). If you need more dynamic components which is already in our MDL library let me know. I've changed only few of them to be dynamic. If component do not have i

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-03-02 Thread sankar
Hi, I recently updated my local framework source from Git repository. I am not sure where we're standing now with this but I wanted to give Piotr's Button and TextField implementation a try with new UpgradeElement bead. So far I able to get the dynamic element upgraded by this way: var newButton

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-26 Thread Harbs
> and in some > situations, it might need to be the parent document's body if you are in > an IFrame. That’s not going to work unless there’s some way to create elements in the outer document which we currently don’t have. I think the simplest way to go about it, is to leave it as-is for now. It

Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-24 Thread Alex Harui
On 2/24/17, 3:00 AM, "Harbs" wrote: >Having two discussions in one thread is confusing… ;-) > >I guess we could make a custom object, but I’m not sure what the point >is. AIUI, the purpose of IPopUpHost is to support many levels of popups. >Assuming we are right that dialog must be attached to

[MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-24 Thread Harbs
Having two discussions in one thread is confusing… ;-) I guess we could make a custom object, but I’m not sure what the point is. AIUI, the purpose of IPopUpHost is to support many levels of popups. Assuming we are right that dialog must be attached to , the simplest way to handle that is to at

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-23 Thread piotrz
For sure not when page is loaded, cause components has been added to already loaded page. Hmm...I just have an idea that in addedToParent I could check whether component have "upgraded" tag which is required by MDL if it has I could based on that upgrade it or not. Than I do not need this Bead Up

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-23 Thread Alex Harui
Do you want to know when a component has been added to the DOM or when the page is considered loaded? -Alex On 2/23/17, 10:47 PM, "piotrz" wrote: >Alex, > >Do you know about the event which can tell me when component has been >loaded >in DOM? > >I may try to use that. > >Piotr > > > >- >Ap

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-23 Thread piotrz
Alex, Do you know about the event which can tell me when component has been loaded in DOM? I may try to use that. Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context: http://apache-flex-development.247.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-23 Thread Alex Harui
On 2/23/17, 12:12 AM, "Harbs" wrote: >It could return the body, but the body is not an IPopUpHost and it does >not have addElement(). > >The element of an embedded app will not be the body, so addElement() to >that will blow up if it needs to be added to the body. This is JavaScript right? We

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-23 Thread Alex Harui
FWIW, MXML cannot set constructor arguments. All components instantiated via MXML must have no constructor arguments or optional constructor arguments. I still think the lifecycle should be able to tell you whether an addChild is happening "dynamically" or not. Has that been explored and abandon

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-23 Thread piotrz
I was thinking more about solution for this and I think that interface is not the right way. If my component will implement interface during creation I will always have two lines of code: var textField:TextField = new TextField(); textField.isDynamic = true: I think I will just add field to c

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-23 Thread Harbs
It could return the body, but the body is not an IPopUpHost and it does not have addElement(). The element of an embedded app will not be the body, so addElement() to that will blow up if it needs to be added to the body. > On Feb 23, 2017, at 9:57 AM, Alex Harui wrote: > > > > On 2/22/17,

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-22 Thread Alex Harui
On 2/22/17, 11:18 PM, "Harbs" wrote: >That’s not going to work for an embedded app because the body element can >be outside the app completely. What would it take to make it work? If we ask each parent if it is an IPopUpHost and if it answers yes and it gives us an Iparent to call addElement

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-22 Thread Harbs
That’s not going to work for an embedded app because the body element can be outside the app completely. > On Feb 23, 2017, at 9:01 AM, Alex Harui wrote: > > > > On 2/22/17, 9:49 AM, "Harbs" wrote: > >> It looks like my change works. >> >> I just committed a change where instead of Dialog

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-22 Thread Alex Harui
On 2/22/17, 9:49 AM, "Harbs" wrote: >It looks like my change works. > >I just committed a change where instead of Dialog being added to >Application, the Dialog HTML element is added to . I needed to >manually call addedToParent() to make sure the children render, and it >all seems to work. :-)

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-22 Thread Guild, Jason A (DFG)
Alex: Replies below... On 2/21/2017 22:20, Alex Harui wrote: That said, we don't want the compiler generating code. Everything else is converted to data structures so the framework can interpret the data structures. The reason is mostly practical. It is scary for most folks to change the comp

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-22 Thread piotrz
Back to the subject: I don't see possibility to achieve PAYG without forcing developer to do some additional hacks on our components once he add UpgradeElement. Although I'm able to provide dynamic ability ON DEMAND. Creating IDynamic interface with property isDynamic. I'll start to work - let

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-22 Thread Harbs
It looks like my change works. I just committed a change where instead of Dialog being added to Application, the Dialog HTML element is added to . I needed to manually call addedToParent() to make sure the children render, and it all seems to work. :-) Harbs > On Feb 22, 2017, at 5:24 PM, Harb

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-22 Thread Harbs
> On Feb 22, 2017, at 6:08 PM, Alex Harui wrote: > > > > On 2/22/17, 7:24 AM, "Harbs" wrote: > >> So, this is going to be a problem. >> >> Right now Application is always attached to , but that is probably >> going to change. A very common use case of RIAs is embedded in web pages. >> In th

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-22 Thread Alex Harui
On 2/22/17, 7:24 AM, "Harbs" wrote: >So, this is going to be a problem. > >Right now Application is always attached to , but that is probably >going to change. A very common use case of RIAs is embedded in web pages. >In that case, the base element will not be unless it’s in an >iframe. iframe

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-22 Thread Harbs
So, this is going to be a problem. Right now Application is always attached to , but that is probably going to change. A very common use case of RIAs is embedded in web pages. In that case, the base element will not be unless it’s in an iframe. iframes are not always a good solution. For examp

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-22 Thread Carlos Rovira
Hi Harbs I asked here for the best way to reference tag from Dialog. I did the actual implementation as a workaround since at that moment you discussed it but no definite solution was opted. So considere it as a temporal code. If you see Dialog: https://getmdl.io/components/index.html#dialog-sec

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-22 Thread Harbs
I just looked at that code for the first time. I’m confused. Why are you attaching it to Application? Why not just add dialog to ? I don’t see why you need a reference to Application at all. Unless, of course the dialog should be centered in the application (which might not be ). Additionally,

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-22 Thread Carlos Rovira
Regarding mdl:Application in concrete, is just a js:Application with a static var to handle body since is needed for Dialog, and that's what MDL Dialog impose. so just a static var is the difference... 2017-02-22 9:53 GMT+01:00 Harbs : > “Must” is too strong. > > Our app needs MDL for controls, b

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-22 Thread Harbs
“Must” is too strong. Our app needs MDL for controls, but the main functionality doesn’t and CAN’T rely on MDL. If mdl:Application can do everything a basic:Application can do, then that’s fine (as long as it can be sub-classed, because our app cannot be based off ), but if mdl:Application cann

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread Alex Harui
Well, I agree that most FlexJS users will not be more productive having to assemble everything from tons of little beads, and that's why I've been saying for quite a while that I expect heavier component sets like Express to be more popular. That said, we don't want the compiler generating code.

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread Alex Harui
On 2/21/17, 11:51 AM, "piotrz" wrote: >One thing which I wanted to add to make you more understand. > >1) If component is instantiated in mxml and this component has added >UpgradeElement as default - upgradeElement method from MDL will not be >fired >- Cause "componentHandler" do not exists ye

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread Guild, Jason A (DFG)
THIS. As an outsider looking in who also doesn't have much experience with FlexJS, I see the approach outlined below to be the best compromise between the "FlexJS the API" and PAYG for efficiency. I know it's just a step on the way, and I am positive that Express will be a big help, but I've

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread piotrz
One thing which I wanted to add to make you more understand. 1) If component is instantiated in mxml and this component has added UpgradeElement as default - upgradeElement method from MDL will not be fired - Cause "componentHandler" do not exists yet. 2) Once web is loaded and some component is c

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread Carlos Rovira
Hi, I always try to extrapolate from what I see people are doing in MDL. I didn't have the time to search too much, but seems people as the perform something dinamic they use the method, so something "external" is done, and that's the same approach I proposed with the static utility class. That cl

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread piotrz
I went through the comments and I see that voices rather saying that we shouldn't make automatic upgrades for the components, but since it is not easy add this ability as an util, maybe we should introduce an interface - IDynamic with property IsDynamic - setted by constructor or traditionally. (of

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread piotrz
Maybe I will commit RadioButton changes and you will see - if I will be able to even upgrade it. Let say that our component consists with: Checkbox and Span need to be upgraded, so inside my custom component I will create: var cbx = new CheckBox(); - If it is upgradable inside I won't have

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread sankar
Carlos Rovira wrote > What about to have a MDLUtils or UpgradeMDLUtils class with static > methods? > So people that would create a component will do > "UpgradeUtils.upgradeElement(buttonToUpgrade);" > In this way people using a button 90% of times will not be affected by > that > overhead. > (I'm

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread piotrz
But from the developer point of view I see TextField - if text field has inside one or three elements to upgrade ? As a developer I don't know nothing about component inside - I would like to use it, dynamically. If I won't upgrade some internal components than something won't be working. For e

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread Josh Tynjala
I think, since the core MDL library doesn't upgrade components by default, it's okay if the FlexJS wrapper doesn't either. I think we should make sure it's well documented, though. Maybe with a special section in the MDL example app. - Josh On Feb 21, 2017 7:18 AM, "Carlos Rovira" wrote: What a

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread Carlos Rovira
What about to have a MDLUtils or UpgradeMDLUtils class with static methods? So people that would create a component will do "UpgradeUtils.upgradeElement(buttonToUpgrade);" In this way people using a button 90% of times will not be affected by that overhead. (I'm thinking on a general scenario where

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread Dev LFM
I did not tried yet FlesJS, but I'm listening every post. I think those beads should be added automatically and internally only if needed, ex: if some component have a binding tag like visible="{model.show}", this would automatically add 2 beads, the binding bead and the visibilitybead. What I mea

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread yishayw
I agree. If you think this bead will be used very often you can create a subclass that bakes it in. ImageButton in Express is probably a good example, though I would use StrandUtils to save some code lines. -- View this message in context: http://apache-flex-development.247.n4.nabble.com/Fl

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread piotrz
Hi Carlos, Well at some point I agree, but there are components which you won't be able to simple use this bead: For example TextField. You cannot do such things: var textField = new TextField(); textField.addBead(new UpgradeElement()) - cause this bead is registering host.element and element is

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread Carlos Rovira
Hi Piotr, thanks for introducing the UpgradeElement bead. I saw that Button and TextField add this element by default. But that breaks IMHO the concept of PAYG. many people can use a button without the need to have always that bead added. For me is the same example that with TextField and Prompt o

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-21 Thread sankar
Hi Piotr, On a separate thought, this following throws me error in "bin-release" version, but "bin-debug" doing good. > if ("componentHandler" in document.defaultView) > { > > document.defaultView["componentHandler"].upgradeElement(c.positioner); > } I don't

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-20 Thread piotrz
I think it's available - you can pull the source and try TextField and Button I'm working next on adding UpgradeElement bead to RadioButton an Checkbox - it's more tricky than adding it to TextField or Button. Once I do this I will get back to work on Tabs. Piotr - Apache Flex PMC piotrza

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-20 Thread sankar
Hi Piotr, Sound nice. Although I can't think about any one component but the feature probably good to be default to all the components available in FlexJS MDL. Let me know when I should update latest source when you done with these. I'm also hoping you get an answer to update Tabs as well. Th

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-20 Thread piotrz
Sankar, I just pushed UpgradeElement bead as part of fix for this jira. I've added this bead as default to Button and TextField. You can from now on create those components dynamically. Let me know to which component you want to add more this bead and I will make the changes. Piotr - Ap

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-20 Thread sankar
Sounds good, Piotr. -- View this message in context: http://apache-flex-development.247.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p59685.html Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-20 Thread piotrz
Sankar, In case of standard component it is working and I'm going add Bead which will be doing such upgrade - This bead will be default add to some components. In case of TabBar I need to do some other things - probably this approach which find me Om. Piotr - Apache Flex PMC piotrzarzyck

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-20 Thread sankar
Hi, I'm not sure if this is the right approach, but I took some ideas from Josh, Alex and MDL library website, and modified UIBase.as class inside HTML package. I modified it to this, > public function addElement(c:IChild, dispatchEvent:Boolean = true):void > { > COMPILE::JS >

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-20 Thread sankar
Hi Piotr, Thanks for the update. Previously I was updating dataProvider by using but it anyway required me to change something in TabBar source. Your fixed example showing more cleaner procedure now. I shall use that. I shall update my local source soon, hopefully dynamic child problem will reso

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-19 Thread piotrz
Sankar, In case of adding Tab in TabBar I've already commit fix which prepare this component for adding Tabs. Unfortunately I need also fix this jira with dynamic child problem, cause once you add tab dynamically it stopped working. If you wanna try my fix you need to add to your css [1] and use

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-19 Thread sankar
piotrz wrote > Deeper investigation points me to componentHandler.register method - It > looks like created component need to be registered and maybe than > upgradeElement method will work. > > Method register take: > > /** > * Describes the type of a registered component type managed by > * co

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-19 Thread piotrz
Hi Om, Thank you. I will give a try tomorrow and let you know! Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context: http://apache-flex-development.247.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p59662.html Sent from the Apache Flex Development

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-19 Thread OmPrakash Muppirala
Piotr, I ran into this codepen from one of the issues in MDLs github http://codepen.io/anon/pen/BNOVvw Is that what we need to here? Thanks, Om On Feb 19, 2017 7:47 AM, "piotrz" wrote: > Alex, > > Actually this code which I'm showing in the links is something which I > wanted to achieve and

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-19 Thread piotrz
Alex, Actually this code which I'm showing in the links is something which I wanted to achieve and should work. Maybe someone have more knowledge about MDL, but I'm looking into MDL code it's pointing me nowhere. I will wait a bit if no one help me here I will try to on stackoverflow. Piotr -

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-19 Thread Alex Harui
FWIW, one approach Peter and I often take is to start with the HTML that you want to change, then write some JS to make it work. That way, no Flex code is getting in your way. As Adobe employees we get to use Dreamweaver for free so we use that, but I'm sure any other HTML/JS editor will work, ev

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-19 Thread piotrz
Deeper investigation points me to componentHandler.register method - It looks like created component need to be registered and maybe than upgradeElement method will work. Method register take: /** * Describes the type of a registered component type managed by * componentHandler. Provided for be

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-19 Thread piotrz
I was able to achieve adding element dynamically but upgradeElement is still not working. Updated app [1] [1] https://1drv.ms/u/s!ApVpLyjpHDC2zD1d1zd9PuXtmwmG Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context: http://apache-flex-development.247.n4.nabbl

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-19 Thread piotrz
Hi Josh, Thank you for pointing me to these methods. Unfortunately it is not working for me. I reached the point where I'm able to create dynamically component in FlexJS, but upgradeElement cannot find it and upgrade properly. I decided to create simple pure MDL application [1] where I'm doing s

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-18 Thread piotrz
Carlos, I will try to explore it, your focus on AMF is crucial. :) Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context: http://apache-flex-development.247.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p59636.html Sent from the Apache Flex Developm

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-17 Thread Carlos Rovira
Hi, for what you said we have various "update" methods I wasn't aware. (updateDom, updateAllRegistered and updateElement...and maybe others to look for) We should see where's the best way to introduce it in our FlexJS architecture. Maybe Alex suggestion could be explored to see the best place to d

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-17 Thread piotrz
Hi Sankar, For me this jira is more like feature than Bug. I will look into that. I think all I need to do is add element to the DOM on specified event. Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context: http://apache-flex-development.247.n4.nabble.com/

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-17 Thread sankar
I think this should be an answer what they already mentioned in the original MDL library page: I also found somewhere at Stackoverflow people discussing on this, someone suggested this: > For future readers and use

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-17 Thread Alex Harui
On 2/17/17, 7:51 AM, "Josh Tynjala" wrote: >I used in MDL in a JS project recently, and I found that if I created MDL >components after the initial page load, I needed to run the following code >once they were added to the DOM: > >if("componentHandler" in window) >{ >window["componentHandle

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-17 Thread Josh Tynjala
I used in MDL in a JS project recently, and I found that if I created MDL components after the initial page load, I needed to run the following code once they were added to the DOM: if("componentHandler" in window) { window["componentHandler"].upgradeAllRegistered(); } My app was divided into

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-17 Thread sankar
Hi Carlos, Is this makes some sense? - http://stackoverflow.com/questions/32363511/how-can-i-update-refresh-google-mdl-elements-that-i-add-to-my-page-dynamically (the answer part). I'm not very familiar with DOM development, though. Thanks! -- View this message in context: http://apache-flex-

Re: [FlexJS] MDL - Dynamic Child Problem

2017-02-17 Thread Carlos Rovira
Hi Sankar, when using MDL standard (non flexjs version) how things are done to dinamicaly create some component? Since FlexJS MDL is a "wrap" over MDL js/css libraries, what we should envision is the way to "flex"-ify the things coming from MDL world. So I propose that investigate the problem and