I have a few questions about this code that I will post. My Second
issue pertains to the value of the repeated List component. In this
app I am dragging items from a list that is populated by a Web Service
into the lists that are repeated (employeeList). The dragging is
working fine and the items are showing up in the repeated list. Once
the items have been added to the repeated list, I would like to get
the values but am having issues. In the code I have a button that you
can click that should show the value of the first repeated list but
doesn't. I have tried several things to no avail. Currently I am
trying 'employeeList[0].dataProvider.numProjectID.'



<?xml version="1.0" encoding="utf-8"?>
<mx:VBox 
        xmlns:mx="http://www.macromedia.com/2003/mxml";
        xmlns:ppcView="com.XXXX.XXXX.stickies.view.*"
        width="715" 
        height="550" 
        backgroundColor="#666666" 
        cornerRadius="24"
        creationComplete="getPersonnelFromIndexHelper();" 
        marginBottom="8"  marginTop="8"  marginLeft="8"  marginRight="8">
        
        <ppcView:ProjectListViewHelper name="projectListViewHelper" view="{
this }" />
        
        <!--
============================================================================================
-->

        <mx:Script>
        <![CDATA[
                import com.iterationtwo.cairngorm.view.ViewLocator;
                import mx.managers.DragManager;
                import mx.core.DragSource;
                
        
//-----------------------------------------------------------------------------------
                //Page variables
                var oPersonnelByDepartment:Object;
                
        
        
//-----------------------------------------------------------------------------------
                private function getPersonnelFromIndexHelper(){
                        //Get the projects list, which is set in the 
indexViewHelper on app
initialize 
                        var indexViewHelper =
ViewLocator.getInstance().getViewHelper("indexViewHelper");
                        oPersonnelByDepartment = 
indexViewHelper.getPersonnelByDepartment();
        
                        //...and create a repeater element for each
                        personnelRepeater.dataProvider = 
oPersonnelByDepartment.fullName;
                        
                        //Here is where I try to set the panel's label but 
can't. I can,
however
                        //set a text component's text property. Why?
                        personnelHeader[0].text = 
oPersonnelByDepartment.fullName[0];
                        
                        for(var i = 0; i < personnelPanel.length; i++){
                                personnelPanel[i].label = 
oPersonnelByDepartment.fullName[i];
                                
//mx.core.Application.alert(personnelPanel[i].label);
                        }
                        
                }

                function doMe(){
                
mx.core.Application.alert(employeeList[0].dataProvider.numProjectID.toString());
                
                }


        
//-----------------------------------------------------------------------------------
        ]]>
        </mx:Script>

        <!--
============================================================================================
-->

        <mx:Button label="click" click="doMe()"/>
        <mx:Tile id="personnelTile" direction="horizontal" width="100%">
        <mx:Repeater id="personnelRepeater" startingIndex="0">
                        <mx:Panel id="personnelPanel" >
                                <mx:Text id="personnelHeader"/>
                                <mx:List id="employeeList" width="150" 
dragEnabled="true"
                                        dragEnter="_root.doDragEnter(event, 
'items')"
                                        dragExit="_root.doDragExit(event);"
                                        dragOver="_root.doDragOver(event);"
                                        dragDrop="_root.doDragDrop(event, 
'employeeList', ['items'])" />
                        </mx:Panel>
        </mx:Repeater>
        </mx:Tile>
        

</mx:VBox>





------------------------ 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