1 Reply Latest reply on Sep 30, 2011 7:30 PM by targetplanet

    How to create widget Dynamically at run time using action script

    sumit_sh87

      i have created  widget's in my application . but in the main page i want only selected widgets to be displayed..

      lets say i have 3 categories of users for which i've created 3 widget groups i.e. search , update , report. with in these groups i have number of widgets. if user belongs to searchUser category only search widget group has to be displayed in my main page, if user belongs to updateUser group i want to display search and update widget group in my main page and so  on..

      thanx

        • 1. Re: How to create widget Dynamically at run time using action script
          targetplanet

          Assuming these widgets are always on your main page, you could bind the visible parameter of the widget to variable, and then set that variable depending on the users group.  So you could mark your groups search =1, update =2, report =3.  Have a Bindable variable that you can set corrisponding to the group of the current user

          [Bindable]private var groupLevel:int;

           

          then in your search widget tag, set the visible parameter like so visible={(groupLevel>=1)?true:false}

          user widget would be visible={(groupLevel>=2)?true:false}

          and report widget visible={(groupLevel==3)?true:false}

           

          that should allow the widget so appear for the appropriate group.