Husain, you didn't say what you were trying to do with your repeated
checkboxes that made you think you needed to put a different id on each
one.
But you should never need to do this; their id acts like an array so
that each one can be directly accessed. For example, if you have
<mx:Repeater ...>
<mx:CheckBox id="cb"/>
</mx:Repeater>
then you can directly access the first CheckBox as cb[0], the second as
cb[1], etc.
Does this let you do what you want?
- Gordon
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Rajesh Jayabalan
Sent: Friday, September 09, 2005 10:07 AM
To: [email protected]
Subject: [flexcoders] Re: checkbox in repeater tag
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 [email protected], 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 [email protected], "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
--
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
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/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/