Hi,
 
 
<mx:ComboBox id="name" labelField="fullName">
      <mx:dataProvider>
       <mx:Array>
        <mx:Object>{listofNames}</mx:Object>
       </mx:Array>
      </mx:dataProvider>
 </mx:ComboBox>
labelField="fullName" is value to be display in combo box.
 
This listofNames is value returned by java class as below.
 
 
<mx:RemoteObject id="abc"  named="userNameService">
      <mx:method name="getAllNames" result="listofNames=abc.getAllNames.result" />
 </mx:RemoteObject>.
 
 
Sandip
 
 
 

hitch_nj <[EMAIL PROTECTED]> wrote:
Sandip,
Thanks a lot for the reply, that helped. My question is how do I
populate the combobox with the values from a value object.

for eg: (A.java)
public class A
{
  private List list;
  private Vector vector;
 
  public List setList()
  {
   this.list = list
  }
  public List getList()
  {
   return list;
  }
  ...
}

Now this is the class that is getting returned. I need to iterate
through the list which has some other value objects with different
values. These values need to be displayed.


Thanks
S





--- In [email protected], Sandip Patil <[EMAIL PROTECTED]>
wrote:
>
> Hi,
>   
>   try this
>   
>   
>      <mx:Script>
>           var data= [ {label:"A", data:A}, {label:"B", data:B}];
>           var selectedItem:Object;
>       </mx:Script>
>   
>   
>       <mx:HBox >
>           <mx:ComboBox dataProvider="{data}"
change="selectedItem=event.target.selectedItem"/>
>           <mx:VBox >
>             <mx:Label text="{selectedItem.label}"/>
>             <mx:Label text="{selectedItem.data}"/>
>         </mx:VBox>
>       </mx:HBox>
>  
> sarvesh610 <[EMAIL PROTECTED]> wrote:
>   Hi,
> I am new to Flex, have been a J2EE person for a longtime. I have
> developed an application which queries the database and returns me a
> value object which has a list and vector. Now I need to use Flex as a
> user interface. I have called the class using the remote-object, but
> then how do I use the List and the Vector to di


splay.
> Also I am a bit confused about the <mx:ComboBox>, how can I use the
> dataprovider to use my value object to display the companyDesc as the
> label and data as the ric if I am using the <mx:Object>
>
> Thanks
> S
>
>
>
>
>
> --
> 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.
>
>    
> ---------------------------------
>  
>
>
>
>                  
> ---------------------------------
> Sneak preview the  all-new Yahoo.com. It's not radically different.
Just radically better.
>







How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.

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




Reply via email to