I used the repeatEnd event to call a function that looped through the
length of the repeater items, and now I can successfully pull down data
for each datagrid's associated user -- woohoo! (I verified this by
looking at the recordsets via ServiceCapture). However, when I attempt
to assign the result set to the datagrid dataprovider (named
dgAssignments, which is correctly displaying as an array of 3 elements
via Chris C's Object Inspector), nothing appears to happen. Even more
confusing, when I dump the RO result to text using ObjectDumper, nothing
displays except a hyphen (-). Without object dumper, I expected the old
[object object] at least, but I get undefined.
I think that once I get this part (getting the ro result assigned to the
DP), I think the rest of it will be pretty simple.
Anyone have any ideas that I can go with?
TIA, Tom
Postscript: Oops, here's my code:
<?xml version="1.0" encoding="utf-8" ?>
<mx:Application width="100%" height="100%"
xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*"
backgroundColor="#3a6ea5" creationComplete="RO_FRS.GetFRSAssignees('');">
<Inspect />
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.data.binding.ObjectDumper;
public function doFault(event:Object):Void
{
alert("Error invoking CFC: " + event.fault.faultcode + ", " +
event.fault.faultstring + ", " +
event.fault.description + ", " +
event.fault.detail);
}
public function getAssignments():Void
{
for (var i = 0; i < rp.dataProvider._items.length; i++)
{
RO_FRS.GetAssignedRequestByUserID(userWID[i].text);
//kludge here just to view result set, I know it's three
records
//because I did top 3 in the RO query
if (i == 0)
{ta0.text = RO_FRS.GetAssignedRequestByUserID.result;}
else if (i == 1)
{ta1.text = RO_FRS.GetAssignedRequestByUserID.result;}
else
{ta2.text = RO_FRS.GetAssignedRequestByUserID.result;}
dgAssignments[i].dataProvider=RO_FRS.GetAssignedRequestByUserID.result;
}
}
]]>
</mx:Script>
<mx:RemoteObject
id="RO_FRS"
endpoint="http://127.0.0.1:8301/flashservices/gateway?x=21"
source="Tom.Remoting.RO_FRS"
fault="doFault(event)" />
<mx:VBox>
<mx:TextArea id="ta0" width="600"/>
<mx:TextArea id="ta1" width="600"/>
<mx:TextArea id="ta2" width="600"/>
</mx:VBox>
<mx:Tile marginBottom="10" borderStyle="inset" verticalGap="15"
id="tileAssignees"
marginLeft="10" backgroundColor="#dddddd" marginTop="10"
marginRight="10"
horizontalGap="10" direction="horizontal" autoLayout="false"
clipContent="false" >
<mx:Repeater id="rp" dataProvider="{RO_FRS.GetFRSAssignees.result}"
repeatEnd="getAssignments();">
<mx:VBox>
<mx:HBox>
<mx:Label text="{rp.currentItem.ATFirstName}
{rp.currentItem.ATLastName}" fontWeight="bold" width="150"
textAlign="center"/>
<mx:Label id="userWID" text="{rp.currentItem.ATUserId}"
fontWeight="bold" width="100" textAlign="center"/>
</mx:HBox>
<mx:DataGrid id="dgAssignments" rowCount="5" width="100%"
editable="false" dataProvider="" >
<mx:columns>
<mx:Array>
<mx:DataGridColumn columnName="Request_ID"
headerText="RID" />
<mx:DataGridColumn
columnName="Status_Description" headerText="Status" />
<mx:DataGridColumn columnName="Requestor_Name"
headerText="Requestee" />
<mx:DataGridColumn
columnName="CategoryDescription" headerText="Cat" />
</mx:Array>
</mx:columns>
</mx:DataGrid>
</mx:VBox>
</mx:Repeater>
</mx:Tile>
</mx:Application>
Tom Sammons wrote:
>Hi all,
>
>Long time viewer, first time caller... [never mind, it's a pittsburgh thing]
>
>What I'm trying to accomplish is to populate a regular datagrid with
>records representing unassigned requests, and then use a repeater to
>display grids of current workload requests for a short list of
>personnel. An administrator would drag and drop unassigned requests
>into the workload grids, and be able to drag/drop between workload grids
>as well for the purpose of balancing/spreading personnel work around.
>(Eventually, I want to be able to use shared objects to automatically
>update at the client level as well to improve the collaboration, but
>that's a different effort.)
>
>I've been unable to find a suitable example or solution that would
>demonstrate how one would set the dataProvider for datagrids generated
>by a Repeater. Obviously, if I bind the provider during Repeater
>execution it will populate all the grids with the last remote object
>call. (I'm not at all interested in using XML, although even that would
>give me a lead.) From a performance aspect, I'm not positive that the
>repeater may not be the best way to go -- although Tracy posted
>something that says otherwise in 18378 -- but the workload grids will
>generally only be between 3 and 6 in count, and the repeater seems to
>handle that quite well from what I've seen so far, plus takes care of
>all the nice formatting. Just so you know, F2 isn't an option right now.
>
>I'd really appreciate it if someone could provide an example of how I
>can populate the repeater grids with different remote object calls, and
>how I would use the event.target.getRepeaterItem during the drag
>function (since I'm not sure how to use that to reference a specific
>datagrid id in the repeater array --- did I say that right?). I think
>once I have the former, I could figure out how to get all the other
>information I need. I already know how to pass entire datagrid
>structures to ROs for updates, so I just need a friendly jumpstart to
>get my head around this Repeater stuff.
>
>Any help or pointers would be greatly appreciated, and I'll post the
>working code for others who might be interested as well.
>
>Tom
>
>
>
>--
>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
>
>
>
>
>
>
>
>
>
--
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.

