First some trivia: -Adding a component to the stage is what sets the nestLevel. -I saw yesterday that you can just set nestLevel and skip adding to stage, but other things may not work like style lookups. -Calling validateProperties also resets the invalidateProperties flag.
Besides the calling of these invalidate/validation methods, another part of the component lifecycle is how it gets sized. In Flex, children are sized by their parents. If you don’t explicitly set the proper size on a component it might layout in a surprising way or not show up at all because it is 0x0. -Alex On 3/11/15, 9:25 PM, "Pawan Yadav" <pawanrao...@gmail.com> wrote: >Calling commitProperties directly will work but after that if this >component gets added then it is not showing display list properly. Instead >of creating news rows and align them properly it keeps on putting >everything on first row itself. > >Best Regards >Pawan > >On Thu, Mar 12, 2015 at 9:45 AM, Jake Knerr <j...@ardisialabs.com> wrote: > >> Hi Jeffry, >> >> *Why wouldn't you just call commitProperties() directly?* >> >> commitProperties() is a protected method. >> >> The OP stated that he is working with *some UIComponent *and that he >> changed public properties such as *includeInLayout= false *and >> *selectedItem**. *I took this to mean he is asking how to manipulate the >> component's state using the component's public interface. >> >> If he is going to create a subclass of UIComponent and add state logic >> internally, he may as well call commitProperties() directly within the >> component. >> >> On Wed, Mar 11, 2015 at 9:16 PM, Jeffry Houser <jef...@dot-com-it.com> >> wrote: >> >> > On 3/11/2015 10:38 PM, Jake Knerr wrote: >> > >> > To the OP: if you don't want to extend the component, you should be >>able >> > to get commitProperties() to fire on a component that has not been >>added >> to >> > the displayList by first calling invalidateProperties() and then call >> > validateProperties(). >> > >> > *E.G.* >> > var cmp:UIComponent = new UIComponent(); >> > cmp.invalidateProperties(); >> > cmp.validateProperties(); >> > >> > For the above example, cmp's commitProperties() method will fire even >> > though the component isn't on the displayList. >> > Both invalidateProperties() and validateProperties() are required. >> > >> > >> > Why wouldn't you just call commitProperties() directly? >> > >> > -- >> > Jeffry Houser >> > Technical Entrepreneurhttp://www.jeffryhouser.com203-379-0773 >> > >> > >> >> >> -- >> Jake Knerr - Flex Developer >> Ardisia Labs >> www.ardisialabs.com >>