Macromedia Flash Server - flash remoting results problem ***newbie question***

This is Interesting: Free IT Magazines  
Home > Archive > Macromedia Flash Server > August 2005 > flash remoting results problem ***newbie question***





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author flash remoting results problem ***newbie question***
Rosenbladt, Oliver

2005-08-04, 5:46 pm

Greetings -
=20
I apologize in advance for the basic-ness of this post...this is my
first complex Flash Remoting project.
=20
I am developing an online rolodex system. The first screen is a
dropdown that lists users, and when you click a users name, a new screen
with their details is displayed. All this works fine, until I get to
the details screen.
=20
My problem is that I am not able to use results that are coming back in
a results set from the remote service...I can trace the results, but I
cannot place the individual results "pieces" into the dynamic text
fields that I created for this purpose. Essentially, I am unclear on
the syntax needed to pass information from the results set back to the
page on which this function runs
=20
the name of this screen is "showDetail"
this screen is called from the previous screen by passing the selected
item from the list to the displayItem function in the showDetail class
=20
here is the code:
=20
class showDetail extends mx.screens.Form
{
private var detail_ws:mx.services.WebService;
private var detail_wsCall:mx.services.PendingCall;
=20
private var
student_first:TextField,student_class:Te
xtField,student_dob:TextField,st
udent_pref_name:TextField,student_corrid
or:TextField;
=20
public function displayItem(item:Object):Void
{
=20
detail_ws=3Dnew mx.services.WebService("
<http://xxxxxxxx/services/rolodex.cfc?wsdl>
http://xxxxxxxx/services/rolodex.cfc?wsdl");=20
=20
detail_wsCall=3Ddetail_ws.getStudent(item.INTERNAL_STUDENT_ID);
var owner:Object=3Dthis;
detail_wsCall.onResult=3Dfunction(result:Array):Void
{ =20
trace(result[0].STUDENT_FIRST);
trace(result[0].STUDENT_LAST);=20
// the traces above display information in the Output window, so data
is getting to this function
TextField.student_first.text=3Dresult[0].STUDENT_FIRST;
// the line above DOES NOT display information in the dynamic
text field named "student_class"
};
}
}
=20
Many thanks in advance for any help!
=20
Oli R.

=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Stefan Richter

2005-08-05, 2:45 am

Maybe try
student_class.text=result[0].STUDENT_FIRST;
or
owner.student_class.text=result[0].STUDENT_FIRST;


TextField.student_first.text does not look right.

Stefan



-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Rosenbladt,
Oliver
Sent: Thursday, August 04, 2005 5:47 PM
To: flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
Subject: [FlashComm] flash remoting results problem ***newbie question***

Greetings -

I apologize in advance for the basic-ness of this post...this is my first
complex Flash Remoting project.

I am developing an online rolodex system. The first screen is a dropdown
that lists users, and when you click a users name, a new screen with their
details is displayed. All this works fine, until I get to the details
screen.

My problem is that I am not able to use results that are coming back in a
results set from the remote service...I can trace the results, but I cannot
place the individual results "pieces" into the dynamic text fields that I
created for this purpose. Essentially, I am unclear on the syntax needed to
pass information from the results set back to the page on which this
function runs

the name of this screen is "showDetail"
this screen is called from the previous screen by passing the selected item
from the list to the displayItem function in the showDetail class

here is the code:

class showDetail extends mx.screens.Form { private var
detail_ws:mx.services.WebService; private var
detail_wsCall:mx.services.PendingCall;

private var
student_first:TextField,student_class:Te
xtField,student_dob:TextField,st
udent_pref_name:TextField,student_corrid
or:TextField;

public function displayItem(item:Object):Void {

detail_ws=new mx.services.WebService("
<http://xxxxxxxx/services/rolodex.cfc?wsdl>
http://xxxxxxxx/services/rolodex.cfc?wsdl");

detail_wsCall=detail_ws.getStudent(item.INTERNAL_STUDENT_ID);
var owner:Object=this;
detail_wsCall.onResult=function(result:Array):Void
{
trace(result[0].STUDENT_FIRST);
trace(result[0].STUDENT_LAST);
// the traces above display information in the Output window, so data is
getting to this function
TextField.student_first.text=result[0].STUDENT_FIRST;
// the line above DOES NOT display information in the dynamic text
field named "student_class"
};
}
}

Many thanks in advance for any help!

Oli R.

=---------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=---------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com