[flexcoders] mx:ComboBox

2007-03-26 Thread flexjeremy
Hello helpful list,

I seem to be confusing myself. I'm using ColdFusion to get the data
out of our database. Simple. I got a remote object getting the data.

mx:RemoteObject id=remoteService destination=ColdFusion
source=Cows3.cows showBusyCursor=true/

Now what I want to do is firstly get the data into it. I tried this by
doing the following. 

mx:ComboBox id=ProcessorName
dataProvider={remoteService.getProcessors.lastResult}
/mx:ComboBox

Now I know that it needs to be in an Array. When I dump the data into
a grid. It works fine. i.e. 

mx:DataGrid dataProvider={remoteService.getProcessors.lastResult}
/mx:DataGrid 

All the examples on Adobe's site is shitting me. Cause they are put in
from an Array they manually make. 

Help. Again.

Jeremy 



[flexcoders] Re: mx:ComboBox

2007-03-26 Thread flexjeremy
Boy do I feel like a dork. Excellent. Thank you. One last thing if I
were getting a value out of the database is there a way to say that
item is selected? I know how to do this in ColdFusion, but I'm
thinking that would be totally different in Flex.

SO for example in CF we do it this way.

select name=bob id=bob
  option value=#mybobid# cfif mybobid IS
mybobidfromdbselected/cfif#mybob#/option
/select

In flex we do it..?


*insert blank look from jeremy*


Jeremy


--- In flexcoders@yahoogroups.com, Maury Sword [EMAIL PROTECTED] wrote:

 Jeremy,
 
 You will need to specify a labelField or labelFunction in order for 
 the ComboBox to know what you want to display.
 
 Maury
 
 
 
 --- In flexcoders@yahoogroups.com, flexjeremy flexjeremy@ 
 wrote:
 
  Hello helpful list,
  
  I seem to be confusing myself. I'm using ColdFusion to get the data
  out of our database. Simple. I got a remote object getting the data.
  
  mx:RemoteObject id=remoteService destination=ColdFusion
  source=Cows3.cows showBusyCursor=true/
  
  Now what I want to do is firstly get the data into it. I tried this 
 by
  doing the following. 
  
  mx:ComboBox id=ProcessorName
  dataProvider={remoteService.getProcessors.lastResult}
  /mx:ComboBox
  
  Now I know that it needs to be in an Array. When I dump the data 
 into
  a grid. It works fine. i.e. 
  
  mx:DataGrid 
 dataProvider={remoteService.getProcessors.lastResult}
  /mx:DataGrid 
  
  All the examples on Adobe's site is shitting me. Cause they are put 
 in
  from an Array they manually make. 
  
  Help. Again.
  
  Jeremy
 





[flexcoders] Flex dates

2007-03-20 Thread flexjeremy
Hi guys, 

I am new to flex and have been having a huge learning curve. So be 
gentle. I'm kinda new to REAL OO. But I know CF very well. So with 
that said I'm stuck on dates.

I am trying to format a date coming out of a database so it will 
look pretty. i.e. dd/mm/

I have an mx:datefield id=DateIn 
text=remoteService.qryDrawdown.lastResult[0].DateIn 
formatString=DD/MM//mx:datefield

Now I know that the formatString paramater does that for when you 
choose it but how do you format it coming out of the database. 
Currently its Tue Feb 28 00:00:00 GMT etc etc.

I found the mx:dateFormater tag but haven't been able to get it 
working correctly. 

Any Advise would be great!!

Jeremy



[flexcoders] Changing currentState based on a url

2007-03-10 Thread flexjeremy
Hi guys,

I'm WOAH new to flex. My company is seriously starting to look at it
now. So I have the mind numbing task to work out a few things.

What I'm trying to do is change the currentState based on a URL that I
passthrough using flashvars i.e.

cfoutputflashvars,'RequestType=
#url.RequestType#historyUrl=history.htm%3Flconid=' + lc_id +
'',/cfoutput


Now that works a treat..passing the variables works fine. Where I come
stuck is how to get the currentState to show one thing when the url
comes through or another thing with a different url parameter.

i.e.

 private function initApp():void
 {
var RequestType:String =
Application.application.parameters.RequestType;
  Alert.show(RequestType);
if (RequestType == '1')
{
Alert.show('1');
changemystate();
}
else
{
Alert.show('2');
currentState='showdifferent';
}
   
  }

Am I doing this right...or can someone point me in the right direction
to learn about what I'm trying to do. 

I'm a coldfusion programmer...so all this object orientated stuff is
Wierd dood!.

Jeremy