[flexcoders] ComboBox and Switching State
I posted this last week and never got a response, so here it is again. If I can get anyone to agree with my hypothesis, I'll post it as a bug in the Flex Bug Database. In a nutshell, the issue is this ... In Flex 2 if you initialized or set a ComboBox in state ONE, then switched to state TWO (without the ComboBox), when returning to state ONE the ComboBox would have the same data values. In Flex 3, it seems that the ComboBox gets reset either when entering state TWO or returning to state ONE. Here is a small test app that verifies this (or at least I think it does). Click the Initialize button first to set up the ComboBox, then click the Switch button to switch to state TWO and show the ComboBox. You'll see it no longer has it's value. While viewing the ComboBox, choose a different value and the switch back to state ONE then back to state TWO. The value gets lost. Here's the test app: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:states mx:State name=show mx:AddChild position=after relativeTo={b_show} mx:ComboBox id=cb_freight dataProvider={['Gordon','Alex']} editable=true / /mx:AddChild /mx:State /mx:states mx:Script ![CDATA[ private function switchStates():void{ if(currentState == 'show') currentState=''; else currentState='show'; } private function initIt():void{ currentState='show'; cb_freight.selectedIndex = -1; cb_freight.text=This is a test; currentState=''; } ]] /mx:Script mx:VBox mx:Button id=b_init label=Initialize click=initIt() / mx:Button id=b_show label=Switch click=switchStates() / /mx:VBox /mx:Application
[flexcoders] Flex 3 ComboBox and Editable property
Hi, I'm attempting to migrate from Flex2 to 3. One issue I'm have is with the ComboBox. In particular, with the Editable property set true. Previously, if I wanted to set an editable combobox to display a value OTHER than one of the values in the dataProvider (an ArrayCollection of Strings), I just set the 'text' property to some string. In Flex3, this does not seem to have any effect. I even added setting the selectedIndex to -1, first but still no change. The desired text value does not show up, just the 1st element of the dataProvider. cb_freight.selectedIndex = -1; cb_freight.text = This is a test; Anyone else found this the case?
[flexcoders] MessageBrokerServlet unavailable
I have upgraded to LCDS 2.5 and FlexBuilder 2.0.1 Hotfix 2 (this was from FDS and Hotfix 1). I am having some real difficulty getting the MessageBroker to respond. I have checked the logs to see the the MessageBroker seems to startup without any issues. However, when I try to access it via (webapp)/messagebroker/amf I get an error the the MessageBrokerServlet is unavailable. I have gone through all the configuration files to simplify as much as possible and checked them with the config files that come with LCDS for variances. They all seem to be in sync. There are no messages in the logs (I have DEBUG turned on) when I try to access the messagebroker. I find that surprising. Should there be even if it fails?? Anyway, I all out of ideas on how to get this working. I would appreciate any suggestions from those of you who might have had any similar experiences. I am posting part of the startup log below. [Flex] 12/27/2007 11:38:45.500 [INFO] [Configuration] Starting Adobe LiveCycle Data Services 2 Express [Flex] 12/27/2007 11:38:45.500 [INFO] [Configuration] Adobe Flex Data Services Build: 166921 [Flex] 12/27/2007 11:38:45.578 [INFO] [Configuration] Endpoint my-http created with security: None at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/http [Flex] 12/27/2007 11:38:45.578 [INFO] [Configuration] Endpoint ms-rtmp created with security: None at URL: rtmp://{server.name}:2035 [Flex] 12/27/2007 11:38:45.594 [INFO] [Configuration] Endpoint ms-amf created with security: None at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/amf [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.MessageBroker] MessageBroker with id '__default__' is starting. [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Configuration] MessageBroker id: __default__ classLoader is: the MessageBroker's class loader and the context class loader (classLoader hashCode: 6151022 (parent hashCode: 11085148 (parent hashCode: 25142878 (parent system))) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Service] Service with id 'authentication-service' is starting. [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Service] Service with id 'authentication-service' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Service] Service with id 'remoting-service' is starting. [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'inventoryService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'vendorService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'productService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'purchaseOrderService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'adminService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'userService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'loginService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'startupService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'queryService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'accountsService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'shipmentService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'buyoutProductService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'changeService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'productInventoryService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'roleService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'orderService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'customerService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.672 [DEBUG] [Startup.Destination] Destination with id 'reportService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.687 [DEBUG] [Startup.Destination] Destination with id 'queueService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.687 [DEBUG] [Startup.Destination] Destination with id 'quickbooksService' is ready (startup time: '0' ms) [Flex] 12/27/2007 11:38:45.687 [DEBUG] [Startup.Service] Service
[flexcoders] Datagrid tabbing with itemEditor
The scenario is there is a custom editor in say, column 2 of 4 in a DG and I need to a itemEndEdit event handler to extract data. In the handler I use the preventDefault() to take the default editor out of the picture and use destroyItemEditor() to remove the custom editor. This works OK. The problem I am having is that it also stops the normal tabbing to the next column. Do I have to implement my own tabbing scheme too or is there some other way to allow the DG to continue to handle tabbing? This is a thorny issue for me as I have many DGs that are in this situation. If anyone has solved the problem, I'd sure appreciate some advice. Thanks.
[flexcoders] Re: Datagrid tabbing with itemEditor
OK, thanks for the advice! --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Unfortunately, there's no clean way. I would watch the keyFocusChange event and remember what it's shiftKey was. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike_Robinson_98 Sent: Friday, October 19, 2007 3:57 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Datagrid tabbing with itemEditor Thanks, Alex. That was a much simpler solution than I was attempting with loseFocus handlers (which were not working). I'll press my luck and ask if you have an equally simple way to tell if the user did a TAB or SHIFT-TAB to end the edit session, in order to tell which set which column to go to next? The DataGridEvent does not seem to carry that info. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: set editedItemPosition to where you want to go. We discontinue tabbing in case you want to set it back on the edited cell if the data is invalid. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Mike_Robinson_98 Sent: Friday, October 19, 2007 2:09 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Datagrid tabbing with itemEditor The scenario is there is a custom editor in say, column 2 of 4 in a DG and I need to a itemEndEdit event handler to extract data. In the handler I use the preventDefault() to take the default editor out of the picture and use destroyItemEditor() to remove the custom editor. This works OK. The problem I am having is that it also stops the normal tabbing to the next column. Do I have to implement my own tabbing scheme too or is there some other way to allow the DG to continue to handle tabbing? This is a thorny issue for me as I have many DGs that are in this situation. If anyone has solved the problem, I'd sure appreciate some advice. Thanks.
[flexcoders] Re: Datagrid tabbing with itemEditor
Thanks, Alex. That was a much simpler solution than I was attempting with loseFocus handlers (which were not working). I'll press my luck and ask if you have an equally simple way to tell if the user did a TAB or SHIFT-TAB to end the edit session, in order to tell which set which column to go to next? The DataGridEvent does not seem to carry that info. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: set editedItemPosition to where you want to go. We discontinue tabbing in case you want to set it back on the edited cell if the data is invalid. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike_Robinson_98 Sent: Friday, October 19, 2007 2:09 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Datagrid tabbing with itemEditor The scenario is there is a custom editor in say, column 2 of 4 in a DG and I need to a itemEndEdit event handler to extract data. In the handler I use the preventDefault() to take the default editor out of the picture and use destroyItemEditor() to remove the custom editor. This works OK. The problem I am having is that it also stops the normal tabbing to the next column. Do I have to implement my own tabbing scheme too or is there some other way to allow the DG to continue to handle tabbing? This is a thorny issue for me as I have many DGs that are in this situation. If anyone has solved the problem, I'd sure appreciate some advice. Thanks.
[flexcoders] Re: Keyboarding up/down editable columns in Datagrid
That had some interesting results. In the KeyDown event handler I set editedItemPosition as per your suggestion and I commented out all of the code in my endEdit handler (but did not removed the handler from the datagrid). To my delight, I could arrow down the column with no issues. Then I uncommented my endEdit code and the new cell would never gain focus (or gained it and lost it immediately, not sure which). A second test was to re-comment all the endEdit code except for the event.preventDefault at the beginning and DataGrid(event.currentTarget).destroyItemEditor at the end. The same results. That is, the new cell would not gain focus. This brought the realization that I was using the preventDefault method incorrectly. It is this call that disallows focus to move to the new cell. Once I commented it out and restored all the other code of the endEdit handler, it worked like a charm. Thanks for taking the time to suggest another way to look at things. I appreciate it a lot. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Maybe. If you force too many updates on the DG, it might close out the edit session. It might be worth trying it w/o your endEdit logic to see if that is causing the focus issue. If on some keystroke you simply set editedItemPosition, the code says that it will dispatch ITEM_EDIT_END before trying to set the editor to the new place. -Alex From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike_Robinson_98 Sent: Tuesday, May 08, 2007 9:43 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Keyboarding up/down editable columns in Datagrid I need to handle the endEdit event to do some data massaging on the input as well as update other values based on that input value. Besides, it seems to me that the end result would be the same whether I handled endEdit or the DG handled endEdit, that is losing of focus in the new cell. Yes? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: What are you using the endEdit for? You should just let the DG call it when you change editedItemPosition. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Mike_Robinson_98 Sent: Monday, May 07, 2007 9:02 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Keyboarding up/down editable columns in Datagrid --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Mike_Robinson_98 mike_robinson_98@ wrote: --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Manish Jethani manish.jethani@ wrote: On 5/8/07, Mike_Robinson_98 mike_robinson_98@ wrote: Has anyone come up with a good way to let a user move up/down in an editable column of a datagrid using the keyboard? These columns use a TextInput as the itemEditor. Right now I use a handler for the keyFocusChangeEvent on the datagrid to handle TAB and Shift-TAB keys to move horizontally through the rows. However, moving up/down in the columns is more difficult because the editor's TextInput captures the Return key and the TextFieldAutomationHelper class captures all the other interesting keystrokes (navigation keys like UP and DOWN arrows) and it seems the DataGrid is only interested in the TAB key when it handles focusChange events. This simple test worked for me: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml xmlns=* mx:DataGrid id=dg editable=true keyDown=handleKeyDown() mx:dataProvider mx:Object name=foo value=1 / mx:Object name=bar value=2 / /mx:dataProvider /mx:DataGrid mx:Script private function handleKeyDown():void { var v:Object = dg.editedItemPosition; v.rowIndex++; dg.editedItemPosition = v; } /mx:Script /mx:Application Use the down arrow key to move from foo to bar. Thanks a lot for the reply. That is a nice, simple solution. I have one more slight problem along this line maybe you could shed some light on. In my app, I use the endEdit function for the datagrid. Unfortunately, although I move the focus to the column in the new row, the endEdit code gets call after this focus occurs and consequently focus is lost. I have tried 'callLater' for the focus method but have the same result. Even, setup a timer to delay the focus for 200 ms. Still endedit come along and focus is lost. Have you or any other reader run into this issue
[flexcoders] Re: Keyboarding up/down editable columns in Datagrid
I need to handle the endEdit event to do some data massaging on the input as well as update other values based on that input value. Besides, it seems to me that the end result would be the same whether I handled endEdit or the DG handled endEdit, that is losing of focus in the new cell. Yes? --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: What are you using the endEdit for? You should just let the DG call it when you change editedItemPosition. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike_Robinson_98 Sent: Monday, May 07, 2007 9:02 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Keyboarding up/down editable columns in Datagrid --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Mike_Robinson_98 mike_robinson_98@ wrote: --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Manish Jethani manish.jethani@ wrote: On 5/8/07, Mike_Robinson_98 mike_robinson_98@ wrote: Has anyone come up with a good way to let a user move up/down in an editable column of a datagrid using the keyboard? These columns use a TextInput as the itemEditor. Right now I use a handler for the keyFocusChangeEvent on the datagrid to handle TAB and Shift-TAB keys to move horizontally through the rows. However, moving up/down in the columns is more difficult because the editor's TextInput captures the Return key and the TextFieldAutomationHelper class captures all the other interesting keystrokes (navigation keys like UP and DOWN arrows) and it seems the DataGrid is only interested in the TAB key when it handles focusChange events. This simple test worked for me: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml xmlns=* mx:DataGrid id=dg editable=true keyDown=handleKeyDown() mx:dataProvider mx:Object name=foo value=1 / mx:Object name=bar value=2 / /mx:dataProvider /mx:DataGrid mx:Script private function handleKeyDown():void { var v:Object = dg.editedItemPosition; v.rowIndex++; dg.editedItemPosition = v; } /mx:Script /mx:Application Use the down arrow key to move from foo to bar. Thanks a lot for the reply. That is a nice, simple solution. I have one more slight problem along this line maybe you could shed some light on. In my app, I use the endEdit function for the datagrid. Unfortunately, although I move the focus to the column in the new row, the endEdit code gets call after this focus occurs and consequently focus is lost. I have tried 'callLater' for the focus method but have the same result. Even, setup a timer to delay the focus for 200 ms. Still endedit come along and focus is lost. Have you or any other reader run into this issue? Another note - actually, the setting of the focus is what is causing the endedit event for the previous cell. Seems like a catch-22. Setting the focus caused the endevent for the previous cell which then causes the current cell to lose focus. Again, I am probably making things too complex.
[flexcoders] Re: Keyboarding up/down editable columns in Datagrid
That's worth a try. It will probably tonight or tomorrow b4 I can get to it but I'll post the results here. Thanks for the info. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Maybe. If you force too many updates on the DG, it might close out the edit session. It might be worth trying it w/o your endEdit logic to see if that is causing the focus issue. If on some keystroke you simply set editedItemPosition, the code says that it will dispatch ITEM_EDIT_END before trying to set the editor to the new place. -Alex From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike_Robinson_98 Sent: Tuesday, May 08, 2007 9:43 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Keyboarding up/down editable columns in Datagrid I need to handle the endEdit event to do some data massaging on the input as well as update other values based on that input value. Besides, it seems to me that the end result would be the same whether I handled endEdit or the DG handled endEdit, that is losing of focus in the new cell. Yes? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: What are you using the endEdit for? You should just let the DG call it when you change editedItemPosition. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Mike_Robinson_98 Sent: Monday, May 07, 2007 9:02 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Keyboarding up/down editable columns in Datagrid --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Mike_Robinson_98 mike_robinson_98@ wrote: --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Manish Jethani manish.jethani@ wrote: On 5/8/07, Mike_Robinson_98 mike_robinson_98@ wrote: Has anyone come up with a good way to let a user move up/down in an editable column of a datagrid using the keyboard? These columns use a TextInput as the itemEditor. Right now I use a handler for the keyFocusChangeEvent on the datagrid to handle TAB and Shift-TAB keys to move horizontally through the rows. However, moving up/down in the columns is more difficult because the editor's TextInput captures the Return key and the TextFieldAutomationHelper class captures all the other interesting keystrokes (navigation keys like UP and DOWN arrows) and it seems the DataGrid is only interested in the TAB key when it handles focusChange events. This simple test worked for me: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml xmlns=* mx:DataGrid id=dg editable=true keyDown=handleKeyDown() mx:dataProvider mx:Object name=foo value=1 / mx:Object name=bar value=2 / /mx:dataProvider /mx:DataGrid mx:Script private function handleKeyDown():void { var v:Object = dg.editedItemPosition; v.rowIndex++; dg.editedItemPosition = v; } /mx:Script /mx:Application Use the down arrow key to move from foo to bar. Thanks a lot for the reply. That is a nice, simple solution. I have one more slight problem along this line maybe you could shed some light on. In my app, I use the endEdit function for the datagrid. Unfortunately, although I move the focus to the column in the new row, the endEdit code gets call after this focus occurs and consequently focus is lost. I have tried 'callLater' for the focus method but have the same result. Even, setup a timer to delay the focus for 200 ms. Still endedit come along and focus is lost. Have you or any other reader run into this issue? Another note - actually, the setting of the focus is what is causing the endedit event for the previous cell. Seems like a catch-22. Setting the focus caused the endevent for the previous cell which then causes the current cell to lose focus. Again, I am probably making things too complex.
[flexcoders] Keyboarding up/down editable columns in Datagrid
Has anyone come up with a good way to let a user move up/down in an editable column of a datagrid using the keyboard? These columns use a TextInput as the itemEditor. Right now I use a handler for the keyFocusChangeEvent on the datagrid to handle TAB and Shift-TAB keys to move horizontally through the rows. However, moving up/down in the columns is more difficult because the editor's TextInput captures the Return key and the TextFieldAutomationHelper class captures all the other interesting keystrokes (navigation keys like UP and DOWN arrows) and it seems the DataGrid is only interested in the TAB key when it handles focusChange events. I'm not sure how a focusEvent.KEY_FOCUS_CHANGE is dispatched as this seems to occur somewhere in the flash code which is unaccessible. I am probably making this more complex than it needs to be. Any ideas?
[flexcoders] Re: Keyboarding up/down editable columns in Datagrid
--- In flexcoders@yahoogroups.com, Manish Jethani [EMAIL PROTECTED] wrote: On 5/8/07, Mike_Robinson_98 [EMAIL PROTECTED] wrote: Has anyone come up with a good way to let a user move up/down in an editable column of a datagrid using the keyboard? These columns use a TextInput as the itemEditor. Right now I use a handler for the keyFocusChangeEvent on the datagrid to handle TAB and Shift-TAB keys to move horizontally through the rows. However, moving up/down in the columns is more difficult because the editor's TextInput captures the Return key and the TextFieldAutomationHelper class captures all the other interesting keystrokes (navigation keys like UP and DOWN arrows) and it seems the DataGrid is only interested in the TAB key when it handles focusChange events. This simple test worked for me: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns=* mx:DataGrid id=dg editable=true keyDown=handleKeyDown() mx:dataProvider mx:Object name=foo value=1 / mx:Object name=bar value=2 / /mx:dataProvider /mx:DataGrid mx:Script private function handleKeyDown():void { var v:Object = dg.editedItemPosition; v.rowIndex++; dg.editedItemPosition = v; } /mx:Script /mx:Application Use the down arrow key to move from foo to bar. Thanks a lot for the reply. That is a nice, simple solution. I have one more slight problem along this line maybe you could shed some light on. In my app, I use the endEdit function for the datagrid. Unfortunately, although I move the focus to the column in the new row, the endEdit code gets call after this focus occurs and consequently focus is lost. I have tried 'callLater' for the focus method but have the same result. Even, setup a timer to delay the focus for 200 ms. Still endedit come along and focus is lost. Have you or any other reader run into this issue?
[flexcoders] Re: Keyboarding up/down editable columns in Datagrid
--- In flexcoders@yahoogroups.com, Mike_Robinson_98 [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, Manish Jethani manish.jethani@ wrote: On 5/8/07, Mike_Robinson_98 mike_robinson_98@ wrote: Has anyone come up with a good way to let a user move up/down in an editable column of a datagrid using the keyboard? These columns use a TextInput as the itemEditor. Right now I use a handler for the keyFocusChangeEvent on the datagrid to handle TAB and Shift-TAB keys to move horizontally through the rows. However, moving up/down in the columns is more difficult because the editor's TextInput captures the Return key and the TextFieldAutomationHelper class captures all the other interesting keystrokes (navigation keys like UP and DOWN arrows) and it seems the DataGrid is only interested in the TAB key when it handles focusChange events. This simple test worked for me: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns=* mx:DataGrid id=dg editable=true keyDown=handleKeyDown() mx:dataProvider mx:Object name=foo value=1 / mx:Object name=bar value=2 / /mx:dataProvider /mx:DataGrid mx:Script private function handleKeyDown():void { var v:Object = dg.editedItemPosition; v.rowIndex++; dg.editedItemPosition = v; } /mx:Script /mx:Application Use the down arrow key to move from foo to bar. Thanks a lot for the reply. That is a nice, simple solution. I have one more slight problem along this line maybe you could shed some light on. In my app, I use the endEdit function for the datagrid. Unfortunately, although I move the focus to the column in the new row, the endEdit code gets call after this focus occurs and consequently focus is lost. I have tried 'callLater' for the focus method but have the same result. Even, setup a timer to delay the focus for 200 ms. Still endedit come along and focus is lost. Have you or any other reader run into this issue? Another note - actually, the setting of the focus is what is causing the endedit event for the previous cell. Seems like a catch-22. Setting the focus caused the endevent for the previous cell which then causes the current cell to lose focus. Again, I am probably making things too complex.
[flexcoders] Re: Datagrid Tabbing breaks when itemrenderer is added to one cell
--- In flexcoders@yahoogroups.com, jfournet [EMAIL PROTECTED] wrote: When I add a custom itemrenderer to a cell of my datagrid, the tabbing order of my screen is broken, i.e., the cell with the itemrenderer is skipped over in the tab order. Any ideas on how to fix this? What you need to do in this situation is handle your own tabbing through the DataGrid. This can be accomplished by adding a 'keyFocusChange' handler to the grid. The handler will have to listen for tab character. If it finds there was one, then depending on the current row and column, it moves the focus to the next cell desired. In this way you can skip cells you do not want to have focused. Here is a sample piece of code I used to manage tabbing in a grid that has a renderer and editor in it. // handler for request to move focus to next column when using tab key in the DataGrid private function handleKeyFocusChange(event:FocusEvent):void{ // make sure it is a focus change envent and the tab character if(event.type == FocusEvent.KEY_FOCUS_CHANGE event.keyCode == 9){ var eip:Object; // used to set the focus at a row and column if((DataGrid(event.currentTarget)).editedItemPosition != null){ var colPosition : int = (DataGrid(event.currentTarget)).editedItemPosition.columnIndex; var rowPosition : int = (DataGrid(event.currentTarget)).editedItemPosition.rowIndex; if(rowPosition = 0){ // going backwards off the datagrid if(rowPosition == 0 colPosition ==0 event.shiftKey == true) cb_manufacturer.setFocus(); // somewhere on the page // going forward off the datagrid else if(rowPosition == (receiptItems.length -1) colPosition == 2 event.shiftKey == false) ti_heat_number.setFocus(); // somewhere else on the page // going forward/backward in grid else{ switch(colPosition){ case COLUMN_QUANTITY: // QUANTITY colPosition = event.shiftKey ? COLUMN_LOCATION : COLUMN_LENGTH; rowPosition = event.shiftKey ? rowPosition - 1 : rowPosition; break; case COLUMN_LENGTH: // LENGTH colPosition = event.shiftKey ? COLUMN_QUANTITY : COLUMN_LOCATION; break; case COLUMN_LOCATION: // PACKAGE colPosition = event.shiftKey ? COLUMN_LENGTH : COLUMN_QUANTITY; rowPosition = event.shiftKey ? rowPosition : rowPosition + 1; break; } // end switch eip = {columnIndex:colPosition, rowIndex:rowPosition}; // focusColumn method sets the focus on the proper column callLater(focusColumn,[eip]); } // end else } // end if }// end if } } ### example of focusColumn method private function focusColumn(eip:Object):void{ // dg_receivedLength is my DataGrid id dg_receivedLength.editedItemPosition=eip; }
[flexcoders] 2nd datagrid - no headers, wrong size
I've been spending a lot of time trying to overcome this issue without any success. Hopefully someone out there has a suggestion. I have datagrid within a vbox in a component. The grid takes up as much space as is available (height='100%'). There is another state which does the following: 1) reduces the height of the 1st datagrid to a fixed value (344) 2) adds a 2nd datagrid (height='124') into the vbox as the lastchild. The problem is when the state gets switched and the 2nd datagrid gets added.. 1) the headers are missing 2) the requested size is not honored When looking at the state in design mode, the headers are present and the size of the 2nd grid is correct. Has anyone run into issues similar to this? Any resolutions? The code is rather long, but I will post it if anyone is interested. Thanks
[flexcoders] Re: 2nd datagrid - no headers, wrong size
--- In flexcoders@yahoogroups.com, Mike_Robinson_98 [EMAIL PROTECTED] wrote: I've been spending a lot of time trying to overcome this issue without any success. Hopefully someone out there has a suggestion. I have datagrid within a vbox in a component. The grid takes up as much space as is available (height='100%'). There is another state which does the following: 1) reduces the height of the 1st datagrid to a fixed value (344) 2) adds a 2nd datagrid (height='124') into the vbox as the lastchild. The problem is when the state gets switched and the 2nd datagrid gets added.. 1) the headers are missing 2) the requested size is not honored When looking at the state in design mode, the headers are present and the size of the 2nd grid is correct. Has anyone run into issues similar to this? Any resolutions? The code is rather long, but I will post it if anyone is interested. Thanks Well, to answer my own question (and for the sake of anyone else who see symptoms like this) - the problem was the use of a transition. When the new state was displayed a Resize transition moved from a height of 0 to a more normal size height (170). For some reason, the headers of the datagrid got lost in that transition. Once I removed the transition, it behaved as expected. I suppose there is a way to still use the resize transition without losing the headers however that's for another day.
[flexcoders] AMF serialization of floats (REPOST)
My original post seems to have gotten removed, so I am posting again with hopes someone has experience with this issue. I am transfering float values from Java DTOs to corresponding AS objects using both FDS and remote objects. The Java float values have a precision of 4 decimal places (verified before serialization e.g. 0.4398) yet when they are created in AS they have 16 decimal places with values extending throughout the 16 digits (e.g. 0.4398283772047382). I suppose I can round the values when I receive them at the client, but can someone tell me if there's a better way to insure the destination values are the same as the source? Thanks, Mike Yahoo! Groups Sponsor ~-- Great things are happening at Yahoo! Groups. See the new email design. http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM ~- -- 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/
[flexcoders] Re: AMF serialization of floats (REPOST)
Dave, thanks for your response. I'm not sure what exact number type you have in mind (Integer?BigDecimal?). The data is decimal data, no getting around that. There don't seem to many choices as far as what data type to use. What do flex programmers do in this situation when they want to serialize currency values, such as item prices which have 2 decimal precision? Convert to a String first? It seems to me that it boils down to one thing - the data will have to be manipulated in *some* way once it has been reconstituted on the client side. This manipulation might be converting the String back to a Number, rounding the Number to the desired precision, or any of several other methods. None of which, to me, are very desirable. --- In flexcoders@yahoogroups.com, Dave Wolf [EMAIL PROTECTED] wrote: Don't use floats. wink Seriously however, floats are inexact numeric types. They're not going to have a fixed precision in general and this is especially true when they are marshalled across languages. Can you use an exact numeric type instead? -- Dave Wolf Cynergy Systems, Inc. Adobe Flex Alliance Partner http://www.cynergysystems.com http://www.cynergysystems.com/blogs Email: [EMAIL PROTECTED] Office: 866-CYNERGY --- In flexcoders@yahoogroups.com, Mike_Robinson_98 mike_robinson_98@ wrote: My original post seems to have gotten removed, so I am posting again with hopes someone has experience with this issue. I am transfering float values from Java DTOs to corresponding AS objects using both FDS and remote objects. The Java float values have a precision of 4 decimal places (verified before serialization e.g. 0.4398) yet when they are created in AS they have 16 decimal places with values extending throughout the 16 digits (e.g. 0.4398283772047382). I suppose I can round the values when I receive them at the client, but can someone tell me if there's a better way to insure the destination values are the same as the source? Thanks, Mike Yahoo! Groups Sponsor ~-- See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM ~- -- 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/
[flexcoders] Re: AMF serialization of floats (REPOST)
Peter, I would be happy to. Give me a little bit to put something togather. Do you want me to send it to you personally or post here? -Mike --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Mike, can you send me a clear and simple test case containing Java and AS source as an example of the issue? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike_Robinson_98 Sent: Friday, July 21, 2006 5:00 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: AMF serialization of floats (REPOST) Dave, thanks for your response. I'm not sure what exact number type you have in mind (Integer?BigDecimal?). The data is decimal data, no getting around that. There don't seem to many choices as far as what data type to use. What do flex programmers do in this situation when they want to serialize currency values, such as item prices which have 2 decimal precision? Convert to a String first? It seems to me that it boils down to one thing - the data will have to be manipulated in *some* way once it has been reconstituted on the client side. This manipulation might be converting the String back to a Number, rounding the Number to the desired precision, or any of several other methods. None of which, to me, are very desirable. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Dave Wolf gatorj24@ wrote: Don't use floats. wink Seriously however, floats are inexact numeric types. They're not going to have a fixed precision in general and this is especially true when they are marshalled across languages. Can you use an exact numeric type instead? -- Dave Wolf Cynergy Systems, Inc. Adobe Flex Alliance Partner http://www.cynergysystems.com http://www.cynergysystems.com http://www.cynergysystems.com/blogs http://www.cynergysystems.com/blogs Email: dave.wolf@ Office: 866-CYNERGY --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Mike_Robinson_98 mike_robinson_98@ wrote: My original post seems to have gotten removed, so I am posting again with hopes someone has experience with this issue. I am transfering float values from Java DTOs to corresponding AS objects using both FDS and remote objects. The Java float values have a precision of 4 decimal places (verified before serialization e.g. 0.4398) yet when they are created in AS they have 16 decimal places with values extending throughout the 16 digits (e.g. 0.4398283772047382). I suppose I can round the values when I receive them at the client, but can someone tell me if there's a better way to insure the destination values are the same as the source? Thanks, Mike Yahoo! Groups Sponsor ~-- Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM ~- -- 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/
[flexcoders] Re: AMF serialization of floats (REPOST)
Yes, that definitely does the trick. Thanks for your help. --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: As a work around for now, try using double instead of float. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike_Robinson_98 Sent: Friday, July 21, 2006 5:00 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: AMF serialization of floats (REPOST) Dave, thanks for your response. I'm not sure what exact number type you have in mind (Integer?BigDecimal?). The data is decimal data, no getting around that. There don't seem to many choices as far as what data type to use. What do flex programmers do in this situation when they want to serialize currency values, such as item prices which have 2 decimal precision? Convert to a String first? It seems to me that it boils down to one thing - the data will have to be manipulated in *some* way once it has been reconstituted on the client side. This manipulation might be converting the String back to a Number, rounding the Number to the desired precision, or any of several other methods. None of which, to me, are very desirable. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Dave Wolf gatorj24@ wrote: Don't use floats. wink Seriously however, floats are inexact numeric types. They're not going to have a fixed precision in general and this is especially true when they are marshalled across languages. Can you use an exact numeric type instead? -- Dave Wolf Cynergy Systems, Inc. Adobe Flex Alliance Partner http://www.cynergysystems.com http://www.cynergysystems.com http://www.cynergysystems.com/blogs http://www.cynergysystems.com/blogs Email: dave.wolf@ Office: 866-CYNERGY --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Mike_Robinson_98 mike_robinson_98@ wrote: My original post seems to have gotten removed, so I am posting again with hopes someone has experience with this issue. I am transfering float values from Java DTOs to corresponding AS objects using both FDS and remote objects. The Java float values have a precision of 4 decimal places (verified before serialization e.g. 0.4398) yet when they are created in AS they have 16 decimal places with values extending throughout the 16 digits (e.g. 0.4398283772047382). I suppose I can round the values when I receive them at the client, but can someone tell me if there's a better way to insure the destination values are the same as the source? Thanks, Mike -- 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/
[flexcoders] Editing datagrid w/nested properties
Can someone tell me if this is possible or should I give up and remove the nested properties from the datasource. I have a datagrid bound to an arraycollection. The collection is a list of Order Items. Each Order Item has a Product which in turns has several properties to display. I have used a LabelFunction to display the Product properties. No problem. However, I would like the user to be able to edit those properties. Right now the DataGrid itemEditorItemEditEndHandler throws an exception because it cannot access the nested property since it uses the data[property] ... where data=OrderItem and property=product.description. I thought writing my own endEdit event handler might be the way to go to be able to modify the property myself, however it seems the DataGrid's itemEditorItemEditEndHandler is still going to get called with the same results. Any thoughts on this situation? Yahoo! Groups Sponsor ~-- Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM ~- -- 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/
[flexcoders] Re: So? What are folks here actually building...?
An ambitious project to convert a client/server order entry/inventory management/purchasing system for a stainless steel distributor with offices in several countries. This may not be the best project to use as an introduction to Flex but it is certainly not boring. I am coming from a j2ee background with a fair amount of experience in developing web application using that architecture. However, for the client side of things I do find Flex pretty daunting. The most frustrating part is that I have a fairly complex data structure and am struggling with trying to integrate that into the flex UI. In particular, the objects I need to display have deep graphs and I am finding it difficult to display (but mostly manipulate) the data in a DataGrid. I'm sure this will all become clearer as I get a greater knowledge of Flex but right now it is frustrating. However, I am upbeat about the promise of Flex and feel it does provide the means to create innovative and fun to use web applications. -Mike --- In flexcoders@yahoogroups.com, David Mendels [EMAIL PROTECTED] wrote: Hello, It has been less than a month since we shipped Flex, but I know many folks on this list had projects they started back in the public beta time. I know in many cases you may not be able to talk about what projects you are working on, but for those who can I'd love to get a view onto what folks are building. We spent a long time (almost two years) on all the parts of the Flex 2 product line (and the Flash Player 9) and it is very cool to see the traffic here, the emergence of third party conferences like www.flexseminar.com, the books coming out on Flex, the 60K plus downloads of the IDE in the public beta, but we'd love to get a sense of what real applications people are starting to build. The team is already working on plans for mid-term and longer term upgrades to Flex, and it helps us to really understand what people are building. So, if you are able to talk about what you are building please do share--I think it would be very interesting for the community and very valuable for us on the Flex team at Adobe. --David Adobe Yahoo! Groups Sponsor ~-- Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM ~- -- 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/
[flexcoders] Serialization issues with floats
I have a rounded float value on the server of, say 0.7887. When it gets servialized and arrives at the client it becomes 0.7886999845504761. Is there a way to maintain the precision of the source value during serialization? Or is my only choice to round it again after arriving at the client? Has anyone had any experience in this issue? Thanks Yahoo! Groups Sponsor ~-- Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM ~- -- 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/
[flexcoders] Re: MenuBar itemClicked event not firing
I just ran into this issue. Apparently menu items refer only to submenus. Menus without submenus are not considered menu items are therefore do not respond to the itemClicked MenuEvent. However, they will respond to the click MouseEvent. So it looks like you'll need 2 handlers - one for itemClicked and one for click. -Mike --- In flexcoders@yahoogroups.com, shahlavi [EMAIL PROTECTED] wrote: I have a menubar with menu items which have submenus and some that don't. The submenus are firing the itemClicked event as expected, however the menu items which don't have any submenus are not firing any events at all! This is directly from the Flex 2 final docs: itemClick (MenuEvent.ITEM_CLICK) Dispatched when a user selects an enabled menu item of type normal, check, or radio. This event is not dispatched when a user selects a menu item of type separator, a menu item that opens a submenu, or a disabled menu item. Here's what my XMLList looks like which I'm using as my dataProvider: private var menubarXML:XMLList = menuitem label=Local Areas menuitem label=Manage Designated Local Areas data=1A/ menuitem label=Manage Local Area Maps data=1B/ menuitem label=Manage Local Service Terms data=1C/ /menuitem menuitem label=Record Admin menuitem label=Manage Reason Not To Display data=2A/ menuitem label=Manage Type Of Site data =2B/ /menuitem menuitem label=Admin menuitem label=Manage Accounts data=3A/ menuitem label=Manage Personal Account data =3B/ /menuitem menuitem label=View data=4 / menuitem label=Area Switch data=5/ menuitem label=Logout data=6/ /; As you can see there are nodes which don't have any children yet I'm not recieving any sort of events from these at all. Has anyone come across this issue at all? Any ideas on what I maybe doing wrong? Any help would be appreciated. Thanks, Farid Yahoo! Groups Sponsor ~-- Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM ~- -- 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/
[flexcoders] Cairngorm ServiceLocator and FDS
Is it possible to define a mx:DataService in the ServiceLocator or is ServiceLocator useful only for mx:RemoteObject and mx:WebService? In the examples I have seen you retrieve a service from the ServiceLocator with something like this: ServiceLocator.getInstance().getService(ordersService); However, the getService() method returns an AbstractService which only WebService and RemoteObject extend. Is there some other mechanism to be able to use a DataService within the ServiceLocator? The getInvokerService method also does not look like it is useful for this purpose. Thanks, Mike Yahoo! Groups Sponsor ~-- Yahoo! Groups gets a make over. See the new email design. http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM ~- -- 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/
[flexcoders] Re: Cairngorm ServiceLocator and FDS
Thanks for pointing me in the right direction. Your function still produces an exception when it tries to cast a DataService as a MessageAgent. However, using your example, I simply made a new function that returns a DataService and it works as expected. public function getDataService ( serviceId : String ) : DataService { if ( this[ serviceId ] == undefined ) throw new Error( No DataService found for service name + serviceId ); return this[ serviceId ]; } --- In flexcoders@yahoogroups.com, JesterXL [EMAIL PROTECTED] wrote: Add this function to Cairngorm's ServiceLocator and it'll work: public function getMessageAgent ( serviceId : String ) : mx.messenging.MessageAgent { if ( this[ serviceId ] == undefined ) throw new Error( No MessageAgent found for service name + serviceId ); return this[ serviceId ]; } - Original Message - From: Mike_Robinson_98 [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, July 11, 2006 2:16 PM Subject: [flexcoders] Cairngorm ServiceLocator and FDS Is it possible to define a mx:DataService in the ServiceLocator or is ServiceLocator useful only for mx:RemoteObject and mx:WebService? In the examples I have seen you retrieve a service from the ServiceLocator with something like this: ServiceLocator.getInstance().getService(ordersService); However, the getService() method returns an AbstractService which only WebService and RemoteObject extend. Is there some other mechanism to be able to use a DataService within the ServiceLocator? The getInvokerService method also does not look like it is useful for this purpose. Thanks, Mike -- 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 Yahoo! Groups Sponsor ~-- Yahoo! Groups gets a make over. See the new email design. http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM ~- -- 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/
[flexcoders] Re: Cairngorm ServiceLocator and FDS
That's perfect. Just what I was looking for. Thanks, Joao (sorry can't reproduce the marking on your name ;-) -Mike --- In flexcoders@yahoogroups.com, João Fernandes [EMAIL PROTECTED] wrote: Mike look this post: http://weblogs.macromedia.com/pmartin/archives/2006/06/cairngorm_2_sec.cfm DestinationLocator extends serviceLocator so you can replace your serviceLocator tags in your services.mxml for destinationLocator and put there your DataServices then use DestinationLocator.getInstance().getDataService(myDS); João Fernandes -Original Message- From: flexcoders@yahoogroups.com on behalf of Mike_Robinson_98 Sent: Tue 11-Jul-06 7:16 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm ServiceLocator and FDS Is it possible to define a mx:DataService in the ServiceLocator or is ServiceLocator useful only for mx:RemoteObject and mx:WebService? In the examples I have seen you retrieve a service from the ServiceLocator with something like this: ServiceLocator.getInstance().getService(ordersService); However, the getService() method returns an AbstractService which only WebService and RemoteObject extend. Is there some other mechanism to be able to use a DataService within the ServiceLocator? The getInvokerService method also does not look like it is useful for this purpose. Thanks, Mike Yahoo! Groups Sponsor ~-- Yahoo! Groups gets a make over. See the new email design. http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM ~- -- 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/
[flexcoders] Re: Tomcat and jdk version for Flex
Be sure to use a recent version of 5.5 as version 5.5.7 had a severe memory leak. Personally, I am using 5.5.17 and it is very stable in that regard. --- In flexcoders@yahoogroups.com, a a [EMAIL PROTECTED] wrote: Hi all! I have just a simple question for starting develop Flex application with java. Someone are using Flex with java 1.5 and tomcat 5.5? Can this be a good configuration for application developing or maybe it's better using JRun with jdk1.4? I hope that you understand my bad english :P Thanks for the answer bye Rex Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com Yahoo! Groups Sponsor ~-- Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM ~- -- 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/
[flexcoders] Re: Font changes to FlexBuilder IDE (2b3)
Will, I would be interested in knowing how to do this as I cannot find the right place either. Could you post your solution? Thanks, Mike --- In flexcoders@yahoogroups.com, Will Morgan [EMAIL PROTECTED] wrote: Found it. No help needed...:) On 6/5/06, willmorganuk [EMAIL PROTECTED] wrote: Hi - does anyone know how to change the font of the MXML editor? I've looked about in windowpreferences and can't seem to find anything. 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 Web site design developmenthttp://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ Computer software developmenthttp://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw Software design and developmenthttp://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ Macromedia flexhttp://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6nPIrz7_EpZI36cYzBjw Software development best practicehttp://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw -- YAHOO! GROUPS LINKS - Visit your group flexcodershttp://groups.yahoo.com/group/flexcoders on the web. - To unsubscribe from this group, send an email to: [EMAIL PROTECTED][EMAIL PROTECTED] - Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/. -- -- 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/
[flexcoders] Signaling errors in POJO
When calling a POJO method what is the preferred way to signal the RemotingService that an error condition has occurred? This error may not necessarily throw an exception in the POJO (maybe it just did not find any results). And how you include in that signal specific information about the error that could be returned to the user? Thanks, Mike Yahoo! Groups Sponsor ~-- Yahoo! Groups gets a make over. See the new email design. http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM ~- -- 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/
[flexcoders] Re: Signaling errors in POJO
Thanks, that makes sense on how flex handles it, I just couldn't find the explanation in the documentation. I appreciate your feedback. The high level message should be sufficient for my purposes. -Mike --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: I think throwing an exception is ok - in Flex 2 this should be handled better where by we now use bean-rules to serialize Throwable instances (including read only properties) and return root cause chains too. The client will always receive an mx.rpc.events.FaultEvent which always has an mx.rpc.Fault instance that will contain the high level message information from your exception, but the rootCause will be the serialized bean info of your throwable type (and technically you could even create ActionScript types mapped to the Java throwable types using [RemoteClass(alias=xyz)]). From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike_Robinson_98 Sent: Thursday, June 29, 2006 3:53 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Signaling errors in POJO When calling a POJO method what is the preferred way to signal the RemotingService that an error condition has occurred? This error may not necessarily throw an exception in the POJO (maybe it just did not find any results). And how you include in that signal specific information about the error that could be returned to the user? Thanks, Mike Yahoo! Groups Sponsor ~-- Yahoo! Groups gets a make over. See the new email design. http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM ~- -- 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/
[flexcoders] Re: Remote object invocation failure
Mistake found. I inadvertently removed the servlet mapping for the MessageBrokerServlet in the web.xml file. Sorry, but I'm just getting used to all the configuration files. Thanks, Mike --- In flexcoders@yahoogroups.com, Mike_Robinson_98 [EMAIL PROTECTED] wrote: I'm trying to call a method on a Java object and keep getting Connection failed when I try the method call. I know it must be a configuration issue but have been plugging away at this all morning with out making any headway. Maybe some of you can see the problem easily. I'm using Tomcat. Thanks in advance. Here are the relevant details (I think): // ** The error messages * [SWF] /metalsmith/metalsmith-flex/metalsmith-debug.swf - 1,196,373 bytes after decompression 'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer set destination to 'loginService'. 'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer sending message 'E164544F-F6BF-7F4E-D9C7-11B613446EE4' 'my-amf' channel endpoint set to http://localhost:8080/metalsmith/messagebroker/amf 'my-amf' channel settings are: channel id=my-amf type=mx.messaging.channels.AMFChannel endpoint uri=http://{server.name}:{server.port}/metalsmith/messagebroker/amf/ properties polling-enabledfalse/polling-enabled /properties /channel 'my-amf' pinging endpoint. 'my-amf' channel got status. (Object)#0 code = NetConnection.Call.Failed description = HTTP: Failed details = http://localhost:8080/metalsmith/messagebroker/amf; level = error 'my-amf' channel polling stopped. 'my-amf' channel connect failed. 'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer channel faulted with Channel.Connect.Failed NetConnection.Call.Failed: HTTP: Failed 'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer fault for 'E164544F-F6BF-7F4E-D9C7-11B613446EE4'. // *** The mxml file defining and calling the remote object mx:Script ![CDATA[ import com.othenos.metalsmith.user.User; import com.othenos.metalsmith.model.ModelLocator; import mx.events.ValidationResultEvent; import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; private function clickHandler():void{ if(userNameV.validate().type == ValidationResultEvent.VALID passwordV.validate().type == ValidationResultEvent.VALID){ loginObject.validateUser(); // loginObject.validateUser(userName.text, password.text); // var eventObj:Event=new Event(loginEvent); // dispatchEvent(eventObj); } else{ resultLabel.text=There are errors.; } } private function loginHandler(event:ResultEvent):void{ ModelLocator.currentUser = event.result as User; } private function failureHandler(event:FaultEvent):void{ resultLabel.text=event.fault.faultString; } ]] /mx:Script mx:RemoteObject id=loginObject destination=loginService showBusyCursor=true result=loginHandler(event) fault=failureHandler(event) / // *** The flex-remoting-service.xml ?xml version=1.0 encoding=UTF-8? service id=remoting-service class=flex.messaging.services.RemotingService messageTypes=flex.messaging.messages.RemotingMessage adapters adapter-definition id=java-object class=flex.messaging.services.remoting.adapters.JavaAdapter default=true/ /adapters default-channels channel ref=my-amf/ /default-channels destination id=loginService properties sourcecom.othenos.metalsmith.assembler.UserAssembler/source scopeapplication/scope /properties /destination /service // flex-enterprise-services (partial) services service-include file-path=flex-data-service.xml / service-include file-path=flex-remoting-service.xml / /services channels channel-definition id=my-amf class=mx.messaging.channels.AMFChannel endpoint uri=http://{server.name}:{server.port}/{context.root}/messagebroker/amf; class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled /properties /channel-definition // finally, startup messages [Flex] [INFO] Starting Adobe Flex Data Services 2.0 Express (beta period ends Jul 31, 2006) [Flex] [INFO] Adobe Flex Data Services Build: 138139 [Flex] [INFO] Endpoint my-amf created with security: None at URI: http://{server.name}:{server.port}/{context.root}/messagebroker/amf [Flex] [INFO] Endpoint ms-rtmp created with security: None at URI: rtmp://{server.name}:2035 [Flex] [INFO] RTMP-Server listening on port:2035 Yahoo! Groups Sponsor ~-- Great things are happening at Yahoo! Groups. See the new email design. http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM
[flexcoders] Remote object invocation failure
I'm trying to call a method on a Java object and keep getting Connection failed when I try the method call. I know it must be a configuration issue but have been plugging away at this all morning with out making any headway. Maybe some of you can see the problem easily. I'm using Tomcat. Thanks in advance. Here are the relevant details (I think): // ** The error messages * [SWF] /metalsmith/metalsmith-flex/metalsmith-debug.swf - 1,196,373 bytes after decompression 'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer set destination to 'loginService'. 'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer sending message 'E164544F-F6BF-7F4E-D9C7-11B613446EE4' 'my-amf' channel endpoint set to http://localhost:8080/metalsmith/messagebroker/amf 'my-amf' channel settings are: channel id=my-amf type=mx.messaging.channels.AMFChannel endpoint uri=http://{server.name}:{server.port}/metalsmith/messagebroker/amf/ properties polling-enabledfalse/polling-enabled /properties /channel 'my-amf' pinging endpoint. 'my-amf' channel got status. (Object)#0 code = NetConnection.Call.Failed description = HTTP: Failed details = http://localhost:8080/metalsmith/messagebroker/amf; level = error 'my-amf' channel polling stopped. 'my-amf' channel connect failed. 'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer channel faulted with Channel.Connect.Failed NetConnection.Call.Failed: HTTP: Failed 'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer fault for 'E164544F-F6BF-7F4E-D9C7-11B613446EE4'. // *** The mxml file defining and calling the remote object mx:Script ![CDATA[ import com.othenos.metalsmith.user.User; import com.othenos.metalsmith.model.ModelLocator; import mx.events.ValidationResultEvent; import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; private function clickHandler():void{ if(userNameV.validate().type == ValidationResultEvent.VALID passwordV.validate().type == ValidationResultEvent.VALID){ loginObject.validateUser(); // loginObject.validateUser(userName.text, password.text); // var eventObj:Event=new Event(loginEvent); // dispatchEvent(eventObj); } else{ resultLabel.text=There are errors.; } } private function loginHandler(event:ResultEvent):void{ ModelLocator.currentUser = event.result as User; } private function failureHandler(event:FaultEvent):void{ resultLabel.text=event.fault.faultString; } ]] /mx:Script mx:RemoteObject id=loginObject destination=loginService showBusyCursor=true result=loginHandler(event) fault=failureHandler(event) / // *** The flex-remoting-service.xml ?xml version=1.0 encoding=UTF-8? service id=remoting-service class=flex.messaging.services.RemotingService messageTypes=flex.messaging.messages.RemotingMessage adapters adapter-definition id=java-object class=flex.messaging.services.remoting.adapters.JavaAdapter default=true/ /adapters default-channels channel ref=my-amf/ /default-channels destination id=loginService properties sourcecom.othenos.metalsmith.assembler.UserAssembler/source scopeapplication/scope /properties /destination /service // flex-enterprise-services (partial) services service-include file-path=flex-data-service.xml / service-include file-path=flex-remoting-service.xml / /services channels channel-definition id=my-amf class=mx.messaging.channels.AMFChannel endpoint uri=http://{server.name}:{server.port}/{context.root}/messagebroker/amf; class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled /properties /channel-definition // finally, startup messages [Flex] [INFO] Starting Adobe Flex Data Services 2.0 Express (beta period ends Jul 31, 2006) [Flex] [INFO] Adobe Flex Data Services Build: 138139 [Flex] [INFO] Endpoint my-amf created with security: None at URI: http://{server.name}:{server.port}/{context.root}/messagebroker/amf [Flex] [INFO] Endpoint ms-rtmp created with security: None at URI: rtmp://{server.name}:2035 [Flex] [INFO] RTMP-Server listening on port:2035 Yahoo! Groups Sponsor ~-- Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM ~- -- 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
[flexcoders] Re: Remote object invocation failure
When I try to browse the endpoint http://localhost:8080/metalsmith/messagebroker/amf; I get an error saying the resource is not available. I did a clean of the project and restarted the server with the same result. I have logging turned on in the flex-enterprises-services but it never reports anything other than ... 06/26 12:11:55 DEBUG configuration service started. 06/26 12:11:55 DEBUG logger services started. I would hope for a lot more detail than that. Is my configuration correct? logging target class=flex.messaging.log.ConsoleTarget level=Debug properties prefix[Flex] /prefix includeDatefalse/includeDate includeTimefalse/includeTime includeLeveltrue/includeLevel includeCategoryfalse/includeCategory /properties filters patternEndpoint.*/pattern patternService.*/pattern patternMessage.*/pattern patternDataService.*/pattern patternConfiguration/pattern /filters /target /logging --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Have you tried browsing to the endpoint URI to check it's accessible? What URL are you using to load the SWF? Perhaps you've changed the configuration but not restarted the server nor forced a recompile of your SWF (i.e. doing a clean and forcing FB to recompile)? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike_Robinson_98 Sent: Monday, June 26, 2006 3:15 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Remote object invocation failure I'm trying to call a method on a Java object and keep getting Connection failed when I try the method call. I know it must be a configuration issue but have been plugging away at this all morning with out making any headway. Maybe some of you can see the problem easily. I'm using Tomcat. Thanks in advance. Here are the relevant details (I think): // ** The error messages * [SWF] /metalsmith/metalsmith-flex/metalsmith-debug.swf - 1,196,373 bytes after decompression 'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer set destination to 'loginService'. 'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer sending message 'E164544F-F6BF-7F4E-D9C7-11B613446EE4' 'my-amf' channel endpoint set to http://localhost:8080/metalsmith/messagebroker/amf http://localhost:8080/metalsmith/messagebroker/amf 'my-amf' channel settings are: channel id=my-amf type=mx.messaging.channels.AMFChannel endpoint uri=http://{server.name}:{server.port}/metalsmith/messagebroker/amf/ properties polling-enabledfalse/polling-enabled /properties /channel 'my-amf' pinging endpoint. 'my-amf' channel got status. (Object)#0 code = NetConnection.Call.Failed description = HTTP: Failed details = http://localhost:8080/metalsmith/messagebroker/amf http://localhost:8080/metalsmith/messagebroker/amf level = error 'my-amf' channel polling stopped. 'my-amf' channel connect failed. 'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer channel faulted with Channel.Connect.Failed NetConnection.Call.Failed: HTTP: Failed 'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer fault for 'E164544F-F6BF-7F4E-D9C7-11B613446EE4'. // *** The mxml file defining and calling the remote object mx:Script ![CDATA[ import com.othenos.metalsmith.user.User; import com.othenos.metalsmith.model.ModelLocator; import mx.events.ValidationResultEvent; import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; private function clickHandler():void{ if(userNameV.validate().type == ValidationResultEvent.VALID passwordV.validate().type == ValidationResultEvent.VALID){ loginObject.validateUser(); // loginObject.validateUser(userName.text, password.text); // var eventObj:Event=new Event(loginEvent); // dispatchEvent(eventObj); } else{ resultLabel.text=There are errors.; } } private function loginHandler(event:ResultEvent):void{ ModelLocator.currentUser = event.result as User; } private function failureHandler(event:FaultEvent):void{ resultLabel.text=event.fault.faultString; } ]] /mx:Script mx:RemoteObject id=loginObject destination=loginService showBusyCursor=true result=loginHandler(event) fault=failureHandler(event) / // *** The flex-remoting-service.xml ?xml version=1.0 encoding=UTF-8? service id=remoting-service class=flex.messaging.services.RemotingService messageTypes=flex.messaging.messages.RemotingMessage adapters adapter-definition id=java-object class=flex.messaging.services.remoting.adapters.JavaAdapter default=true/ /adapters default-channels channel ref=my-amf/ /default-channels destination id=loginService properties sourcecom.othenos.metalsmith.assembler.UserAssembler/source scopeapplication/scope /properties /destination /service // flex-enterprise-services (partial) services service-include file-path=flex-data-service.xml / service-include file-path=flex-remoting-service.xml / /services channels channel
[flexcoders] Re: Flex dataservices and Spring
Well Pete, I finally got it to work. It seems like the problem was in using the Spring framework. Something about setting either the context-param or listener for Spring in my web.xml file was causing the conflict. Once I removed these references and simply instantiated the bean in my Assembler class instead of having Spring inject it, all worked as expected. I have read http://www.devx.com/Adobe/Article/31489 about the changes to beta3 and one of the points was Flex Data Services has better support for Spring. However, as of yet I cannot find any references in the documentation about the usage of Spring with FDS. Has anyone else used Spring with FDS or has a reference on how that might be done? Thanks, Mike --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Hmm, it looks like the endpoints are starting up fine, but there's something wrong with the destination configuration as the error message shows that the data service doesn't believe it has that destination configured. You restarted the server after modifying the configuration files, right? Also, you cleaned and forced a recompile of the mxml after changing the configuration? If you can't solve it, would it be possible to send a .war of the app to me off line? Pete From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike_Robinson_98 Sent: Wednesday, June 21, 2006 8:03 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Flex dataservices: Pete, thanks for the response. Yes, you're probably right. It appears that the endpoints are not being created. My guess is it has something to do with a security setting ( I removed all references to security in the config files, as they did not seem necessary). That's just a wild guess. Here's some of the log from the stdout.log file. // from stdout.log // ***' Loading configuration file C:\Tomcat 5.5\webapps\metalsmith\WEB-INF\flex\flex-webtier-config.xml, root element flex-webtier-config Loading configuration file C:\Tomcat 5.5\webapps\metalsmith\WEB-INF\flex\flex-config.xml, root element flex-config 06/21 12:13:12 DEBUG configuration service started. 06/21 12:13:12 DEBUG logger services started. Loading configuration file C:\Tomcat 5.5\webapps\samples\WEB-INF\flex\flex-webtier-config.xml, root element flex-webtier-config Loading configuration file C:\Tomcat 5.5\webapps\samples\WEB-INF\flex\flex-config.xml, root element flex-config [Flex] [INFO] Starting Adobe Flex Data Services 2.0 Express (beta period ends Jul 31, 2006) [Flex] [INFO] Adobe Flex Data Services Build: 138139 [Flex] [INFO] Endpoint my-amf created with security: None at URI: http://{server.name}:{server.port}/{context.root}/messagebroker/amf [Flex] [INFO] Endpoint my-polling-amf created with security: None at URI: http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolli ng [Flex] [INFO] Endpoint my-http created with security: None at URI: http://{server.name}:{server.port}/{context.root}/messagebroker/http [Flex] [INFO] Endpoint my-secure-amf created with security: None at URI: https://{server.name}:9100/{context.root}/messagebroker/amfsecure [Flex] [INFO] Endpoint my-rtmp created with security: None at URI: rtmp://{server.name}:2037 [Flex] [INFO] Endpoint my-secure-http created with security: None at URI: https://{server.name}:9100/{context.root}/messagebroker/httpsecure [Flex] [ERROR] Exception when invoking service: data-service with message: Flex Message (flex.data.messages.DataMessage) operation = fill id = null clientId = 495BED4E-B85F-C791-613D-F802D929ADAE correlationId = destination = orderRow messageId = 699A031A-F1DF-2517-DE70-F802D9394E53 timestamp = 1150917204500 timeToLive = 0 body = [ ] hdr(DSEndpoint) = my-rtmp exception: flex.messaging.MessageException: No destination 'orderRow' exists in service flex.data.DataService - Mike --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Peter Farland pfarland@ wrote: Mike, The fact that the error said the send failed means that perhaps the RTMP channel isn't running... so I'm guessing something went wrong on starting the web application. Most likely the configuration was invalid. Can you look at the server startup output (perhaps in the console window itself or in the web application logs... depending on how you launched Tomcat) for an indication as to whether there were such errors, and, hopefully, a clue as to what is wrong with the config? Pete From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Mike_Robinson_98 Sent: Wednesday, June 21, 2006 2:35 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders
[flexcoders] Re: Flex dataservices:
Pete, thanks for the response. Yes, you're probably right. It appears that the endpoints are not being created. My guess is it has something to do with a security setting ( I removed all references to security in the config files, as they did not seem necessary). That's just a wild guess. Here's some of the log from the stdout.log file. // from stdout.log // ***' Loading configuration file C:\Tomcat 5.5\webapps\metalsmith\WEB-INF\flex\flex-webtier-config.xml, root element flex-webtier-config Loading configuration file C:\Tomcat 5.5\webapps\metalsmith\WEB-INF\flex\flex-config.xml, root element flex-config 06/21 12:13:12 DEBUG configuration service started. 06/21 12:13:12 DEBUG logger services started. Loading configuration file C:\Tomcat 5.5\webapps\samples\WEB-INF\flex\flex-webtier-config.xml, root element flex-webtier-config Loading configuration file C:\Tomcat 5.5\webapps\samples\WEB-INF\flex\flex-config.xml, root element flex-config [Flex] [INFO] Starting Adobe Flex Data Services 2.0 Express (beta period ends Jul 31, 2006) [Flex] [INFO] Adobe Flex Data Services Build: 138139 [Flex] [INFO] Endpoint my-amf created with security: None at URI: http://{server.name}:{server.port}/{context.root}/messagebroker/amf [Flex] [INFO] Endpoint my-polling-amf created with security: None at URI: http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling [Flex] [INFO] Endpoint my-http created with security: None at URI: http://{server.name}:{server.port}/{context.root}/messagebroker/http [Flex] [INFO] Endpoint my-secure-amf created with security: None at URI: https://{server.name}:9100/{context.root}/messagebroker/amfsecure [Flex] [INFO] Endpoint my-rtmp created with security: None at URI: rtmp://{server.name}:2037 [Flex] [INFO] Endpoint my-secure-http created with security: None at URI: https://{server.name}:9100/{context.root}/messagebroker/httpsecure [Flex] [ERROR] Exception when invoking service: data-service with message: Flex Message (flex.data.messages.DataMessage) operation = fill id = null clientId = 495BED4E-B85F-C791-613D-F802D929ADAE correlationId = destination = orderRow messageId = 699A031A-F1DF-2517-DE70-F802D9394E53 timestamp = 1150917204500 timeToLive = 0 body = [ ] hdr(DSEndpoint) = my-rtmp exception: flex.messaging.MessageException: No destination 'orderRow' exists in service flex.data.DataService - Mike --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Mike, The fact that the error said the send failed means that perhaps the RTMP channel isn't running... so I'm guessing something went wrong on starting the web application. Most likely the configuration was invalid. Can you look at the server startup output (perhaps in the console window itself or in the web application logs... depending on how you launched Tomcat) for an indication as to whether there were such errors, and, hopefully, a clue as to what is wrong with the config? Pete From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike_Robinson_98 Sent: Wednesday, June 21, 2006 2:35 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex dataservices: I have read some of the posts on issues similar to this one. Especially the Hank Williams and Peter Farland exchange. However, this problem is different enough that their posts did not help. I am trying to adapt the samples examples to work with an app I am developing. (BTW, all the samples work on my Tomcat test server running on Windows.) The issues I have is a failure when I try to a fill on a DataService. I've attempted to simplify the configuration files but I must have left something out. Anyone who has some experience in this area may easily spot my mistake but I have tried all the changes I can think of without any change in the result. Here are the gory details: // This is the script that creates the data service and tries to populate the orders arraycollection. mx:Script ![CDATA[ import mx.data.DataService; import mx.collections.ArrayCollection; import com.othenos.metalsmith.order.OrderRow; public var ds:DataService; [Bindable] public var orders:ArrayCollection; [Bindable] public var orderRow:OrderRow; public function initApp():void{ orders = new ArrayCollection(); ds = new DataService(orderRow); ds.fill(orders); } ]] /mx:Script // Here is the AS class that acts as the DTO // ** package com.othenos.metalsmith.order { import mx.data.IManaged; import mx.data.utils.Managed; import mx.core.MXMLObjectAdapter; [Managed] [RemoteClass(alias=com.othenos.metalsmith.order.OrderRow)] public class OrderRow { public var orderID:int; public var orderDate:Date; public var orderAmount:Number; public var status:String = ; public var salesmanName:String = ; public