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
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
SPONSORED LINKS
Web site design development | Software design and development | Macromedia flex |
Software development best practice |
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.