RE: [flexcoders] HTTPService and dynamic url

2005-04-28 Thread Jeff Beeman










Hi, all, I’m new to the list and to
Flex, but a long-time Flash-er.  I’ve been lurking a couple of days
and finally noticed a question I might actually be able to help out on!

 

I think if you bind the url attribute to
an object’s property, instead of a function, you may have more
success.  At this point, it doesn’t know when to fire the
getLanguage() function.  If it is bound to an object’s property,
which you could update on button presses, etc., it would be able to
“watch” that property and call the service when it changes. 
I’m fairly new to Flex, so I won’t guarantee it’ll work, but
that method works with other objects (data grids, charts, etc.)

 

Tracy’s solution should work too (although, I’ve never done
it myself), and you’ll have to set the property on an event, i.e.:

 



 

…

 

function loadXML() {

   // …

   // set your url string here

   // …

   my_service.url = "">

}

 



 

/**
* Jeff Beeman
**/











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt
Sent: Thursday, April 28, 2005
10:05 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
HTTPService and dynamic url



 

Have you tried setting it programmatically
instead of binding?

Tracy

 









From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of david_gal-reyniez
Sent: Thursday, April 28, 2005
12:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] HTTPService
and dynamic url



 



Hello everyone!





 





My problem is the following:





I try to affect dynamically the url of my HTTPService component.
But even if the value of the url that I generate is good, the url property of
my HTTPService is not affected.





I'm interested by any kind of suggestions. Thanks for your
help!





 





Special thanks to Abdul for the link he mentioned concerning
the multi-language feature and for Manish for his article...





 







 











The function which initialize my HTTPService call





 





http://www.macromedia.com/2003/mxml" initialize="initAppli()">





 





public function initAppli() {
    srvLocaleService.send();






}***







Script defining the HTTService in my Application





 





It works correctly







 { srvLocaleService.result.strings }






 





But this one not







    { srvLocaleService.result.strings }






 











Script defining the language I desired





 





public function getLanguage():String {
    var item:Object = accUSA.cbLstLanguages.selectedItem; // The
selected language come from one ComboBox
    var itemLabel:String = item.toString();
    language = "xml/lg_"+itemLabel+".xml";
    return language;
  }





 





 





***





The xml I call to define the button's label I want





 







 find






 





 





***





The code I use to affect the label of the concerned button





 











 





Bye





David



*


Coface facilite les echanges entre
les entreprises partout dans le monde. Pour cela, elle offre a toutes les
entreprises des solutions pour gerer, financer et proteger leur poste client,
en leur permettant d'externaliser tout ou partie de la gestion et des risques
lies a leurs relations commerciales. Coface est notee AA par Fitch Ratings et
Aa3 par Moody's. 

Pour en savoir plus,
http://www.coface.fr 

Coface facilitates
business-to-business commerce worldwide. It offers all size companies an array
of solutions to manage, finance, and protect their accounts receivables
affording them the option of fully or partly outsourcing trade relationship
management and attendant risks. Coface is rated AA by Fitch ratings and Aa3 by
Moody's. 

More about Coface,
http://www.coface.com 

WARNING : 

- Soyez conscient que notre systeme
Anti-Spam peut parfois rejeter des messages, soit parce que certains mots et
types de fichiers ne sont pas acceptes, ou bien parce que le mail n'a pas ete
identifie correctement. 

- Be aware that from time to time our
Anti-Spam system may reject mails either because some words and types of files
are not allowed or because mails are misidentified. 

*


 











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 the Yahoo! Terms of Service.












RE: [flexcoders] HTTPService and dynamic url

2005-04-28 Thread Tracy Spratt










Have you tried setting it programmatically
instead of binding?

Tracy

 









From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of david_gal-reyniez
Sent: Thursday, April 28, 2005
12:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] HTTPService
and dynamic url



 



Hello everyone!





 





My problem is the following:





I try to affect dynamically the url of my HTTPService
component. But even if the value of the url that I generate is good, the url
property of my HTTPService is not affected.





I'm interested by any kind of suggestions. Thanks for your
help!





 





Special thanks to Abdul for the link he mentioned concerning
the multi-language feature and for Manish for his article...





 







 











The function which initialize my HTTPService call





 





http://www.macromedia.com/2003/mxml" initialize="initAppli()">





 





