Hi Husain,

 I need a combobox so I have a combobox in the repeater tag, you need
a checkbox so create a checkbox in the repeater, give it a static Id
like I have for the combo. 

 And in you AS function create a for loop like I have and check if the
checkbox is selected

Regards
Rajesh J

--- In flexcoders@yahoogroups.com, Husain Kitabi <[EMAIL PROTECTED]>
wrote:
> Hi Rajesh
> Thanks for your email
> I dint get the last part though.
>  
> You can pretty much convert this to use with checkbox.
> 
>  
> 
> How to convert combobox into checkbox?
> 
>  
> 
> Regards
> 
> Husain
> 
>  
> 
>  
> 
>  
> 
>  
> 
> 
> Rajesh Jayabalan <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I had the same problem, I found out that you cannot dynamically
> create id in the repeater tag.
> 
> When you create a checkbox in an array you will get an array of check
> boxes and you can go thru them in a for loop to find their values.. 
> 
> Here I am doing it with a combobox
> 
> <mx:Repeater id="att" dataProvider="{attArr.Attribute}">
>         <mx:HBox>
>               <mx:ComboBox id="itatt"
> dataProvider="{mx.utils.ArrayUtil.toArray(att.currentItem.Attvalues)}"
> width="150" height="18"/>
>         </mx:HBox>
>         </mx:Repeater>
> 
> and in the AS my for loop looks like
> 
> var atts:String;
> for (var i = 0; i < itatt.length; i++)
> {
> selectedItem = itatt[i].selectedItem;
> if (selectedItem != null && selectedItem.label != null)
> {
> if (atts == null)
> {
>       atts = new String();
> }
> atts = atts+itatt[i].labelField;
> atts = atts+": ";
> atts = atts+selectedItem.label;
> if (i < itatt.length-1)
> {
>       atts = atts+", ";
> }
> }      
> 
> You can pretty much convert this to use with checkbox.
> 
> Rajesh J
> --- In flexcoders@yahoogroups.com, "relisanhard52"
> <[EMAIL PROTECTED]> wrote:
> > Hi
> > I have a repeater tag which goes through an array. In my tag, i
create 
> > a checkbox. I want my check box id to be created dynamically.
> > I use
> > 
> > <mx:CheckBox id="{list.currentItem.myObjectId}" 
> > label="{list.currentItem.myObjectName}"/>
> > 
> > But it throws an error saying id is not a valid identifier.
Apparently 
> > it does not throw any error on label and it works perfect.
> > 
> > Any ideas how to create the id dynamically.
> > 
> > Regards
> > Husain
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> 
> 
> 
> ---------------------------------
> YAHOO! GROUPS LINKS 
> 
> 
>     Visit your group "flexcoders" on the web.
>   
>     To unsubscribe from this group, send an email to:
>  [EMAIL PROTECTED]
>   
>     Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service. 
> 
> 
> ---------------------------------
> 
> 
> 
> 
> hussain
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to