all groups > macromedia flash flash remoting > february 2005 >
You're in the

macromedia flash flash remoting

group:

DataGlue - Problem with COmboBox


DataGlue - Problem with COmboBox Stephen San Deigo
2/25/2005 11:05:26 PM
macromedia flash flash remoting:
I am trying to populate a combo box using DataGlue and am experiencing
problems. If a loop thru the result set and perform a addItem I, the data is
displayed, just takes some time. I was reading in the Flash Remoting book that
utilizing DataGlue will speed up the process. Unfortunately when I try to use
that, nothing happens. I am confused. Looks simple enough in the book. Can
anyone please shed some light on what I could be doing wrong. Stephen
Method 1: This one works #include 'NetServices.as' #include 'DataGlue.as'
#include '../Includes/url.as' var frServiceName = 'generalRS.generalBean';
var frService = frConnection.getService(frServiceName, this);
frService.getResultSet('usp_PersonnelListingLetter','7'); //retrieve list of
states function getResultSet_Result(result_rs) {
person_cb.addItem('Select Injured Person','None'); for(var
i=0;i<result_rs.getLength();i++) { var person = result_rs.getItemAt(i);
person_cb.addItem(person.Lname+', '+person.Fname+'
'+person.Rate,person.EmployeeId); } } Method 2: Does not work #include
'NetServices.as' #include 'DataGlue.as' #include '../Includes/url.as' var
frServiceName = 'generalRS.generalBean'; var frService =
frConnection.getService(frServiceName, this);
frService.getResultSet('usp_PersonnelListingLetter','7'); //retrieve list of
states function getResultSet_Result(result_rs) {
DataGlue.bindFormatStrings(person_cb, result_rs, '#Lname#', '#EmployeeId#' );
}
Re: DataGlue - Problem with COmboBox JamesDad
2/25/2005 11:41:10 PM
I haven't been able to find an error in your code so far. One suggestion: You
might try rearranging the order of your #include statements, or comment out the
third one. I experienced a situation where, by placing one custom-made .as file
after another, I broke the first one. When I shuffled them, everything worked
fine. Note that in your first code block, you don't invoke any DataGlue
methods, so if the DataGlue actionscript were broken, you wouldn't notice it.
Re: DataGlue - Problem with COmboBox Stephen San Deigo
3/2/2005 10:34:53 PM
Jim, I got a funny feeling that the program is not even loading DataGlue.
I've been playing around and if I comment out the include I get the same
result, nothing. I guess Flash does not throw an error when it you try to use
something that it knows nothing about. It just seems to ignore it. I check
my local harddrive for the DataGlue.as file and found it in 'C:\Program
Files\Macromedia\Flash MX 2004\en\First Run\Classes'. Is that the correct
place? HELP!!!
Re: DataGlue - Problem with COmboBox Stephen San Deigo
3/7/2005 6:28:42 PM
I Still can not get DatGlue to work. Does anyone from Macromedia look at this
forum and do they ever answer it. I've looked at the DatGlue.as and I was
confused. It looks like the function bindFormatStrings calls
getItemAt_FormatString. Now getItemAt_FormatString takes the parameter index,
put index is not being passed. Hence the record is then undifined and nothing
is return. I am confused. Is there any possibility of getting help without
having to pay Macromedia. I bought the product then found that hey, tech
support was additional cost. Could the problem be the fact the I am running
this on Tomcat 5.5?? Any help would be nice. Stephen
AddThis Social Bookmark Button