RE: [flexcoders] How to access control attributes inside a repeater
Hi, Hari. Does the indexing of the id make sense to you? I designed the Repeater so I'm curious whether you were expecting it to work a different way. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Doodi, Hari - BLS CTR Sent: Thursday, October 27, 2005 10:24 AM To: 'flexcoders@yahoogroups.com' Subject: RE: [flexcoders] How to access control attributes inside a repeater Hi All, Thanks to all who put a thought about it. I was advised to id the component which is repeated and use that id in action script to access the controls attributes in each instance. Once again thanks to all. Thanks! Hari -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Wednesday, October 26, 2005 3:44 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] How to access control attributes inside a repeater I am just thinking here, but perhaps you could use something like: Alert.show(this.deptForm[i].getChildAt(n).text); Debug this.deptForm[i] to make sure it is referencing what you expect. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Doodi, Hari - BLS CTR Sent: Wednesday, October 26, 2005 3:02 PM To: 'flexcoders@yahoogroups.com' Subject: RE: [flexcoders] How to access control attributes inside a repeater I tried . Alert.show(this.deptForm[i].deptDesc.text); Alert.show(this.parent.deptForm[i].deptDesc.text); Both statements above displayed blank alerts. And found not working L Thanks! Hari -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Wednesday, October 26, 2005 1:47 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] How to access control attributes inside a repeater Hey, Jason, go ahead and risk being wrong. I do it all the time! Hari, repeaters generate an array of ids, so if the form has id myForm, you should be able to reference the repeater with myForm[n]. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Wednesday, October 26, 2005 12:31 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] How to access control attributes inside a repeater I just re-read what I wrote, and I meant that last sentence in a humorous way by the way Jason Merrill | E-Learning Solutions | icfconsulting.com From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Wednesday, October 26, 2005 11:48 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] How to access control attributes inside a repeater I didnt see you attached files since I am viewing via Outlook. Usually thats frowned upon on lists, but maybe with Yahoo lists like this its OK. Anyway, since I was off on your question apparently, now I really cant believe I responded. Jason Merrill | E-Learning Solutions | icfconsulting.com NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original.Any other use of this e-mail by you is prohibited. -- 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 Computer software 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.
RE: [flexcoders] How to access control attributes inside a repeater
I cant believe I am actually answering a question here. What does department.xml look like? If your XML is like this for example: dashboard menu button label=Help/ dropDowns dropDown label=Site Location: item label=AFDW/ You should be able to just add the next node name after the currentItem, like this: mx:Repeater id=r2 dataProvider={dataService.result.dashboard.menu.dropDowns.dropDown} startingIndex=0 mx:Text text={r2.currentItem.label} textAlign=right/ Jason Merrill | E-Learning Solutions | icfconsulting.com From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Doodi, Hari - BLS CTR Sent: Wednesday, October 26, 2005 10:14 AM To: 'flexcoders@yahoogroups.com' Subject: [flexcoders] How to access control attributes inside a repeater Hi, I would like to know how to access text property of an TextInput control in a Form which is repeated inside a repeater? Here is what I was doing.. I have two mxml file one department.mxml with repeater tag in it and another deptComp.mxml has form component with TextInput controls. I was able to display data from the source xml file. I want to know how to set data in to TextInput controls of different instance. Also found files are attached for your reference. Any kind of help is appreciated. Thanks in advance. Department.mxml contains ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml xmlns=* mx:Model id=deptList source=Department.xml/ mx:Repeater id=deptRepeater dataProvider={deptList.hari} deptComp deptModel={deptRepeater.currentItem} initialize=initialize()/ /mx:Repeater /mx:Application DeptComp.mxml contains ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.macromedia.com/2003/mxml mx:Script import mx.controls.Alert; ![CDATA[ function accessData( ) // display/set data from/to other instance { // I tried diff possible ways to access text property of TextInput control, deptName, but unable to display content. // None of the following Alert display text content. Alert.show(this.parent.deptForm[1].deptName.text,1); Alert.show(this.parent.deptForm.deptName[1].text,2); Alert.show(this.deptForm[1].deptName.text,3); Alert.show(this.deptName[1].text,4); Alert.show(deptName[1].text,5); Alert.show(deptForm[1].deptName.text,6); Alert.show(parent.deptName[1].text,7); Alert.show(this.parent.deptComp[1].deptForm.deptName.text,8); } ]] /mx:Script mx:Model id=deptModel deptNum/ deptNum deptDesc/deptDesc employees / /mx:Model mx:Form id=deptForm mx:FormItem mx:Button label=Click me click= accessData ()/ /mx:FormItem mx:FormItem label=Dept ID: mx:TextInput id=deptId text={deptModel. deptNum } width=200/ /mx:FormItem mx:FormItem label=Dept Name: mx:TextInput id=deptName text={deptModel. deptDesc} width=200 / /mx:FormItem mx:FormItem label=Employees: mx:DataGrid id=employee_dg dataProvider={deptModel.employees.employee} / /mx:FormItem /mx:Form mx:HRule width=668 height=20 / /mx:VBox Thanks! Hari NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original.Any other use of this e-mail by you is prohibited. -- 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.
RE: [flexcoders] How to access control attributes inside a repeater
I didnt see you attached files since I am viewing via Outlook. Usually thats frowned upon on lists, but maybe with Yahoo lists like this its OK. Anyway, since I was off on your question apparently, now I really cant believe I responded. Jason Merrill | E-Learning Solutions | icfconsulting.com NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original.Any other use of this e-mail by you is prohibited. -- 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 Computer software 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.
RE: [flexcoders] How to access control attributes inside a repeater
I just re-read what I wrote, and I meant that last sentence in a humorous way by the way Jason Merrill | E-Learning Solutions | icfconsulting.com From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Merrill, Jason Sent: Wednesday, October 26, 2005 11:48 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] How to access control attributes inside a repeater I didnt see you attached files since I am viewing via Outlook. Usually thats frowned upon on lists, but maybe with Yahoo lists like this its OK. Anyway, since I was off on your question apparently, now I really cant believe I responded. Jason Merrill | E-Learning Solutions | icfconsulting.com NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original.Any other use of this e-mail by you is prohibited. -- 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 Computer software 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.
RE: [flexcoders] How to access control attributes inside a repeater
I am just thinking here, but perhaps you could use something like: Alert.show(this.deptForm[i].getChildAt(n).text); Debug this.deptForm[i] to make sure it is referencing what you expect. Tracy From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Doodi, Hari - BLS CTR Sent: Wednesday, October 26, 2005 3:02 PM To: 'flexcoders@yahoogroups.com' Subject: RE: [flexcoders] How to access control attributes inside a repeater I tried . Alert.show(this.deptForm[i].deptDesc.text); Alert.show(this.parent.deptForm[i].deptDesc.text); Both statements above displayed blank alerts. And found not working L Thanks! Hari -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Wednesday, October 26, 2005 1:47 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] How to access control attributes inside a repeater Hey, Jason, go ahead and risk being wrong. I do it all the time! Hari, repeaters generate an array of ids, so if the form has id myForm, you should be able to reference the repeater with myForm[n]. Tracy From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Merrill, Jason Sent: Wednesday, October 26, 2005 12:31 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] How to access control attributes inside a repeater I just re-read what I wrote, and I meant that last sentence in a humorous way by the way Jason Merrill | E-Learning Solutions | icfconsulting.com From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Merrill, Jason Sent: Wednesday, October 26, 2005 11:48 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] How to access control attributes inside a repeater I didnt see you attached files since I am viewing via Outlook. Usually thats frowned upon on lists, but maybe with Yahoo lists like this its OK. Anyway, since I was off on your question apparently, now I really cant believe I responded. Jason Merrill | E-Learning Solutions | icfconsulting.com NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original.Any other use of this e-mail by you is prohibited. -- 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.