RE: RE. [flexcoders] get ComboBox selected item with RemoteObject

2005-07-18 Thread Tracy Spratt
Here is another example, same solution as Stacy provided.
http://www.cflex.net/showfiledetails.cfm?ObjectID=229
Tracy

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ghislain Simard
Sent: Sunday, July 17, 2005 5:33 PM
To: flexcoders@yahoogroups.com
Subject: Re: RE. [flexcoders] get ComboBox selected item with
RemoteObject

The selection in my ComboBox is saved in a database.  When I want to 
come back to that ComboBox (in an other session), I want to get back 
to the previously saved selected item.


--- In flexcoders@yahoogroups.com, "shahnavaza" <[EMAIL PROTECTED]> wrote:
> Hi
> 
> Use a function to do your selection
> 
>  value="3302" creationComplete="doSelection(event)"/>
> 
> function doSelection( event  : Object ) : Void
> {
>  var comboBoxID = event.target;
> // In my case I always prefer to keep first
> element in Combo Box as PLEASE SELECT label.
> comboBoxID.addItemAt(0,"Please Select", "");
>  comboBoxID.selectedIndex = 0;
> }
> 
> Thanks,
> 
> Shahnavaz
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED]
> On Behalf Of Ghislain Simard
> Sent: Sunday, July 17, 2005 12:41 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] get ComboBox selected item with RemoteObject
> 
> Hi,
> How can we get an item selected in a ComboxBox when it's coming 
from 
> a RemoteObject?
> 
> my code:
> 
> http://www.macromedia.com/2003/mxml";>
> 
> 
> 
>   
> 
>   1
> 
>   
>   
>   
> 
> 
> 
> 
>   
> 
>   Type I
>   3300
> 
> 
>   Type II
>   3301
> 
> 
>   Type III
>   3302
> 
>   
> 
>   
> 
> 
>  value="3302" selectedItem="{???}"/>
> 
> 
> 
> 
> Thanks
> 
> 
> 
> 
> 
> --
> 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 
> Computer software testing 
> Macromedia flex 
> Development 
> 
> Software developer 
>   
> 
> 
> 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. 
> 
> 




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




Re: RE. [flexcoders] get ComboBox selected item with RemoteObject

2005-07-17 Thread Ghislain Simard
The selection in my ComboBox is saved in a database.  When I want to 
come back to that ComboBox (in an other session), I want to get back 
to the previously saved selected item.


--- In flexcoders@yahoogroups.com, "shahnavaza" <[EMAIL PROTECTED]> wrote:
> Hi
> 
> Use a function to do your selection
> 
>  value="3302" creationComplete="doSelection(event)"/>
> 
> function doSelection( event  : Object ) : Void
> {
>  var comboBoxID = event.target;
> // In my case I always prefer to keep first
> element in Combo Box as PLEASE SELECT label.
> comboBoxID.addItemAt(0,"Please Select", "");
>  comboBoxID.selectedIndex = 0;
> }
> 
> Thanks,
> 
> Shahnavaz
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED]
> On Behalf Of Ghislain Simard
> Sent: Sunday, July 17, 2005 12:41 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] get ComboBox selected item with RemoteObject
> 
> Hi,
> How can we get an item selected in a ComboxBox when it's coming 
from 
> a RemoteObject?
> 
> my code:
> 
> http://www.macromedia.com/2003/mxml";>
> 
> 
> 
>   
> 
>   1
> 
>   
>   
>   
> 
> 
> 
> 
>   
> 
>   Type I
>   3300
> 
> 
>   Type II
>   3301
> 
> 
>   Type III
>   3302
> 
>   
> 
>   
> 
> 
>  value="3302" selectedItem="{???}"/>
> 
> 
> 
> 
> Thanks
> 
> 
> 
> 
> 
> --
> 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 
> Computer software testing 
> Macromedia flex 
> Development 
> 
> Software developer 
>   
> 
> 
> 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. 
> 
> 




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





RE. [flexcoders] get ComboBox selected item with RemoteObject

2005-07-17 Thread shahnavaza
Hi

Use a function to do your selection



function doSelection( event  : Object ) : Void
{
 var comboBoxID = event.target;
// In my case I always prefer to keep first
element in Combo Box as PLEASE SELECT label.
comboBoxID.addItemAt(0,"Please Select", "");
 comboBoxID.selectedIndex = 0;
}

Thanks,

Shahnavaz


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Ghislain Simard
Sent: Sunday, July 17, 2005 12:41 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] get ComboBox selected item with RemoteObject

Hi,
How can we get an item selected in a ComboxBox when it's coming from 
a RemoteObject?

my code:

http://www.macromedia.com/2003/mxml";>



  

  1

  
  
  




  

  Type I
  3300


  Type II
  3301


  Type III
  3302

  

  







Thanks





--
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 
Computer software testing 
Macromedia flex 
Development 

Software developer 



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. 







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




RE: [flexcoders] get ComboBox selected item with RemoteObject

2005-07-17 Thread Stacy Young










You could loop thru the dataprovider of
your combo and compare to whatever your current value for that field is…then
set the combos selected index.

HTH,

Stace

 

(not tested)

 

var iniVal:Object;
   

   function resultHandler(result){
  iniVal = result;

  var dp = comboboxId.dataProvider;

for(var i:Number=0; i < dp.length; i++){

  if( dp[i].data == remoteCallResultValueHere ){

    comboboxId.selectedIndex = i;

    break;

  }

}
   }

 









From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ghislain Simard
Sent: Sunday, July 17, 2005 3:41
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] get ComboBox
selected item with RemoteObject



 

Hi,
How can we get an item selected in a ComboxBox
when it's coming from 
a RemoteObject?

my code:

http://www.macromedia.com/2003/mxml">



  
    
 
1
    
  
 

  




  
    
  Type
I    
 
3300
    
    
  Type
II    
 
3301
   
    
    
  Type
III    
 
3302
   
   
   
    
  

  



value="3302"
selectedItem="{???}"/>




Thanks











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



   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.



  











[flexcoders] get ComboBox selected item with RemoteObject

2005-07-17 Thread Ghislain Simard
Hi,
How can we get an item selected in a ComboxBox when it's coming from 
a RemoteObject?

my code:

http://www.macromedia.com/2003/mxml";>



  

  1

  
  





  

  Type I 
  3300


  Type II
  3301
 

  Type III   
  3302
 
  




 
 



Thanks
 




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