public function initAppli() {
    srvLocaleService.send();






}***







Script defining the HTTService in my Application





 





It works correctly







 { srvLocaleService.result.strings }






 





But this one not







    { srvLocaleService.result.strings }






 











Script defining the language I desired





 





public function getLanguage():String {
    var item:Object = accUSA.cbLstLanguages.selectedItem; // The
selected language come from one ComboBox
    var itemLabel:String = item.toString();
    language = "xml/lg_"+itemLabel+".xml";
    return language;
  }





 





 





***





The xml I call to define the button's label I want





 







 find






 





 





***





The code I use to affect the label of the concerned button





 











 





Bye





David



*


Coface facilite les echanges entre
les entreprises partout dans le monde. Pour cela, elle offre a toutes les
entreprises des solutions pour gerer, financer et proteger leur poste client,
en leur permettant d'externaliser tout ou partie de la gestion et des risques
lies a leurs relations commerciales. Coface est notee AA par Fitch Ratings et
Aa3 par Moody's. 

Pour en savoir plus,
http://www.coface.fr 

Coface facilitates business-to-business
commerce worldwide. It offers all size companies an array of solutions to
manage, finance, and protect their accounts receivables affording them the
option of fully or partly outsourcing trade relationship management and
attendant risks. Coface is rated AA by Fitch ratings and Aa3 by Moody's. 

More about Coface,
http://www.coface.com 

WARNING : 

- Soyez conscient que notre systeme
Anti-Spam peut parfois rejeter des messages, soit parce que certains mots et
types de fichiers ne sont pas acceptes, ou bien parce que le mail n'a pas ete
identifie correctement. 

- Be aware that from time to time our
Anti-Spam system may reject mails either because some words and types of files
are not allowed or because mails are misidentified. 

*


 










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 the Yahoo! Terms of Service.












[flexcoders] HTTPService and dynamic url

2005-04-28 Thread david_gal-reyniez





Hello 
everyone!
 
My problem is the 
following:
I try to affect 
dynamically the url of my HTTPService component. But even if the value of the 
url that I generate is good, the url property of my HTTPService is not 
affected.
I'm interested by 
any kind of suggestions. Thanks for your help!
 
Special thanks to 
Abdul for the link he mentioned concerning the multi-language feature and for 
Manish for his article...
 

 

The function which 
initialize my HTTPService call
 
http://www.macromedia.com/2003/mxml" initialize="initAppli()">
 
public function 
initAppli() {    srvLocaleService.send();
}***
Script defining the 
HTTService in my Application
 
It works 
correctly
 { srvLocaleService.result.strings 
}
 
But this one 
not
    { srvLocaleService.result.strings 
}
 

Script defining the 
language I desired
 
public function 
getLanguage():String {    var item:Object = 
accUSA.cbLstLanguages.selectedItem; // The selected language come 
from one ComboBox    var itemLabel:String = 
item.toString();    language = 
"xml/lg_"+itemLabel+".xml";    return 
language;  }
 
 
***
The xml I call to 
define the button's label I want
 
 find
 
 
***
The code I use to 
affect the label of the concerned button
 

 
Bye
David
* 

Coface facilite les echanges entre les entreprises partout dans le monde. Pour cela, elle offre a toutes les entreprises des solutions pour gerer, financer et proteger leur poste client, en leur permettant d'externaliser tout ou partie de la gestion et des risques lies a leurs relations commerciales. Coface est notee AA par Fitch Ratings et Aa3 par Moody's. 

Pour en savoir plus, http://www.coface.fr 

 

Coface facilitates business-to-business commerce worldwide. It offers all size companies an array of solutions to manage, finance, and protect their accounts receivables affording them the option of fully or partly outsourcing trade relationship management and attendant risks. Coface is rated AA by Fitch ratings and Aa3 by Moody's. 

More about Coface, http://www.coface.com 

 

WARNING :  

- Soyez conscient que notre systeme Anti-Spam peut parfois rejeter des messages, soit parce que certains mots et types de fichiers ne sont pas acceptes, ou bien parce que le mail n'a pas ete identifie correctement. 

- Be aware that from time to time our Anti-Spam system may reject mails either because some words and types of files are not allowed or because mails are misidentified.  

*  







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 the Yahoo! Terms of Service.