[flexcoders] RemoteObject Issue
I've been trying for the last few days to get RemoteObject to work, but with little luck. I've searched this site, and have tried to implement the examples found in developing rich clients with macromedia FLEX. To make matters more confusing, I've also tried to implement the command/control/delegate patterns that the above book advocates. Basically, I think the problem is that I'm not seeing the Java classes I've created. Below are code snippets of (what I think) are the relevant files. ### My Java classes ### {TOMCAT-HOME}\webapps\flex\WEB- INF\classes\com\foo\test\business\SiteMaintenanceDelegate.class package com.foo.test.business; import com.foo.test.vo.SiteKeywordVO; public class SiteMaintenanceDelegate { public SiteMaintenanceDelegate() { } public SiteKeywordVO reviewKeywords() { SiteKeywordVO keywords = new SiteKeywordVO(); return keywords; } } {TOMCAT-HOME}\webapps\flex\WEB- INF\classes\com\foo\test\vo\SiteKeywordVO.class package com.foo.test.vo; import java.io.Serializable; public class SiteKeywordVO implements Serializable { public String[] keywords; public void SiteKeywordVO() { String[] keywords = {first agr, second agr, third agr}; } } ### My RO definition ### {TOMCAT-HOME}\webapps\flex\services\Services.mxml mx:RemoteObject id=siteDataServices source=com.foo.test.business.SiteMaintenanceDelegate result=event.call.resultHandler(event) fault=event.call.faultHandler(event) showBusyCursor=true mx:method name=reviewKeywords/ /mx:RemoteObject ### My ActionScript VO ### {TOMCAT-HOME}\webapps\flex\sdm\com\foo\test\vo\SiteKeywordVO.as class com.foo.test.vo.SiteKeywordVO { public var keywords:Array; public var _remoteClass; public function SiteKeywordVO() { _remoteClass=com.foo.test.vo.SiteKeywordVO; } } ### My testing mxml file ### {TOMCAT-HOME}\webapps\flex\sdm\sdmUnitTest.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns:sdm=sdm.* xmlns:services=services.* sdm:SiteDataMaint/ services:Services id=myServices/ /mx:Application ### My SiteDataMaint component ### {TOMCAT-HOME}\webapps\flex\sdm\SiteDataMaint.mxml ... //just the script part mx:Script ![CDATA[ import sdm.business.*; import sdm.commands.*; import sdm.control.*; import com.foo.test.vo.*; import mx.controls.Alert; public function initApp() { var controller = new SDMController; } ]] /mx:Script ... The SDMController class seems to be working correctly. ### My Delegate class ### {TOMCAT-HOME}\webapps\flex\sdm\business\SDMDelegate.as ... //just the constructor public function SDMDelegate(responder:Responder) { this.service = mx.core.Application.application.myServices.siteDataServices; Dumper.dump(service); this.responder = responder; } I think this is where the problem is. When I dump 'service' (via Flex Trace Panel), I get 'undefined'. I really have no idea where to go from here. I've tried turning on all debug stuff, used NetConnectionDebugger, use Flex Trace Panel... nothing on all accounts. Thanks for any suggestions you may have! Geoff -- 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: RemoteObject Issue
I think I have. Below is part of the file ReviewKeywordsCommand.as, which is the result handler from the RO call. import com.foo.test.vo.*; ... public function onResult( event ) : Void { var sk:SiteKeywordVO = (SiteKeywordVO) event.result; mx.core.Application.alert(Passed in + sk); } ... I just wanted to throw an Alert for now That way I knew something was coming in. eventually, it will populate a datagrid. Geoff --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Perhaps your SiteKeywordVO is never linked into the SWF because you never create a dependency on the class name (as mxmlc will optimize and remove unreferenced class definitions). An import statement is not enough to create a dependency. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Tuesday, April 18, 2006 3:10 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] RemoteObject Issue I've been trying for the last few days to get RemoteObject to work, but with little luck. I've searched this site, and have tried to implement the examples found in developing rich clients with macromedia FLEX. To make matters more confusing, I've also tried to implement the command/control/delegate patterns that the above book advocates. Basically, I think the problem is that I'm not seeing the Java classes I've created. Below are code snippets of (what I think) are the relevant files. ### My Java classes ### {TOMCAT-HOME}\webapps\flex\WEB- INF\classes\com\foo\test\business\SiteMaintenanceDelegate.class package com.foo.test.business; import com.foo.test.vo.SiteKeywordVO; public class SiteMaintenanceDelegate { public SiteMaintenanceDelegate() { } public SiteKeywordVO reviewKeywords() { SiteKeywordVO keywords = new SiteKeywordVO(); return keywords; } } {TOMCAT-HOME}\webapps\flex\WEB- INF\classes\com\foo\test\vo\SiteKeywordVO.class package com.foo.test.vo; import java.io.Serializable; public class SiteKeywordVO implements Serializable { public String[] keywords; public void SiteKeywordVO() { String[] keywords = {first agr, second agr, third agr}; } } ### My RO definition ### {TOMCAT-HOME}\webapps\flex\services\Services.mxml mx:RemoteObject id=siteDataServices source=com.foo.test.business.SiteMaintenanceDelegate result=event.call.resultHandler(event) fault=event.call.faultHandler(event) showBusyCursor=true mx:method name=reviewKeywords/ /mx:RemoteObject ### My ActionScript VO ### {TOMCAT-HOME}\webapps\flex\sdm\com\foo\test\vo\SiteKeywordVO.as class com.foo.test.vo.SiteKeywordVO { public var keywords:Array; public var _remoteClass; public function SiteKeywordVO() { _remoteClass=com.foo.test.vo.SiteKeywordVO; } } ### My testing mxml file ### {TOMCAT-HOME}\webapps\flex\sdm\sdmUnitTest.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns:sdm=sdm.* xmlns:services=services.* sdm:SiteDataMaint/ services:Services id=myServices/ /mx:Application ### My SiteDataMaint component ### {TOMCAT-HOME}\webapps\flex\sdm\SiteDataMaint.mxml ... //just the script part mx:Script ![CDATA[ import sdm.business.*; import sdm.commands.*; import sdm.control.*; import com.foo.test.vo.*; import mx.controls.Alert; public function initApp() { var controller = new SDMController; } ]] /mx:Script ... The SDMController class seems to be working correctly. ### My Delegate class ### {TOMCAT-HOME}\webapps\flex\sdm\business\SDMDelegate.as ... //just the constructor public function SDMDelegate(responder:Responder) { this.service = mx.core.Application.application.myServices.siteDataServices; Dumper.dump(service); this.responder = responder; } I think this is where the problem is. When I dump 'service' (via Flex Trace Panel), I get 'undefined'. I really have no idea where to go from here. I've tried turning on all debug stuff, used NetConnectionDebugger, use Flex Trace Panel... nothing on all accounts. Thanks for any suggestions you may have! Geoff -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email
[flexcoders] Re: RemoteObject Issue
Hmm I replaced the service assignment with: this.service = parentApplication.myServices.siteDataServices; But I get the following error: There is no property with the name 'parentApplication'. Looking at the docs, parentApplication looks like it's intended to walk up the tree of multiple application nested within themselves. I don't think that applys to this case since I only have 1 mxml file with the mx:Application tag. Please correct me if I've misunderstood this. Thanks, Geoff --- In flexcoders@yahoogroups.com, Doug Lowder [EMAIL PROTECTED] wrote: My guess would be that SDMDelegate's constructor can't access your siteDataServices RemoteObject through mx.core.Application.application. Try this.service = parentApplication.myServices.siteDataServices instead, or pass the service as a parameter to the constructor as you do with the responder. Doug --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I've been trying for the last few days to get RemoteObject to work, but with little luck. I've searched this site, and have tried to implement the examples found in developing rich clients with macromedia FLEX. To make matters more confusing, I've also tried to implement the command/control/delegate patterns that the above book advocates. Basically, I think the problem is that I'm not seeing the Java classes I've created. Below are code snippets of (what I think) are the relevant files. ### My Java classes ### {TOMCAT-HOME}\webapps\flex\WEB- INF\classes\com\foo\test\business\SiteMaintenanceDelegate.class package com.foo.test.business; import com.foo.test.vo.SiteKeywordVO; public class SiteMaintenanceDelegate { public SiteMaintenanceDelegate() { } public SiteKeywordVO reviewKeywords() { SiteKeywordVO keywords = new SiteKeywordVO(); return keywords; } } {TOMCAT-HOME}\webapps\flex\WEB- INF\classes\com\foo\test\vo\SiteKeywordVO.class package com.foo.test.vo; import java.io.Serializable; public class SiteKeywordVO implements Serializable { public String[] keywords; public void SiteKeywordVO() { String[] keywords = {first agr, second agr, third agr}; } } ### My RO definition ### {TOMCAT-HOME}\webapps\flex\services\Services.mxml mx:RemoteObject id=siteDataServices source=com.foo.test.business.SiteMaintenanceDelegate result=event.call.resultHandler(event) fault=event.call.faultHandler(event) showBusyCursor=true mx:method name=reviewKeywords/ /mx:RemoteObject ### My ActionScript VO ### {TOMCAT-HOME}\webapps\flex\sdm\com\foo\test\vo\SiteKeywordVO.as class com.foo.test.vo.SiteKeywordVO { public var keywords:Array; public var _remoteClass; public function SiteKeywordVO() { _remoteClass=com.foo.test.vo.SiteKeywordVO; } } ### My testing mxml file ### {TOMCAT-HOME}\webapps\flex\sdm\sdmUnitTest.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns:sdm=sdm.* xmlns:services=services.* sdm:SiteDataMaint/ services:Services id=myServices/ /mx:Application ### My SiteDataMaint component ### {TOMCAT-HOME}\webapps\flex\sdm\SiteDataMaint.mxml ... //just the script part mx:Script ![CDATA[ import sdm.business.*; import sdm.commands.*; import sdm.control.*; import com.foo.test.vo.*; import mx.controls.Alert; public function initApp() { var controller = new SDMController; } ]] /mx:Script ... The SDMController class seems to be working correctly. ### My Delegate class ### {TOMCAT-HOME}\webapps\flex\sdm\business\SDMDelegate.as ... //just the constructor public function SDMDelegate(responder:Responder) { this.service = mx.core.Application.application.myServices.siteDataServices; Dumper.dump(service); this.responder = responder; } I think this is where the problem is. When I dump 'service' (via Flex Trace Panel), I get 'undefined'. I really have no idea where to go from here. I've tried turning on all debug stuff, used NetConnectionDebugger, use Flex Trace Panel... nothing on all accounts. Thanks for any suggestions you may have! Geoff -- 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: RemoteObject Issue
I tried to dump myServices via: codeDumper.dump(mx.core.Application.application.myServices);/code during the Delegate constructor, and it came up 'undefined'. I tried a creationComplete and an Initialize event to dump siteDataServices upon startup of the main mxml file. Both had this to say: [INFO]: (Object) log: (Object) level: 1 (Number) name: RemoteObject_AMF (String) __conn: (Object) contentType: application/x-fcs (String) _headerAdded: false (Boolean) _config: (Object) m_debug: true (Boolean) app_server: (Object) coldfusion: true (Boolean) amfheaders: false (Boolean) amf: false (Boolean) httpheaders: false (Boolean) recordset: true (Boolean) error: true (Boolean) trace: true (Boolean) _debug: true (Boolean) realtime_server: (Object) trace: true (Boolean) _debug: true (Boolean) client: (Object) rtmp: true (Boolean) http: true (Boolean) recordset: true (Boolean) trace: true (Boolean) _debug: true (Boolean) _debug: true (Boolean) _protocol: http (String) _id: 0 (Number) netDebugProxyFunctions: true (Boolean) _allowRes: true (Boolean) __serviceName: com.foo.test.business.SiteMaintenanceDelegate (String) __responder: (Object) __obj: undefined (undefined) __onFault: _resp5_fault (String) __onResult: _resp5_result (String) __name: siteDataServices (String) __showBusyCursor: true (Boolean) __concurrency: 0 (Number) __parentDocument: undefined (undefined) Looks like it's available at both initialization and creationComplete time frames. I'm curious why the examples taken from the books website would prove to be this difficult to implement. When you say pass the service to your delegate constructor as a parameter, do you mean as a string? Like the following: public function ReviewKeywordsCommand() { this.delegate = new SDMDelegate( this, mx.core.Application.\ application.myServices.siteDataServices ); } sorry if these are really basic questions, but I'm new to RIA development. Thanks, Geoff --- In flexcoders@yahoogroups.com, Doug Lowder [EMAIL PROTECTED] wrote: The parentApplication property is a reference to the Application object (the nesting refers to applications loaded within other applications with the Loader control and probably doesn't apply to your case), but it's a property of mx.core.UIObject, which your SDMDelegate obviously isn't extending and probably shouldn't. Have you tried dumping mx.core.Application.application.myServices in the delegate constructor to see if it exists at that point? You could also try adding a creationComplete event to the application to determine exactly when the siteDataServices remote object is available; something like creationComplete=Dumper.dump(myServices.siteDataServices) should do it. It might be your best bet to pass the service to your delegate constructor as a parameter. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: Hmm I replaced the service assignment with: this.service = parentApplication.myServices.siteDataServices; But I get the following error: There is no property with the name 'parentApplication'. Looking at the docs, parentApplication looks like it's intended to walk up the tree of multiple application nested within themselves. I don't think that applys to this case since I only have 1 mxml file with the mx:Application tag. Please correct me if I've misunderstood this. Thanks, Geoff --- In flexcoders@yahoogroups.com, Doug Lowder douglowder@ wrote: My guess would be that SDMDelegate's constructor can't access your siteDataServices RemoteObject through mx.core.Application.application. Try this.service = parentApplication.myServices.siteDataServices instead, or pass the service as a parameter to the constructor as you do with the responder. Doug --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I've been trying for the last few days to get RemoteObject to work, but with little luck. I've searched this site, and have tried to implement the examples found in developing rich clients with macromedia FLEX. To make matters more confusing, I've also tried to implement the command/control/delegate patterns that the above book advocates. Basically, I think the problem is that I'm not seeing the Java classes I've created. Below are code snippets of (what I think) are the relevant files. ### My Java classes ### {TOMCAT-HOME}\webapps\flex\WEB- INF\classes\com
[flexcoders] Re: RemoteObject Issue
How crazy is this! I took your advise and moved a few things around. In my Unit test file I changed it to: mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml xmlns:sdm=sdm.* xmlns:services=services.* services:Services id=myServices/ ---changed sdm:SiteDataMaint/ ---changed /mx:Application Basically just swapping the order of the services and sdm tag made it work. Thanks for all your efforts Doug! Geoff --- In flexcoders@yahoogroups.com, Doug Lowder [EMAIL PROTECTED] wrote: It seems like siteDataServices hasn't been created at the time the SMDelegate constructor is being called. You'll need to dig through your code to find out why, e.g. check where you're calling ReviewKeywordsCommand(), and possibly call the constructor at some other point when you know the remote object has been created. Regarding parameter passing, the constructor example you gave is exactly what I had in mind. The value you're passing isn't a string though, it's a reference to the RemoteObject that you gave the id siteDataServices to. Personally, I'd probably pass the service as a parameter, but as long as the delegate constructor is called only after you know the service object exists, either way should work. I hope this helps, and another thing to note is that the work you're doing now to implement these design patterns will pay off down the road - especially if you're implementing a large-scale app. Doug --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I tried to dump myServices via: codeDumper.dump (mx.core.Application.application.myServices);/code during the Delegate constructor, and it came up 'undefined'. I tried a creationComplete and an Initialize event to dump siteDataServices upon startup of the main mxml file. Both had this to say: [INFO]: (Object) log: (Object) level: 1 (Number) name: RemoteObject_AMF (String) __conn: (Object) contentType: application/x-fcs (String) _headerAdded: false (Boolean) _config: (Object) m_debug: true (Boolean) app_server: (Object) coldfusion: true (Boolean) amfheaders: false (Boolean) amf: false (Boolean) httpheaders: false (Boolean) recordset: true (Boolean) error: true (Boolean) trace: true (Boolean) _debug: true (Boolean) realtime_server: (Object) trace: true (Boolean) _debug: true (Boolean) client: (Object) rtmp: true (Boolean) http: true (Boolean) recordset: true (Boolean) trace: true (Boolean) _debug: true (Boolean) _debug: true (Boolean) _protocol: http (String) _id: 0 (Number) netDebugProxyFunctions: true (Boolean) _allowRes: true (Boolean) __serviceName: com.foo.test.business.SiteMaintenanceDelegate (String) __responder: (Object) __obj: undefined (undefined) __onFault: _resp5_fault (String) __onResult: _resp5_result (String) __name: siteDataServices (String) __showBusyCursor: true (Boolean) __concurrency: 0 (Number) __parentDocument: undefined (undefined) Looks like it's available at both initialization and creationComplete time frames. I'm curious why the examples taken from the books website would prove to be this difficult to implement. When you say pass the service to your delegate constructor as a parameter, do you mean as a string? Like the following: public function ReviewKeywordsCommand() { this.delegate = new SDMDelegate( this, mx.core.Application.\ application.myServices.siteDataServices ); } sorry if these are really basic questions, but I'm new to RIA development. Thanks, Geoff --- In flexcoders@yahoogroups.com, Doug Lowder douglowder@ wrote: The parentApplication property is a reference to the Application object (the nesting refers to applications loaded within other applications with the Loader control and probably doesn't apply to your case), but it's a property of mx.core.UIObject, which your SDMDelegate obviously isn't extending and probably shouldn't. Have you tried dumping mx.core.Application.application.myServices in the delegate constructor to see if it exists at that point? You could also try adding a creationComplete event to the application to determine exactly when the siteDataServices remote object is available; something like creationComplete=Dumper.dump(myServices.siteDataServices) should do it. It might be your best bet to pass the service to your delegate constructor as a parameter. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: Hmm I replaced the service assignment with: this.service = parentApplication.myServices.siteDataServices; But I get the following error: There is no property with the name 'parentApplication'. Looking at the docs, parentApplication looks like it's intended to walk up the tree of multiple application nested within themselves. I don't think that applys
[flexcoders] asdoc help
I'm trying to use asdoc (from Adobe Labs http://labs.adobe.com/wiki/index.php/ASDoc ) to document our API. I'm running across the following error: C:\workspace\components\tools\RubberbandTool.mxml: Error: Unable to locate specified base class 'components.tools.Tool' for component class 'RubberbandTool'. Tool.mxml is a custom class that is based off of the Button class as seen below: mx:Button xmlns:mx=http://www.adobe.com/2006/mxml; styleName=Tool toggle=true click=toolChanged(event) RubberbandTool.mxml is based on Tool.mxml as seen below: tool:Tool xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:tool=components.tools.* I'm not really sure how to go about fixing this since it seems that asdoc is having issues finding the Tool class, yet it will create asdoc's for the Tool class just fine. Below is the asdoc command I'm using: C:\ asdoc -source-path C:\workspace\components\tools\ -doc-classes RubberbandTool Thanks in advance, Geoff
[flexcoders] Re: Box layout question - two children with 100% width
--- In flexcoders@yahoogroups.com, Collin Peters [EMAIL PROTECTED] wrote: I am having some layout problems in my app. It is fairly complex with many levels of nesting of panels, viewstacks, boxes, etc... In the end I have an HBox with a width of '100%'. I assume this means take up 100% of the width of the parent. Inside the HBox I have three components. A VBox on either side, and a VRule in the middle (as a separator line). I want each of these VBoxes on the side to take up 50% of the parent. If their content doesn't fit, then scrollbars should appear in that VBox. What I am finding is that I cannot get this to happen. If the content of the left VBox is larger than 50%, it just expands and takes up as much room as it pleases, forcing scrollbars onto a parent way up in the stack. How do I force two children of a box to take up 50% of the parent? I have tried 100% for the children and 50% for the children and neither seems to make a difference -- Collin Peters Lead Software Developer InTouch Technology I would try using a Canvas to surround the 2 VBoxes and the VRule. Their positioning will be absolute within the Canvas. Geoff
[flexcoders] Nested Repeater Issues
I have a Repeater of CheckBoxes, which may or may not have a sublayer of CheckBoxes. It should look something like: [] archive 1 [] archive 2 [] dataSource 1 [] dataSource 2 [] dataSource 3 [] archive 3 By default all CheckBoxes are unselected, and any sublayer CheckBoxes are not enabled. If you select a CheckBox(archive 2) that has sublayer CheckBoxes (dataSource 1- 3), they are enabled. If you unselect a CheckBox that has sublayer CheckBoxes, they are disabled and unselected. I'm using the Cairngorm framework, so the call results from the database are returned to my model. This model is used as the dataProvider for the Repeater. The issue is that I can not update my model and have the sublayer Repeater update properly. For example, if there are three sublayer CheckBoxes (like above), selecting the parent CheckBox (archive 2) will enable only the first 2 sublayer CheckBoxes (dataSource 1 2). Then deselecting the parent CheckBox will disable the first 2 sublayer CheckBoxes, but enable the third (dataSource 3). From this point on the enabled property for dataSource 12 will be in a opposite state from dataSource 3. Below are code snippets: Library.mxml: mx:Repeater id=archiveRepeater dataProvider={__model.archiveElements} mx:CheckBox id=archive label={archiveRepeater.currentItem.archiveName} click=__model.archiveChanged(event)/ mx:Repeater id=dataSourceRepeater dataProvider= {archiveRepeater.currentItem.archiveDataRepositories} mx:CheckBox id=dataSource label={dataSourceRepeater.currentItem.repositoryName} enabled={dataSourceRepeater.currentItem.enabled} selected={dataSourceRepeater.currentItem.selected} click=__model.dataSourceChanged(event) /mx:CheckBox /mx:Repeater /mx:Repeater LibraryModel.as: public function archiveChanged( event:MouseEvent ):void { var selectionChoice:Boolean = event.target.selected; var selectionName:String = event.target.label; var al:ArchiveLocation = ArchiveLocation(event.target.getRepeaterItem()); al.selected = selectionChoice; // Go through any data repositories // and toggle their enabled property if (al.archiveDataRepositories != null) { var adr:Array = al.archiveDataRepositories; if (selectionChoice == false) { // Deselect and disable all CheckBoxes for (var i:uint = 0; i adr.length; i++) { // Update the model adr[i].selected = false; adr[i].enabled = false; } else { // Enable all CheckBoxes for (i = 0; i adr.length; i++) { adr[i].enabled = true; } } } } } As you can tell, there are ValueObjects that store the enabled and selected attributes for the dataSource CheckBoxes. What's even weirder, is that the ValueObjects that make up the dataProvider for the Repeater are updated correctly (their selected and enabled properties), but the last CheckBox of any sublayer remains in a state that is opposite of the other grouped sublayer CheckBoxes. I've gotten around this by directly updating the display by using: event.target.document.dataSource[i][j].enabled = false; But I don't want to rely on this as it will cause issues later on. I feel that I should be able to update the dataProvider for the various Repeaters and this should update the display properly. Any suggestions would be greatly appreciated. ~Geoff~
[flexcoders] Re: Nested Repeater Issues
Bump --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: I have a Repeater of CheckBoxes, which may or may not have a sublayer of CheckBoxes. It should look something like: [] archive 1 [] archive 2 [] dataSource 1 [] dataSource 2 [] dataSource 3 [] archive 3 By default all CheckBoxes are unselected, and any sublayer CheckBoxes are not enabled. If you select a CheckBox(archive 2) that has sublayer CheckBoxes (dataSource 1- 3), they are enabled. If you unselect a CheckBox that has sublayer CheckBoxes, they are disabled and unselected. I'm using the Cairngorm framework, so the call results from the database are returned to my model. This model is used as the dataProvider for the Repeater. The issue is that I can not update my model and have the sublayer Repeater update properly. For example, if there are three sublayer CheckBoxes (like above), selecting the parent CheckBox (archive 2) will enable only the first 2 sublayer CheckBoxes (dataSource 1 2). Then deselecting the parent CheckBox will disable the first 2 sublayer CheckBoxes, but enable the third (dataSource 3). From this point on the enabled property for dataSource 12 will be in a opposite state from dataSource 3. Below are code snippets: Library.mxml: mx:Repeater id=archiveRepeater dataProvider={__model.archiveElements} mx:CheckBox id=archive label={archiveRepeater.currentItem.archiveName} click=__model.archiveChanged(event)/ mx:Repeater id=dataSourceRepeater dataProvider= {archiveRepeater.currentItem.archiveDataRepositories} mx:CheckBox id=dataSource label={dataSourceRepeater.currentItem.repositoryName} enabled={dataSourceRepeater.currentItem.enabled} selected={dataSourceRepeater.currentItem.selected} click=__model.dataSourceChanged(event) /mx:CheckBox /mx:Repeater /mx:Repeater LibraryModel.as: public function archiveChanged( event:MouseEvent ):void { var selectionChoice:Boolean = event.target.selected; var selectionName:String = event.target.label; var al:ArchiveLocation = ArchiveLocation(event.target.getRepeaterItem()); al.selected = selectionChoice; // Go through any data repositories // and toggle their enabled property if (al.archiveDataRepositories != null) { var adr:Array = al.archiveDataRepositories; if (selectionChoice == false) { // Deselect and disable all CheckBoxes for (var i:uint = 0; i adr.length; i++) { // Update the model adr[i].selected = false; adr[i].enabled = false; } else { // Enable all CheckBoxes for (i = 0; i adr.length; i++) { adr[i].enabled = true; } } } } } As you can tell, there are ValueObjects that store the enabled and selected attributes for the dataSource CheckBoxes. What's even weirder, is that the ValueObjects that make up the dataProvider for the Repeater are updated correctly (their selected and enabled properties), but the last CheckBox of any sublayer remains in a state that is opposite of the other grouped sublayer CheckBoxes. I've gotten around this by directly updating the display by using: event.target.document.dataSource[i][j].enabled = false; But I don't want to rely on this as it will cause issues later on. I feel that I should be able to update the dataProvider for the various Repeaters and this should update the display properly. Any suggestions would be greatly appreciated. ~Geoff~
[flexcoders] Getting Parent's Style
I'm converting some Flex1.5 code to flex 2.0. One of the classes (a commonly used custom component) uses the following to set the background color to that of the parent container: __labelCanvas.setStyle(backgroundColor)=_parent.getStyle(backgroundCo\ lor); This doesn't work in Flex2.0, nor does parent.getStyle(backgroundColor); How can I get a style attribute of a parent container? BTW, I can't just let it be transparent because I need to obscure some drawn graphic elements of the parent, but I want __labelCanvas to have the same background color as the parent. Also, the parent might not always be the same color, else I would set a CSS descriptor for it. Thanks, GT
[flexcoders] Re: Getting Parent's Style
Alex, Thanks for the heads-up. I was on that path as I was looking up what type 'parent' was. Actually, I couldn't just assume parent would have backgroundColor set. Sometimes it was 2 or 3 parents up the chain where backgroundColor was set. So, I ended up with this: code var bgColor:* = undefined; var currentParent:* = this.parent; // This should loop through until it hits the top-most application. // Hopefully this will prevent infinite looping. while(currentParent is IStyleClient) { bgColor = IStyleClient(currentParent).getStyle(backgroundColor); if (StyleManager.isValidStyleValue(bgColor)) { __labelCanvas.setStyle(backgroundColor, bgColor); break; } else { currentParent = currentParent.parent; } } /code I typed bgColor as * because if I used uint, it always returned 0 (zero) if getStyle() didn't find anything. This caused isValidStyleValue() to return a false true since 0 is a valid uint value. Thanks for the help, GT --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Parent is of type DisplayObjectContainer which does not have getStyle. So you have to cast: (parent as IStyleClient).getStyle(backgroundColor); Or IStyleClient(parent).getStyle(backgroundColor); From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Tuesday, May 15, 2007 10:10 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Getting Parent's Style I'm converting some Flex1.5 code to flex 2.0. One of the classes (a commonly used custom component) uses the following to set the background color to that of the parent container: __labelCanvas.setStyle(backgroundColor)=_parent.getStyle(backgroundCo lor); This doesn't work in Flex2.0, nor does parent.getStyle(backgroundColor); How can I get a style attribute of a parent container? BTW, I can't just let it be transparent because I need to obscure some drawn graphic elements of the parent, but I want __labelCanvas to have the same background color as the parent. Also, the parent might not always be the same color, else I would set a CSS descriptor for ! it. Thanks, GT
[flexcoders] Does Drag Drop Only Update the DataProvider?
I have a DataGrid that has a dataProvider bound to an ArrayCollection. code mx:DataGrid id=dgEmployees dataProvider={__employees} ... /code I also have another DataGrid (dgAllEmployees) that is within a popup, which I use as a source for Drag Drop operations to populate the dgEmployee dataGrid. What I've noticed is that when I drag drop employees from the all employees DataGrid to the employees DataGrid, it seems to only update the dataProvider of dgEmployees, and not the ArrayCollection __employees. Why is this? Below is a snip of my drag drop code where it actually copies the data. This is a generic method that is used all over the application. code public static function doDragDrop( event:DragEvent ):void { // Prevent the default event from happening. event.preventDefault(); // Get drop target var dropTarget:DataGrid = DataGrid(event.currentTarget); // Get the dragged items from the drag initiator. var dropItems:Array = event.dragSource.dataForFormat(items) as Array; // Add each item to the drop target. for (var i:uint = 0; i dropItems.length; i++) { var dest:IList = IList(dropTarget.dataProvider); if (!contains(dest, dropItems[i])) { dest.addItem(dropItems[i]); } } } /code I think that I had event.preventDefault(); in there because it was putting 2 of each dropped item in the dgEmployee DataGrid. Might this be messing something up? Also, contains() is a custom method to compare the source items to what's in the target's list to prevent duplicates. Is there a better way to do this? Thanks in advance. GT
[flexcoders] Re: Does Drag Drop Only Update the DataProvider?
I don't have the code in front of me right now, but to be more precise, dgEmployees is not broadcasting a change event upon a DD action. I want dgEmployees to broadcast an event every time there is a change to the DataGrid. The dgEmployees DataGrid has a change event method defined, somthing like: code mx:DataGrid id=dgEmployees dataProvider={__employees} change=broadcastEvent(event) ... /code The broadcastEvent() method constructs a custom event containing the number of elements in the DataGrid, and then dispatches it to be used elsewhere. Now, as I type this, I see that I might have keyed off the wrong event, change. Not sure if that is broadcast upon a change in the dataProvider, BUT I had been working on this code previously (converting to Flex 2.0), and I believe that I saw this same issue. I noticed that when I used the debugger to step throught the doDragDrop() method, I was seeing that only the dataProvider was being updated, and not the ArrayCollection. I can't verify this until Monday (5/21), but I'm almost 100% sure this is what I saw. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: How do you know it didn't update __employees? Can you post a mini-example in a couple of screenfuls of text? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Thursday, May 17, 2007 6:11 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Does Drag Drop Only Update the DataProvider? I have a DataGrid that has a dataProvider bound to an ArrayCollection. code mx:DataGrid id=dgEmployees dataProvider={__employees} ... /code I also have another DataGrid (dgAllEmployees) that is within a popup, which I use as a source for Drag Drop operations to populate the dgEmployee dataGrid. What I've noticed is that when I drag drop employees from the all employees DataGrid to the employees DataGrid, it seems to only update the dataProvider of dgEmployees, and not the ArrayCollection __employees. Why is this? Below is a snip of my drag drop code where it actually copies the data. This is a generic method that is used all over the application. code public static function doDragDrop( event:DragEvent ):void { // Prevent the default event from happening. event.preventDefault(); // Get drop target var dropTarget:DataGrid = DataGrid(event.currentTarget); // Get the dragged items from the drag initiator. var dropItems:Array = event.dragSource.dataForFormat(items) as Array; // Add each item to the drop target. for (var i:uint = 0; i dropItems.length; i++) { var dest:IList = IList(dropTarget.dataProvider); if (!contains(dest, dropItems[i])) { dest.addItem(dropItems[i]); } } } /code I think that I had event.preventDefault(); in there because it was putting 2 of each dropped item in the dgEmployee DataGrid. Might this be messing something up? Also, contains() is a custom method to compare the source items to what's in the target's list to prevent duplicates. Is there a better way to do this? Thanks in advance. GT
[flexcoders] Re: Does Drag Drop Only Update the DataProvider?
collectionChange doesn't appear to be a valid DataGrid event, but I tried dataChanged, added, add, valueCommit, and updateComplete. None of these did what I wanted, and actually, I have verified that the __employees ArrayCollection does not update after a DD event. Looking through everything in debug mode, I'm seeing that the dataProvider of the DataGrid is updated after DD, but not the bound variable __employees. I wonder if it's how I declared the variable? I did it like so: code [Bindable] private var __employees:ArrayCollection; public function get employees():ArrayCollection { return __employees; } public function set employees( employees:ArrayCollection ):void { if (employees != null) { __employees = employees; } } /code Maybe I should just make it public? Nope, that didn't work. I'm also wondering if the event.preventDefault(); is messing something up. Nope, that just prevents the the base class ListBase from doing it's DD handling. Since this doesn't check for duplicates, I don't want to use it. I'm not sure what to do --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Mx:DataGrid's change event is for when selection changes, not when the collection changes. Could that be the issue? collectionChange may be what you want. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Friday, May 18, 2007 10:12 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Does Drag Drop Only Update the DataProvider? I don't have the code in front of me right now, but to be more precise, dgEmployees is not broadcasting a change event upon a DD action. I want dgEmployees to broadcast an event every time there is a change to the DataGrid. The dgEmployees DataGrid has a change event method defined, somthing like: code mx:DataGrid id=dgEmployees dataProvider={__employees} change=broadcastEvent(event) ... /code The broadcastEvent() method constructs a custom event containing the number of elements in the DataGrid, and then dispatches it to be used elsewhere. Now, as I type this, I see that I might have keyed off the wrong event, change. Not sure if that is broadcast upon a change in the dataProvider, BUT I had been working on this code previously (converting to Flex 2.0), and I believe that I saw this same issue. I noticed that when I used the debugger to step throught the doDragDrop() method, I was seeing that only the dataProvider was being updated, and not the ArrayCollection. I can't verify this until Monday (5/21), but I'm almost 100% sure this is what I saw. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: How do you know it didn't update __employees? Can you post a mini-example in a couple of screenfuls of text? From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Geoffrey Sent: Thursday, May 17, 2007 6:11 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Does Drag Drop Only Update the DataProvider? I have a DataGrid that has a dataProvider bound to an ArrayCollection. code mx:DataGrid id=dgEmployees dataProvider={__employees} ... /code I also have another DataGrid (dgAllEmployees) that is within a popup, which I use as a source for Drag Drop operations to populate the dgEmployee dataGrid. What I've noticed is that when I drag drop employees from the all employees DataGrid to the employees DataGrid, it seems to only update the dataProvider of dgEmployees, and not the ArrayCollection __employees. Why is this? Below is a snip of my drag drop code where it actually copies the data. This is a generic method that is used all over the application. code public static function doDragDrop( event:DragEvent ):void { // Prevent the default event from happening. event.preventDefault(); // Get drop target var dropTarget:DataGrid = DataGrid(event.currentTarget); // Get the dragged items from the drag initiator. var dropItems:Array = event.dragSource.dataForFormat(items) as Array; // Add each item to the drop target. for (var i:uint = 0; i dropItems.length; i++) { var dest:IList = IList(dropTarget.dataProvider); if (!contains(dest, dropItems[i])) { dest.addItem(dropItems[i]); } } } /code I think that I had event.preventDefault(); in there because it was putting 2 of each dropped item in the dgEmployee DataGrid. Might this be messing something up? Also, contains() is a custom method to compare the source items to what's in the target's list to prevent duplicates. Is there a better way to do this? Thanks in advance. GT
[flexcoders] Re: Does Drag Drop Only Update the DataProvider?
Why is binding to private variables not recommended? Should I bind to the employees pseudo property? I figured out why it wasn't working. Binding is one way. I'm binging the DataGrids dataProvider to the ArrayCollection, so only changes to the ArrayCollection would effect the dataProvider. It doesn't work the other way around (changes to the DataProvider updating the ArrayCollection). Somehow I seemed to have forgotten that fact. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: collectionChange is dispatched from the collection and not the DataGrid. Binding to private variables is not recommended, but not the problem either. Can you fit an entire example in two screens of text? If so, post it. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Monday, May 21, 2007 9:56 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Does Drag Drop Only Update the DataProvider? collectionChange doesn't appear to be a valid DataGrid event, but I tried dataChanged, added, add, valueCommit, and updateComplete. None of these did what I wanted, and actually, I have verified that the __employees ArrayCollection does not update after a DD event. Looking through everything in debug mode, I'm seeing that the dataProvider of the DataGrid is updated after DD, but not the bound variable __employees. I wonder if it's how I declared the variable? I did it like so: code [Bindable] private var __employees:ArrayCollection; public function get employees():ArrayCollection { return __employees; } public function set employees( employees:ArrayCollection ):void { if (employees != null) { __employees = employees; } } /code Maybe I should just make it public? Nope, that didn't work. I'm also wondering if the event.preventDefault(); is messing something up. Nope, that just prevents the the base class ListBase from doing it's DD handling. Since this doesn't check for duplicates, I don't want to use it. I'm not sure what to do --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Mx:DataGrid's change event is for when selection changes, not when the collection changes. Could that be the issue? collectionChange may be what you want. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Geoffrey Sent: Friday, May 18, 2007 10:12 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Does Drag Drop Only Update the DataProvider? I don't have the code in front of me right now, but to be more precise, dgEmployees is not broadcasting a change event upon a DD action. I want dgEmployees to broadcast an event every time there is a change to the DataGrid. The dgEmployees DataGrid has a change event method defined, somthing like: code mx:DataGrid id=dgEmployees dataProvider={__employees} change=broadcastEvent(event) ... /code The broadcastEvent() method constructs a custom event containing the number of elements in the DataGrid, and then dispatches it to be used elsewhere. Now, as I type this, I see that I might have keyed off the wrong event, change. Not sure if that is broadcast upon a change in the dataProvider, BUT I had been working on this code previously (converting to Flex 2.0), and I believe that I saw this same issue. I noticed that when I used the debugger to step throught the doDragDrop() method, I was seeing that only the dataProvider was being updated, and not the ArrayCollection. I can't verify this until Monday (5/21), but I'm almost 100% sure this is what I saw. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: How do you know it didn't update __employees? Can you post a mini-example in a couple of screenfuls of text? From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Geoffrey Sent: Thursday, May 17, 2007 6:11 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Does Drag Drop Only Update the DataProvider? I have a DataGrid that has a dataProvider bound to an ArrayCollection. code mx:DataGrid id=dgEmployees dataProvider={__employees} ... /code I also have another DataGrid (dgAllEmployees) that is within a popup, which I use
[flexcoders] Re: Does Drag Drop Only Update the DataProvider?
I read (Migrating Applications to Flex 2 by Adobe, page 108) that if you have private variables with getter/setter, you can omit the event name as the compiler would automatically generate an event named propertyChanged. What that example shows that I didn't do is it put the [Bindable] metadata tag before the getter method, not the variable declaration. I'll change that in the future. Regarding your last statement, I would like to think that the bound ArrayCollection would update if you specifically update the dataProvider of the DataGrid, but according to what I'm seeing in the debugger, that isn't the case. I wish it were... It would've made my life a lot easier. BTW, thanks for your help. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Binding just converts a variable into a property by wrapping in function get/set. The best practice to dispatch an event from the setter and declare the event name in the [Bindable] metadata. I thought there was a warning for binding to private, but maybe we got around it somehow. Binding is one way, but if the dg is bound to employees, the underlying array that got passed into the ArrayCollection should get modified when you drop into the dg. -Alex From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Monday, May 21, 2007 2:41 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Does Drag Drop Only Update the DataProvider? Why is binding to private variables not recommended? Should I bind to the employees pseudo property? I figured out why it wasn't working. Binding is one way. I'm binging the DataGrids dataProvider to the ArrayCollection, so only changes to the ArrayCollection would effect the dataProvider. It doesn't work the other way around (changes to the DataProvider updating the ArrayCollection). Somehow I seemed to have forgotten that fact. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: collectionChange is dispatched from the collection and not the DataGrid. Binding to private variables is not recommended, but not the problem either. Can you fit an entire example in two screens of text? If so, post it. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Geoffrey Sent: Monday, May 21, 2007 9:56 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Does Drag Drop Only Update the DataProvider? collectionChange doesn't appear to be a valid DataGrid event, but I tried dataChanged, added, add, valueCommit, and updateComplete. None of these did what I wanted, and actually, I have verified that the __employees ArrayCollection does not update after a DD event. Looking through everything in debug mode, I'm seeing that the dataProvider of the DataGrid is updated after DD, but not the bound variable __employees. I wonder if it's how I declared the variable? I did it like so: code [Bindable] private var __employees:ArrayCollection; public function get employees():ArrayCollection { return __employees; } public function set employees( employees:ArrayCollection ):void { if (employees != null) { __employees = employees; } } /code Maybe I should just make it public? Nope, that didn't work. I'm also wondering if the event.preventDefault(); is messing something up. Nope, that just prevents the the base class ListBase from doing it's DD handling. Since this doesn't check for duplicates, I don't want to use it. I'm not sure what to do --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Mx:DataGrid's change event is for when selection changes, not when the collection changes. Could that be the issue? collectionChange may be what you want. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Geoffrey Sent: Friday, May 18, 2007 10:12 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Does Drag Drop Only Update the DataProvider? I don't have the code in front of me right now, but to be more precise, dgEmployees is not broadcasting a change event upon a DD action. I want dgEmployees to broadcast an event every time there is a change to the DataGrid. The dgEmployees DataGrid has a change
[flexcoders] Nested classes picking up CSS
Here's the basic setup. On display 1 there is Panel A, on display 2 there is Panel B. Both Panels contain 'CommonPanel'. Using an external CSS file, how can I get CommonPanel to have different styles? I tried something like: Display_1.mxml mx:Panel id=panelA styleName=level1 local:CommonPanel id=foo/ /mx:Panel Display_2.mxml mx:Panel id=panelB styleName=level2 local:CommonPanel id=foo2/ /mx:Panel CSS file .level1.Panel{ border-color: #FF; } .level2.Panel{ border-color: #00; } This is a very simplified version of the real code, where in the real code the CommonPanel is nested a few layers down. My basic goal is to have common components take on a different style depending on the parent it's contained within. I would like to set the parents style via styleName and have that propagate down through the children through something like: .styleA{} .styleA.Panel{} .styleA.DataGrid{} .styleA.CustomClass{} ...etc... Thanks in advance, Geoff
[flexcoders] Re: Nested classes picking up CSS
I guess it's imposibble Is there a good CSS reference in the Flex docs somewhere? I can't seem to find it. --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: Here's the basic setup. On display 1 there is Panel A, on display 2 there is Panel B. Both Panels contain 'CommonPanel'. Using an external CSS file, how can I get CommonPanel to have different styles? I tried something like: Display_1.mxml mx:Panel id=panelA styleName=level1 local:CommonPanel id=foo/ /mx:Panel Display_2.mxml mx:Panel id=panelB styleName=level2 local:CommonPanel id=foo2/ /mx:Panel CSS file .level1.Panel{ border-color: #FF; } .level2.Panel{ border-color: #00; } This is a very simplified version of the real code, where in the real code the CommonPanel is nested a few layers down. My basic goal is to have common components take on a different style depending on the parent it's contained within. I would like to set the parents style via styleName and have that propagate down through the children through something like: .styleA{} .styleA.Panel{} .styleA.DataGrid{} .styleA.CustomClass{} ...etc... Thanks in advance, Geoff
[flexcoders] Timeline Slider
I'm trying to figure out how to make a custom slider... at least I think it's going to be a custom slider. What I want is a slider that allows me to select a time range based on a 24 hour clock. Here are the requirements: -Two thums on the slider(min, max) -Min value of 00:00:00 -Max value of 23:59:59 The desired behavior is that if you move the min thumb to the right, it will increment the min value based on a clock (base-60 I guess). Also, moving the max thumb to the left will decrement the max value accordingly. The end result will be a time range (i.e. used to select all occurances of event X that lasted from 5 minutes to 4 hours and 30 minutes). I haven't been able to find anything in the API that seems to scream Go in this direction, so I was hoping someone might be able to clue me in. Thanks, Geoff -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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] AS to Java Translation Problems
ENV: Flex 1.5 served from WebSphere6.1 All of our Java objects used to use java.util.Date for date properties, but we had to convert them to java.util.Calendar. Since Flex 1.5 doesn't support mapping from AS Date to Java Calendar and vise versa, I came up with another way of doing it. Obviously it doesn't work, or else I wouldn't be here! :-P Here is some code: WorkgroupVO.as - This is the object I'm trying to send to Java import com.beans.common.*; class com.beans.WorkGroupVO { public var workGroupID:String; public var startDate:CalendarVO; public var endDate:CalendarVO; static var rc:Boolean = Object.registerClass(com.beans.WorkGroup, com.beans.WorkGroupVO); public function WorkGroupVO(){} } CalendarVO.as - My ActionScript Calendar object class com.beans.common.CalendarVO { public var time:Date; static var rc:Boolean = Object.registerClass(java.util.Calendar, com.beans.common.CalendarVO); public function CalendarVO(){} } Here's how I use the WorkgroupVO object that is returned from Java. This works. I'm populating a DateField with the supplied dates. public function set wg( wg:WorkgroupVO ):Void { ... availability.startDate = wg.startDate.time; availability.endDate = wg.endDate.time; ... } To save this information for an update, I use the following code: public function saveWorkgroup() { var newWg:WorkgroupVO = new WorkgroupVO(); newWg.groupName = tiGroupName.text; // Create a new CalendarVO and set it's time property to the selectedDate. var startCal:CalendarVO = new CalendarVO(); startCal.time = dfStartDate.selectedDate; newWg.startDate = startCal; var endCal:CalendarVO = new CalendarVO(); endCal.time = dfEndDate.selectedDate; newWg.endDate = endCal; ... // Pass newWg to my RemoteObject at this point } This does create a Calendar object that is mapped to java.util.Calendar according to Service Capture, but this is the error I'm getting: (Message #0 targetURI=/7/onStatus, responseURI=null) (Object #0) code = Server.Processing description = Cannot invoke method 'createWorkgroup'. type = flashgateway.GatewayException rootcause = (Object #1) code = null description = Could not set object null on class com.beans.Workgroup's method setStartDate type = flashgateway.translator.ASTranslationException level = error details = flashgateway.translator.ASTranslationException: Could not set object null on class com.beans.Workgroup's method setStartDate at flashgateway.translator.decoder.JavaBeanDecoder.decodeObject (JavaBeanDecoder.java:99) I believe I usually get this type of error when my AS objects don't jive with the Java Bean. Do you think my AS Calendar object isn't mapping to the Java.util.Calendar class properly? If this were true, then why do I receive data correctly? Also, for debugging purposes I have gateway-config logging set to Debug, and I'm using Service Capture to see the flow of data back and forth. I wish there was more detail coming back from the Flex Gateway in reguard to the actual mapping process (I saw there is a isDebug property in one of the flexgateway jars, but it's private). Anyone know of a way to get more information out of the FlexGateway??? Thanks in advance, Geoff -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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: AS to Java Translation Problems
No ideas? Is this something no one has tried before? --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: ENV: Flex 1.5 served from WebSphere6.1 All of our Java objects used to use java.util.Date for date properties, but we had to convert them to java.util.Calendar. Since Flex 1.5 doesn't support mapping from AS Date to Java Calendar and vise versa, I came up with another way of doing it. Obviously it doesn't work, or else I wouldn't be here! :-P Here is some code: WorkgroupVO.as - This is the object I'm trying to send to Java import com.beans.common.*; class com.beans.WorkGroupVO { public var workGroupID:String; public var startDate:CalendarVO; public var endDate:CalendarVO; static var rc:Boolean = Object.registerClass(com.beans.WorkGroup, com.beans.WorkGroupVO); public function WorkGroupVO(){} } CalendarVO.as - My ActionScript Calendar object class com.beans.common.CalendarVO { public var time:Date; static var rc:Boolean = Object.registerClass(java.util.Calendar, com.beans.common.CalendarVO); public function CalendarVO(){} } Here's how I use the WorkgroupVO object that is returned from Java. This works. I'm populating a DateField with the supplied dates. public function set wg( wg:WorkgroupVO ):Void { ... availability.startDate = wg.startDate.time; availability.endDate = wg.endDate.time; ... } To save this information for an update, I use the following code: public function saveWorkgroup() { var newWg:WorkgroupVO = new WorkgroupVO(); newWg.groupName = tiGroupName.text; // Create a new CalendarVO and set it's time property to the selectedDate. var startCal:CalendarVO = new CalendarVO(); startCal.time = dfStartDate.selectedDate; newWg.startDate = startCal; var endCal:CalendarVO = new CalendarVO(); endCal.time = dfEndDate.selectedDate; newWg.endDate = endCal; ... // Pass newWg to my RemoteObject at this point } This does create a Calendar object that is mapped to java.util.Calendar according to Service Capture, but this is the error I'm getting: (Message #0 targetURI=/7/onStatus, responseURI=null) (Object #0) code = Server.Processing description = Cannot invoke method 'createWorkgroup'. type = flashgateway.GatewayException rootcause = (Object #1) code = null description = Could not set object null on class com.beans.Workgroup's method setStartDate type = flashgateway.translator.ASTranslationException level = error details = flashgateway.translator.ASTranslationException: Could not set object null on class com.beans.Workgroup's method setStartDate at flashgateway.translator.decoder.JavaBeanDecoder.decodeObject (JavaBeanDecoder.java:99) I believe I usually get this type of error when my AS objects don't jive with the Java Bean. Do you think my AS Calendar object isn't mapping to the Java.util.Calendar class properly? If this were true, then why do I receive data correctly? Also, for debugging purposes I have gateway-config logging set to Debug, and I'm using Service Capture to see the flow of data back and forth. I wish there was more detail coming back from the Flex Gateway in reguard to the actual mapping process (I saw there is a isDebug property in one of the flexgateway jars, but it's private). Anyone know of a way to get more information out of the FlexGateway??? Thanks in advance, Geoff -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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: AS to Java Translation Problems
Could someone voice an opinion on this? Please. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: ENV: Flex 1.5 served from WebSphere6.1 All of our Java objects used to use java.util.Date for date properties, but we had to convert them to java.util.Calendar. Since Flex 1.5 doesn't support mapping from AS Date to Java Calendar and vise versa, I came up with another way of doing it. Obviously it doesn't work, or else I wouldn't be here! :-P Here is some code: WorkgroupVO.as - This is the object I'm trying to send to Java import com.beans.common.*; class com.beans.WorkGroupVO { public var workGroupID:String; public var startDate:CalendarVO; public var endDate:CalendarVO; static var rc:Boolean = Object.registerClass(com.beans.WorkGroup, com.beans.WorkGroupVO); public function WorkGroupVO(){} } CalendarVO.as - My ActionScript Calendar object class com.beans.common.CalendarVO { public var time:Date; static var rc:Boolean = Object.registerClass(java.util.Calendar, com.beans.common.CalendarVO); public function CalendarVO(){} } Here's how I use the WorkgroupVO object that is returned from Java. This works. I'm populating a DateField with the supplied dates. public function set wg( wg:WorkgroupVO ):Void { ... availability.startDate = wg.startDate.time; availability.endDate = wg.endDate.time; ... } To save this information for an update, I use the following code: public function saveWorkgroup() { var newWg:WorkgroupVO = new WorkgroupVO(); newWg.groupName = tiGroupName.text; // Create a new CalendarVO and set it's time property to the selectedDate. var startCal:CalendarVO = new CalendarVO(); startCal.time = dfStartDate.selectedDate; newWg.startDate = startCal; var endCal:CalendarVO = new CalendarVO(); endCal.time = dfEndDate.selectedDate; newWg.endDate = endCal; ... // Pass newWg to my RemoteObject at this point } This does create a Calendar object that is mapped to java.util.Calendar according to Service Capture, but this is the error I'm getting: (Message #0 targetURI=/7/onStatus, responseURI=null) (Object #0) code = Server.Processing description = Cannot invoke method 'createWorkgroup'. type = flashgateway.GatewayException rootcause = (Object #1) code = null description = Could not set object null on class com.beans.Workgroup's method setStartDate type = flashgateway.translator.ASTranslationException level = error details = flashgateway.translator.ASTranslationException: Could not set object null on class com.beans.Workgroup's method setStartDate at flashgateway.translator.decoder.JavaBeanDecoder.decodeObject (JavaBeanDecoder.java:99) I believe I usually get this type of error when my AS objects don't jive with the Java Bean. Do you think my AS Calendar object isn't mapping to the Java.util.Calendar class properly? If this were true, then why do I receive data correctly? Also, for debugging purposes I have gateway-config logging set to Debug, and I'm using Service Capture to see the flow of data back and forth. I wish there was more detail coming back from the Flex Gateway in reguard to the actual mapping process (I saw there is a isDebug property in one of the flexgateway jars, but it's private). Anyone know of a way to get more information out of the FlexGateway??? Thanks in advance, Geoff -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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: AS to Java Translation Problems
Doug, Our java objects need to have dates set to type Calendar. So are you suggesting that my ActionScript value objects have a setter/getter? Something like: class com.beans.WorkGroupVO { public var workGroupID:String; public var startDate:Date; public var endDate:Date;; static var rc:Boolean = Object.registerClass(com.beans.WorkGroup, com.beans.WorkGroupVO); public function CalendarVO() {} public set startDate( num:Number ):Void { startDate = new Date(num); } public get startDate():Number { return startDate.getTime(); } I don't think I quite get your meaning. Thanks, Geoff --- In flexcoders@yahoogroups.com, Doug Lowder [EMAIL PROTECTED] wrote: Geoffrey, you may or may not find this to be helpful but I've found it much easier to deal with times as longs than as instances of various date classes (java.util.Date, java.sql.Date, java.util.Calendar, etc). The timelong can be easily retrieved with date.getTime() or calendar.getTime().getTime(), and longs fit nicely on the AS side as well. When displaying time values in datagrids, for instance, I needed the timelong instead of the Date object in order to preserve the default sort behavior regardless of what type of string formatting was applied to the date. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: Could someone voice an opinion on this? Please. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: ENV: Flex 1.5 served from WebSphere6.1 All of our Java objects used to use java.util.Date for date properties, but we had to convert them to java.util.Calendar. Since Flex 1.5 doesn't support mapping from AS Date to Java Calendar and vise versa, I came up with another way of doing it. Obviously it doesn't work, or else I wouldn't be here! :-P Here is some code: WorkgroupVO.as - This is the object I'm trying to send to Java import com.beans.common.*; class com.beans.WorkGroupVO { public var workGroupID:String; public var startDate:CalendarVO; public var endDate:CalendarVO; static var rc:Boolean = Object.registerClass (com.beans.WorkGroup, com.beans.WorkGroupVO); public function WorkGroupVO(){} } CalendarVO.as - My ActionScript Calendar object class com.beans.common.CalendarVO { public var time:Date; static var rc:Boolean = Object.registerClass (java.util.Calendar, com.beans.common.CalendarVO); public function CalendarVO(){} } Here's how I use the WorkgroupVO object that is returned from Java. This works. I'm populating a DateField with the supplied dates. public function set wg( wg:WorkgroupVO ):Void { ... availability.startDate = wg.startDate.time; availability.endDate = wg.endDate.time; ... } To save this information for an update, I use the following code: public function saveWorkgroup() { var newWg:WorkgroupVO = new WorkgroupVO(); newWg.groupName = tiGroupName.text; // Create a new CalendarVO and set it's time property to the selectedDate. var startCal:CalendarVO = new CalendarVO(); startCal.time = dfStartDate.selectedDate; newWg.startDate = startCal; var endCal:CalendarVO = new CalendarVO(); endCal.time = dfEndDate.selectedDate; newWg.endDate = endCal; ... // Pass newWg to my RemoteObject at this point } This does create a Calendar object that is mapped to java.util.Calendar according to Service Capture, but this is the error I'm getting: (Message #0 targetURI=/7/onStatus, responseURI=null) (Object #0) code = Server.Processing description = Cannot invoke method 'createWorkgroup'. type = flashgateway.GatewayException rootcause = (Object #1) code = null description = Could not set object null on class com.beans.Workgroup's method setStartDate type = flashgateway.translator.ASTranslationException level = error details = flashgateway.translator.ASTranslationException: Could not set object null on class com.beans.Workgroup's method setStartDate at flashgateway.translator.decoder.JavaBeanDecoder.decodeObject (JavaBeanDecoder.java:99) I believe I usually get this type of error when my AS objects don't jive with the Java Bean. Do you think my AS Calendar object isn't mapping to the Java.util.Calendar class properly? If this were true, then why do I receive data correctly? Also, for debugging purposes I have gateway-config logging set to Debug, and I'm using Service Capture to see the flow of data back and forth. I wish there was more detail coming back from the Flex Gateway in reguard to the actual mapping process (I saw there is a isDebug property in one of the flexgateway jars, but it's private). Anyone know of a way to get more information out of the FlexGateway
[flexcoders] Re: AS to Java Translation Problems
As a follow-up, I was on track with my original thoughts. The error in the ActionScript code was registering CalendarVO to java.util.Calendar. It should have been java.util.GregorianCalendar. java.util.Calendar is an abstract class and doesn't have a public constructor. Would've been nice if I picked up on this earlier instead of banging my head against the monitor! --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: I gotcha. I'll pass this on to the server-side engineers and see what they think. Thanks! Geoff --- In flexcoders@yahoogroups.com, Doug Lowder douglowder@ wrote: It would be more like replacing the Date objects in your WorkGroupVO with vars of type Number, set to calendar.getTime().getTime() on the Java side. This may or may not be an option in your case, but it would completely avoid object conversion issues between Java and AS. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: Doug, Our java objects need to have dates set to type Calendar. So are you suggesting that my ActionScript value objects have a setter/getter? Something like: class com.beans.WorkGroupVO { public var workGroupID:String; public var startDate:Date; public var endDate:Date;; static var rc:Boolean = Object.registerClass (com.beans.WorkGroup, com.beans.WorkGroupVO); public function CalendarVO() {} public set startDate( num:Number ):Void { startDate = new Date(num); } public get startDate():Number { return startDate.getTime(); } I don't think I quite get your meaning. Thanks, Geoff --- In flexcoders@yahoogroups.com, Doug Lowder douglowder@ wrote: Geoffrey, you may or may not find this to be helpful but I've found it much easier to deal with times as longs than as instances of various date classes (java.util.Date, java.sql.Date, java.util.Calendar, etc). The timelong can be easily retrieved with date.getTime() or calendar.getTime().getTime(), and longs fit nicely on the AS side as well. When displaying time values in datagrids, for instance, I needed the timelong instead of the Date object in order to preserve the default sort behavior regardless of what type of string formatting was applied to the date. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: Could someone voice an opinion on this? Please. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: ENV: Flex 1.5 served from WebSphere6.1 All of our Java objects used to use java.util.Date for date properties, but we had to convert them to java.util.Calendar. Since Flex 1.5 doesn't support mapping from AS Date to Java Calendar and vise versa, I came up with another way of doing it. Obviously it doesn't work, or else I wouldn't be here! :-P Here is some code: WorkgroupVO.as - This is the object I'm trying to send to Java import com.beans.common.*; class com.beans.WorkGroupVO { public var workGroupID:String; public var startDate:CalendarVO; public var endDate:CalendarVO; static var rc:Boolean = Object.registerClass (com.beans.WorkGroup, com.beans.WorkGroupVO); public function WorkGroupVO(){} } CalendarVO.as - My ActionScript Calendar object class com.beans.common.CalendarVO { public var time:Date; static var rc:Boolean = Object.registerClass (java.util.Calendar, com.beans.common.CalendarVO); public function CalendarVO(){} } Here's how I use the WorkgroupVO object that is returned from Java. This works. I'm populating a DateField with the supplied dates. public function set wg( wg:WorkgroupVO ):Void { ... availability.startDate = wg.startDate.time; availability.endDate = wg.endDate.time; ... } To save this information for an update, I use the following code: public function saveWorkgroup() { var newWg:WorkgroupVO = new WorkgroupVO(); newWg.groupName = tiGroupName.text; // Create a new CalendarVO and set it's time property to the selectedDate. var startCal:CalendarVO = new CalendarVO(); startCal.time = dfStartDate.selectedDate; newWg.startDate = startCal; var endCal:CalendarVO = new CalendarVO(); endCal.time = dfEndDate.selectedDate; newWg.endDate = endCal; ... // Pass newWg to my RemoteObject at this point } This does create a Calendar object that is mapped to java.util.Calendar according to Service Capture, but this is the error I'm getting: (Message #0
[flexcoders] Passing values
I'm trying to pass the dimensions of the main window to a component for positioning of a popup. I keep getting the following error: Error /Main.mxml:18 The property being referenced does not have the static attribute. Here are some code snippets: -- Main.mxml -- mx:Panel title=Team Management width=1280 height=1024 id=mainBox ... local:teamList id=teamList width=400 height=100% ParentX={mainBox.x} ParentY={mainBox.y}/ -- teamList.mxml -- mx:Script ![CDATA[ import mx.managers.PopUpManager; var parentX:Number; var parentY:Number; var xPos:Number = parentX + 2; var yPos:Number = parentY + this.height + 5; var initObj:Object = {deferred:true, x:xPos, y:yPos}; function showWindow():Void { var popup:Object = PopUpManager.createPopUp(this, teamListModify, true, initObj); } ]] /mx:Script ... mx:Button label=Modify click=showWindow()/mx:Button I've looked around and I can't find a solution that helps me. I'm new to Flex, so I would appreciate a detailed explaination since I'm obviously not getting it. Thanks, GTB -- 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: Passing values
--- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: I'm trying to pass the dimensions of the main window to a component for positioning of a popup. I keep getting the following error: Error /Main.mxml:18 The property being referenced does not have the static attribute. Here are some code snippets: -- Main.mxml -- mx:Panel title=Team Management width=1280 height=1024 id=mainBox ... local:teamList id=teamList width=400 height=100% parentX={mainBox.x} parentY={mainBox.y}/ -- teamList.mxml -- mx:Script ![CDATA[ import mx.managers.PopUpManager; public var parentX:Number; public var parentY:Number; function showWindow():Void { var xPos:Number = parentX + 2; var yPos:Number = parentY + this.height + 5; var initObj:Object = {deferred:true, x:xPos, y:yPos}; var popup:Object = PopUpManager.createPopUp(this, teamListModify, true, initObj); } ]] /mx:Script ... mx:Button label=Modify click=showWindow()/mx:Button I've looked around and I can't find a solution that helps me. I'm new to Flex, so I would appreciate a detailed explaination since I'm obviously not getting it. Thanks, GTB Sorry, I posted some wrong code. I have fixed it above, but I still get the same error. Thanks, GTB -- 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: Passing values
Ugh!!! I was beatting my head over that. Thanks so much. GTB --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: You can't have a variable named the same as your class name because it thinks you're referring to the class. So change the id of your local:teamList. Matt -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Thursday, February 02, 2006 12:36 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Passing values --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I'm trying to pass the dimensions of the main window to a component for positioning of a popup. I keep getting the following error: Error /Main.mxml:18 The property being referenced does not have the static attribute. Here are some code snippets: -- Main.mxml -- mx:Panel title=Team Management width=1280 height=1024 id=mainBox ... local:teamList id=teamList width=400 height=100% parentX={mainBox.x} parentY={mainBox.y}/ -- teamList.mxml -- mx:Script ![CDATA[ import mx.managers.PopUpManager; public var parentX:Number; public var parentY:Number; function showWindow():Void { var xPos:Number = parentX + 2; var yPos:Number = parentY + this.height + 5; var initObj:Object = {deferred:true, x:xPos, y:yPos}; var popup:Object = PopUpManager.createPopUp(this, teamListModify, true, initObj); } ]] /mx:Script ... mx:Button label=Modify click=showWindow()/mx:Button I've looked around and I can't find a solution that helps me. I'm new to Flex, so I would appreciate a detailed explaination since I'm obviously not getting it. Thanks, GTB Sorry, I posted some wrong code. I have fixed it above, but I still get the same error. Thanks, GTB -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Deliver compiled actionscript
The flex application that we are delivering to a third party contains some propriatary actionscript. Is there a way to compile the actionscript or convert it to a format that can not be reverse engineered? Thanks. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Deliver compiled actionscript
--- In flexcoders@yahoogroups.com, Roger Gonzalez [EMAIL PROTECTED] wrote: The flex application that we are delivering to a third party contains some propriatary actionscript. Is there a way to compile the actionscript or convert it to a format that can not be reverse engineered? Thanks. Which version of Flex? You could do some mild obfuscation in 1.5, but not easily. There are no tools out yet for reverse engineering Flash 8.5 applications. Its a rather more difficult process. Still possible, though. You could fairly easily encrypt your proprietary executable code in a SWF, then load it on the client as an opaque blob of binary data, decrypt it on the client, then call Loader.loadBytes to run it. Since the decryption code would be in the client in the clear, you'd need to send the key over SSL or something. They could still intercept things, but it would be much much more difficult. Sadly, you've got a bunch of code to write to do this, we don't supply a code encryptor. The bits are in the client's hands, and they need some way of decrypting them to run the bits, so fundamentally, no matter how many levels of encoding you add, you're just looking at obfuscation. -rg Hmmm Not the answer I was looking for, but similar to what I was thinking. BTW, We're using Flex 1.5. You mentioned some ways of obfuscating the code -- 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] Item Renderer Not Updating
I have a List that is bound to an ArrayCollection. If I programaticly update the ArrayCollection, the itemRenderer fails to update as well. mx:List id=userList dataProvider={__resourceModel.userSummaries} selectable=false itemClick=onItemClick(event) itemRenderer=mx.controls.CheckBox width=100% height=100%/ __resourceModel.userSummaries is an ArrayCollection of ResourceItemModels which looks like: public class ResourceItemModel implements ModelLocator { public var username:String; public var firstName:String; public var lastName:String; // These are used by an itemRenderer public var label:String; public var selected:Boolean; } The List is a list of CheckBoxes with the username as the label. When someone selects one of the CheckBoxes, it go off and sets the 'selected' property of the specific ResourceItemModel to true. This part works just fine. After a certain user gesture, I want to set all selections back to false, then reselect any CheckBox selections that may have existed. This information comes from another model. The resetting of the CheckBoxes is in a loop that does: ResourceItemModel(userSummaries[i]).selected = false; This properly sets the models selected property to false, but the view does not update (ie. the CheckBox is still selected). How do I update the itemRender after I programmaticly update the dataProvider? Thanks, Geoff
[flexcoders] Re: Item Renderer Not Updating
I know there's got to be something simple that I'm overlooking, and I thought that I read something pertaining to this in the docs, but for the life of me I can't find it. Thanks for any suggestions, Geoff --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: I have a List that is bound to an ArrayCollection. If I programaticly update the ArrayCollection, the itemRenderer fails to update as well. mx:List id=userList dataProvider={__resourceModel.userSummaries} selectable=false itemClick=onItemClick(event) itemRenderer=mx.controls.CheckBox width=100% height=100%/ __resourceModel.userSummaries is an ArrayCollection of ResourceItemModels which looks like: public class ResourceItemModel implements ModelLocator { public var username:String; public var firstName:String; public var lastName:String; // These are used by an itemRenderer public var label:String; public var selected:Boolean; } The List is a list of CheckBoxes with the username as the label. When someone selects one of the CheckBoxes, it go off and sets the 'selected' property of the specific ResourceItemModel to true. This part works just fine. After a certain user gesture, I want to set all selections back to false, then reselect any CheckBox selections that may have existed. This information comes from another model. The resetting of the CheckBoxes is in a loop that does: ResourceItemModel(userSummaries[i]).selected = false; This properly sets the models selected property to false, but the view does not update (ie. the CheckBox is still selected). How do I update the itemRender after I programmaticly update the dataProvider? Thanks, Geoff
[flexcoders] Re: Item Renderer Not Updating
The ResourceModel class is [Bindable]. Is that what you're talking about? --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Unless the data object is [bindable], modifications to data objects must be accompanied by a call to itemUpdated on the collection. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Tuesday, November 13, 2007 8:40 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Item Renderer Not Updating I know there's got to be something simple that I'm overlooking, and I thought that I read something pertaining to this in the docs, but for the life of me I can't find it. Thanks for any suggestions, Geoff --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Geoffrey gtb104@ wrote: I have a List that is bound to an ArrayCollection. If I programaticly update the ArrayCollection, the itemRenderer fails to update as well. mx:List id=userList dataProvider={__resourceModel.userSummaries} selectable=false itemClick=onItemClick(event) itemRenderer=mx.controls.CheckBox width=100% height=100%/ __resourceModel.userSummaries is an ArrayCollection of ResourceItemModels which looks like: public class ResourceItemModel implements ModelLocator { public var username:String; public var firstName:String; public var lastName:String; // These are used by an itemRenderer public var label:String; public var selected:Boolean; } The List is a list of CheckBoxes with the username as the label. When someone selects one of the CheckBoxes, it go off and sets the 'selected' property of the specific ResourceItemModel to true. This part works just fine. After a certain user gesture, I want to set all selections back to false, then reselect any CheckBox selections that may have existed. This information comes from another model. The resetting of the CheckBoxes is in a loop that does: ResourceItemModel(userSummaries[i]).selected = false; This properly sets the models selected property to false, but the view does not update (ie. the CheckBox is still selected). How do I update the itemRender after I programmaticly update the dataProvider? Thanks, Geoff
[flexcoders] Re: Item Renderer Not Updating
The ResourceModel and ResourceItemModel classes are [Bindable]. Is that what you're talking about? Also, I was thinking that the 'selected' property of ResourceItemModel is not used for the 'selected' property of the CheckBox in the itemRenderer. The 'label' property of the model seems to work, but is 'selected' not the appropriate variable to use? Should it be something like 'data' perhapse? --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote: Unless the data object is [bindable], modifications to data objects must be accompanied by a call to itemUpdated on the collection. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Tuesday, November 13, 2007 8:40 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Item Renderer Not Updating I know there's got to be something simple that I'm overlooking, and I thought that I read something pertaining to this in the docs, but for the life of me I can't find it. Thanks for any suggestions, Geoff --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Geoffrey gtb104@ wrote: I have a List that is bound to an ArrayCollection. If I programaticly update the ArrayCollection, the itemRenderer fails to update as well. mx:List id=userList dataProvider={__resourceModel.userSummaries} selectable=false itemClick=onItemClick(event) itemRenderer=mx.controls.CheckBox width=100% height=100%/ __resourceModel.userSummaries is an ArrayCollection of ResourceItemModels which looks like: public class ResourceItemModel implements ModelLocator { public var username:String; public var firstName:String; public var lastName:String; // These are used by an itemRenderer public var label:String; public var selected:Boolean; } The List is a list of CheckBoxes with the username as the label. When someone selects one of the CheckBoxes, it go off and sets the 'selected' property of the specific ResourceItemModel to true. This part works just fine. After a certain user gesture, I want to set all selections back to false, then reselect any CheckBox selections that may have existed. This information comes from another model. The resetting of the CheckBoxes is in a loop that does: ResourceItemModel(userSummaries[i]).selected = false; This properly sets the models selected property to false, but the view does not update (ie. the CheckBox is still selected). How do I update the itemRender after I programmaticly update the dataProvider? Thanks, Geoff
[flexcoders] Re: Item Renderer Not Updating
I went and created a component as the itemRenderer, like this: mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=20 mx:CheckBox id=myCheckBox selectedField=selected label={data.label} x=0 y=0 height=20 width=100%/ /mx:Canvas As you can see I've set the selectedField property to selected, but that still doesn't seem to effect anything. If some of the CheckBoxes are selected, and the user does the correct gesture, I have a loop that sets the 'selected' property of the model to false. I expect that to deselect all of the CheckBoxes. Yea not happening. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Oh, maybe you need to set selectedField=selected From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Wednesday, November 14, 2007 8:37 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Item Renderer Not Updating The ResourceModel and ResourceItemModel classes are [Bindable]. Is that what you're talking about? Also, I was thinking that the 'selected' property of ResourceItemModel is not used for the 'selected' property of the CheckBox in the itemRenderer. The 'label' property of the model seems to work, but is 'selected' not the appropriate variable to use? Should it be something like 'data' perhapse? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Unless the data object is [bindable], modifications to data objects must be accompanied by a call to itemUpdated on the collection. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Geoffrey Sent: Tuesday, November 13, 2007 8:40 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Item Renderer Not Updating I know there's got to be something simple that I'm overlooking, and I thought that I read something pertaining to this in the docs, but for the life of me I can't find it. Thanks for any suggestions, Geoff --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Geoffrey gtb104@ wrote: I have a List that is bound to an ArrayCollection. If I programaticly update the ArrayCollection, the itemRenderer fails to update as well. mx:List id=userList dataProvider={__resourceModel.userSummaries} selectable=false itemClick=onItemClick(event) itemRenderer=mx.controls.CheckBox width=100% height=100%/ __resourceModel.userSummaries is an ArrayCollection of ResourceItemModels which looks like: public class ResourceItemModel implements ModelLocator { public var username:String; public var firstName:String; public var lastName:String; // These are used by an itemRenderer public var label:String; public var selected:Boolean; } The List is a list of CheckBoxes with the username as the label. When someone selects one of the CheckBoxes, it go off and sets the 'selected' property of the specific ResourceItemModel to true. This part works just fine. After a certain user gesture, I want to set all selections back to false, then reselect any CheckBox selections that may have existed. This information comes from another model. The resetting of the CheckBoxes is in a loop that does: ResourceItemModel(userSummaries[i]).selected = false; This properly sets the models selected property to false, but the view does not update (ie. the CheckBox is still selected). How do I update the itemRender after I programmaticly update the dataProvider? Thanks, Geoff
[flexcoders] Re: Item Renderer Not Updating
It's not picking it up. I did the following in my command class: for (var i:uint = 0; i data.result.length; i++) { // Get the current result and create a ResourceItemModel from it userSummaryVO = UserSummaryVO(data.result[i]); item = new ResourceItemModel(); item.firstName = userSummaryVO.firstName; item.lastName = userSummaryVO.lastName; item.username = userSummaryVO.username; item.selected = true; // Add the item to the model __model.userSummaries.addItem(item); } --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Set some selected props to true before assigning the dp to see if it is picking it up. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Wednesday, November 14, 2007 9:27 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Item Renderer Not Updating I went and created a component as the itemRenderer, like this: mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml width=100% height=20 mx:CheckBox id=myCheckBox selectedField=selected label={data.label} x=0 y=0 height=20 width=100%/ /mx:Canvas As you can see I've set the selectedField property to selected, but that still doesn't seem to effect anything. If some of the CheckBoxes are selected, and the user does the correct gesture, I have a loop that sets the 'selected' property of the model to false. I expect that to deselect all of the CheckBoxes. Yea not happening. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Oh, maybe you need to set selectedField=selected From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Geoffrey Sent: Wednesday, November 14, 2007 8:37 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Item Renderer Not Updating The ResourceModel and ResourceItemModel classes are [Bindable]. Is that what you're talking about? Also, I was thinking that the 'selected' property of ResourceItemModel is not used for the 'selected' property of the CheckBox in the itemRenderer. The 'label' property of the model seems to work, but is 'selected' not the appropriate variable to use? Should it be something like 'data' perhapse? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Unless the data object is [bindable], modifications to data objects must be accompanied by a call to itemUpdated on the collection. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Geoffrey Sent: Tuesday, November 13, 2007 8:40 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Item Renderer Not Updating I know there's got to be something simple that I'm overlooking, and I thought that I read something pertaining to this in the docs, but for the life of me I can't find it. Thanks for any suggestions, Geoff --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Geoffrey gtb104@ wrote: I have a List that is bound to an ArrayCollection. If I programaticly update the ArrayCollection, the itemRenderer fails to update as well. mx:List id=userList dataProvider={__resourceModel.userSummaries} selectable=false itemClick=onItemClick(event) itemRenderer=mx.controls.CheckBox width=100% height=100%/ __resourceModel.userSummaries is an ArrayCollection of ResourceItemModels which looks like: public class ResourceItemModel implements ModelLocator { public var username:String; public var firstName:String; public var lastName:String; // These are used by an itemRenderer public var label:String; public var selected:Boolean; } The List is a list of CheckBoxes with the username as the label. When someone selects one of the CheckBoxes, it go off and sets the 'selected' property of the specific ResourceItemModel to true. This part works just fine. After a certain user gesture, I want to set all selections back to false, then reselect any CheckBox selections that may have existed. This information
[flexcoders] Re: Item Renderer Not Updating
I need to correct my previous post with some changes I've made. I changed the model property to 'isSelected', and am binding that to the 'selected' property of the CheckBox like so: mx:CheckBox id=myCheckBox selected={data.isSelected} label={data.label} x=0 y=0 height=20 width=100%/ Now if I set some of the values to true in the command class listed below, it picks it up. So that is working, but if do the user gesture that is suppose to reset all values to false, that doesn't happen (even though the model is set correctly). Thanks for the help! --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: It's not picking it up. I did the following in my command class: for (var i:uint = 0; i data.result.length; i++) { // Get the current result and create a ResourceItemModel from it userSummaryVO = UserSummaryVO(data.result[i]); item = new ResourceItemModel(); item.firstName = userSummaryVO.firstName; item.lastName = userSummaryVO.lastName; item.username = userSummaryVO.username; item.selected = true; // Add the item to the model __model.userSummaries.addItem(item); } --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote: Set some selected props to true before assigning the dp to see if it is picking it up. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Wednesday, November 14, 2007 9:27 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Item Renderer Not Updating I went and created a component as the itemRenderer, like this: mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml width=100% height=20 mx:CheckBox id=myCheckBox selectedField=selected label={data.label} x=0 y=0 height=20 width=100%/ /mx:Canvas As you can see I've set the selectedField property to selected, but that still doesn't seem to effect anything. If some of the CheckBoxes are selected, and the user does the correct gesture, I have a loop that sets the 'selected' property of the model to false. I expect that to deselect all of the CheckBoxes. Yea not happening. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Oh, maybe you need to set selectedField=selected From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Geoffrey Sent: Wednesday, November 14, 2007 8:37 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Item Renderer Not Updating The ResourceModel and ResourceItemModel classes are [Bindable]. Is that what you're talking about? Also, I was thinking that the 'selected' property of ResourceItemModel is not used for the 'selected' property of the CheckBox in the itemRenderer. The 'label' property of the model seems to work, but is 'selected' not the appropriate variable to use? Should it be something like 'data' perhapse? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Unless the data object is [bindable], modifications to data objects must be accompanied by a call to itemUpdated on the collection. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Geoffrey Sent: Tuesday, November 13, 2007 8:40 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Item Renderer Not Updating I know there's got to be something simple that I'm overlooking, and I thought that I read something pertaining to this in the docs, but for the life of me I can't find it. Thanks for any suggestions, Geoff --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Geoffrey gtb104@ wrote: I have a List that is bound to an ArrayCollection. If I programaticly update the ArrayCollection, the itemRenderer fails to update as well. mx:List id=userList dataProvider={__resourceModel.userSummaries} selectable=false itemClick=onItemClick(event) itemRenderer=mx.controls.CheckBox width=100% height=100%/ __resourceModel.userSummaries is an ArrayCollection
[flexcoders] Re: Item Renderer Not Updating - Fixed
It's working! I think the key was to NOT use 'selected' as a property in the model, and I also added userList.invalidateList() before the section of code that sets all the CheckBoxes back to being deselected. Thanks for all teh help! --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Ok, next thing to see is if collectionChange events fire when the values are reset to false. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Wednesday, November 14, 2007 12:17 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Item Renderer Not Updating I need to correct my previous post with some changes I've made. I changed the model property to 'isSelected', and am binding that to the 'selected' property of the CheckBox like so: mx:CheckBox id=myCheckBox selected={data.isSelected} label={data.label} x=0 y=0 height=20 width=100%/ Now if I set some of the values to true in the command class listed below, it picks it up. So that is working, but if do the user gesture that is suppose to reset all values to false, that doesn't happen (even though the model is set correctly). Thanks for the help! --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Geoffrey gtb104@ wrote: It's not picking it up. I did the following in my command class: for (var i:uint = 0; i data.result.length; i++) { // Get the current result and create a ResourceItemModel from it userSummaryVO = UserSummaryVO(data.result[i]); item = new ResourceItemModel(); item.firstName = userSummaryVO.firstName; item.lastName = userSummaryVO.lastName; item.username = userSummaryVO.username; item.selected = true; // Add the item to the model __model.userSummaries.addItem(item); } --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Set some selected props to true before assigning the dp to see if it is picking it up. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Geoffrey Sent: Wednesday, November 14, 2007 9:27 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Item Renderer Not Updating I went and created a component as the itemRenderer, like this: mx:Canvas 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 width=100% height=20 mx:CheckBox id=myCheckBox selectedField=selected label={data.label} x=0 y=0 height=20 width=100%/ /mx:Canvas As you can see I've set the selectedField property to selected, but that still doesn't seem to effect anything. If some of the CheckBoxes are selected, and the user does the correct gesture, I have a loop that sets the 'selected' property of the model to false. I expect that to deselect all of the CheckBoxes. Yea not happening. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Oh, maybe you need to set selectedField=selected From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Geoffrey Sent: Wednesday, November 14, 2007 8:37 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Item Renderer Not Updating The ResourceModel and ResourceItemModel classes are [Bindable]. Is that what you're talking about? Also, I was thinking that the 'selected' property of ResourceItemModel is not used for the 'selected' property of the CheckBox in the itemRenderer. The 'label' property of the model seems to work, but is 'selected' not the appropriate variable to use? Should it be something like 'data' perhapse? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Unless the data object is [bindable], modifications to data objects must be accompanied by a call to itemUpdated on the collection. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com
[flexcoders] BlazeDS - Unknown destination error
I'm trying to get BlazeDS working with our existing Flex application. When the application starts and tried to subscribe to a publisher, I get the following error: [MessagingError message='Unknown destination 'userTopic'.'] at mx.messaging.config::ServerConfig$/getChannelSet() [C:\dev\enterprise_bali\frameworks\mx\messaging\config\ServerConfig.as:224] ... I have the topic defined in my messaging-config.xml file like this: destination id=userTopic/destination Not really sure what the deal is. I've converted our app to use the Flex 3 plugin for Eclipse, and that seems OK (not sure if I really needed to do this). The only thing I see is that the properties of the main flex project say Project is being compiled with Flex 3.0, but server has Flex 2.0.1 in the Flex Compiler section. Ummm, say what? Any help would be appreciated.
[flexcoders] Re: BlazeDS - Unknown destination error
I hate to say it, but I don't know how to do any of that. -- Point 1 -- [point] your compiler at the services-config.xml which defines those destinations Here are a couple lines of debug output from the console. I think I'm pointing to the correct config files. [Flex] [Configuration] BlazeDS - Community Edition: 3.0.0.353 [Flex] [Configuration] Endpoint my-streaming-amf created with security: None [Flex] [Startup.Destination] Destination with id 'userTopic' is ready (startup time: '0' ms) [Flex] [Startup.Service] Service with id 'message-service' is ready (startup time: '0' ms) [Flex] [Startup.MessageBroker] MessageBroker with id '__default__' is ready (startup time: '407' ms) So to me, that part of the configuration is correct. -- Point 2 -- define a channel set on the client and set the channelSet property on your service This is my code in main.mxml to define my consumer: mx:Consumer id=userConsumer destination=userTopic message=onUsersFeed(event)/ And the corresponding code in AS to subscribe to the destination. public function onCreationComplete():void { // Subscribe to destination userConsumer.subscribe(); } Am I doing something wrong here? I basically took this from one of the BlazeDS samples. -- Point 3 -- You can see what destinations are getting compiled into your app via the static variable: flex.messaging.config.ServerConfig.xml I don't know how to access this variable. Is this a Java variable? Thanks for the help, and sorry for me being so dense. Geoff --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: Make sure that either you are pointing your compiler at the services-config.xml which defines those destinations or you need to define a channel set on the client and set the channelSet property on your service. You can see what destinations are getting compiled into your app via the static variable: flex.messaging.config.ServerConfig.xml. That should be a subset of the info from services-config.xml if you are compiling stuff in. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Thursday, February 14, 2008 11:28 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] BlazeDS - Unknown destination error I'm trying to get BlazeDS working with our existing Flex application. When the application starts and tried to subscribe to a publisher, I get the following error: [MessagingError message='Unknown destination 'userTopic'.'] at mx.messaging.config::ServerConfig$/getChannelSet() [C:\dev\enterprise_bali\frameworks\mx\messaging\config\ServerConfig.as:2 24] ... I have the topic defined in my messaging-config.xml file like this: destination id=userTopic/destination Not really sure what the deal is. I've converted our app to use the Flex 3 plugin for Eclipse, and that seems OK (not sure if I really needed to do this). The only thing I see is that the properties of the main flex project say Project is being compiled with Flex 3.0, but server has Flex 2.0.1 in the Flex Compiler section. Ummm, say what? Any help would be appreciated.
[flexcoders] Re: BlazeDS - Unknown destination error - SOLVED
I honestly don't know how I fixed it. I reinstalled Apache, and the Flex 3 Eclipse plugin. Then ripped out every instance of Flex 2 I could find except for the flex-bootstrap-2.0.1.jar file (if I did that, nothing worked). Now I can receive a message published from our J2EE server. Thanks to Jeff for the help. Geoff --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: I'm less than thrilled with BlazeDS right now. running their canned examples is no problem, but try to integrate it into your app and it's a bitch! Our environment is Eclipse 3.2.2, Apache Tomcat 5.5.20, Flex Builder 3 Plug-in, Maven 2.0.5, WST 1.something. Regarding Point 1 below, I fixed my compiler argument. For the main Flex application, I navigated to the Flex Compiler properties and entered -services C:\workspace-blazeDS\flex\src\main\webapp\WEB- INF\flex\services-config.xml -locale en_US for my Additional Compiler Arguments. Previously, I had it pointing to a different workspace. On that same screen I see a warning: Project is being compiled with Flex 3.0, but server has Flex 2.0.1. How do I check what version of Flex the server is using? I've gone through and removed all Flex 2.0.1 related jars, but I seem to need the flex-bootstrap- 2.0.1.jar or else I get a bunch of errors upon server startup. Is this why I'm getting the warning message above? Is this why I can't seem to pass messages with BlazeDS? Is there a flex-bootstrap-3.0.jar? Not in the flex 3 distribution that I have. It was real nice of Adobe to clue us into the fact that BlazeDS requires Flex3. The only reason that I know this is because someone else had some problems and Jesse Warden found out from one of the Flex engineers that Flex 2.0.1 does not support BlazeDS. What other requirements are there that we don't know about? Sorry if I'm being harsh, but I've been screwing around with this for the last WEEK and can't get it to work. It shouldn't be this difficult. --- In flexcoders@yahoogroups.com, Jeff Vroom jvroom@ wrote: Sorry for the terse description - it's been a little busy here! For Point 1, the stuff you have there looks like the server itself is starting up fine. The issue is that when you compile your SWF, the tool you use to compile your SWF also should refer to the services-config.xml file. If you are using flex builder, there is a setting for that in your project properties. If you are requesting the MXML file directly from the browser (where the server compiles the mxml file to produce the SWF), this is in your flex-config.xml file. If you are compiling using ant or the command line compiler there is a -services option to the compiler. For Point 2, since you do not set the channelSet property on your Consumer component, you need to follow the step in point 1. There is another option where the client downloads the configuration for your destination from the server when it connects. But for that to work, you need to specify the URL to the server so it can connect in the first place. You do that with the channelSet property. For Point 3, you can see this by adding the MXML tag: mx:TraceTarget/ If you are using the debug player, you'll see some diagnostics in the flashlog.txt file. That gets buried in the user's home directory on windows under application data/macromedia/flash player/logs. Make sure you have the debug player though since the release player doesn't output trace information. You can also get to this property directly in actionscript with: import flex.messaging.config.ServerConfig; trace(ServerConfig.xml); Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Thursday, February 14, 2008 1:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: BlazeDS - Unknown destination error I hate to say it, but I don't know how to do any of that. -- Point 1 -- [point] your compiler at the services-config.xml which defines those destinations Here are a couple lines of debug output from the console. I think I'm pointing to the correct config files. [Flex] [Configuration] BlazeDS - Community Edition: 3.0.0.353 [Flex] [Configuration] Endpoint my-streaming-amf created with security: None [Flex] [Startup.Destination] Destination with id 'userTopic' is ready (startup time: '0' ms) [Flex] [Startup.Service] Service with id 'message-service' is ready (startup time: '0' ms) [Flex] [Startup.MessageBroker] MessageBroker with id '__default__' is ready (startup time: '407' ms) So to me, that part of the configuration is correct. -- Point 2 -- define a channel set on the client and set
[flexcoders] BlazeDS Subtopics from Java
I see plenty of examples of how to do subtopics all from MXML/AS code, but how to you create a message in Java that has a subtopic? Here are some code snippets: :::messaging-config.xml::: destination id=siteMessages properties server max-cache-size1000/max-cache-size allow-subtopicstrue/allow-subtopics subtopic-separator./subtopic-separator /server /properties channels channel ref=my-streaming-amf//channels /destination :::main.mxml::: mx:Script public function onCreationComplete():void { siteMessagesConsumer.destination = siteMessages; siteMessagesConsumer.subtopic = *; siteMessagesConsumer.subscribe(); } public function onSiteMessages( event:MessageEvent ):void { trace(Got it!); } /mx:Script mx:Consumer id=siteMessagesConsumer message=onSiteMessages(event)/ :::MyDelegate.java::: private void sendFlexMessage() throws MyException { MessageBroker msgBroker = MessageBroker.getMessageBroker(null); String clientID = UUIDUtils.createUUID(); // Generate a message AsyncMessage msg = new AsyncMessage(); msg.setDestination(siteMessages.allUsers); msg.setClientId(clientID); msg.setMessageId(UUIDUtils.createUUID()); msg.setTimestamp(System.currentTimeMillis()); msg.setBody(getSomeObject()); // Send a message msgBroker.routeMessageToService(msg, null); } The sendFlexMessage() method is called from somewhere else. This worked when my destination was just siteMessages. But I want to send subtopics like siteMessages.allUsers, siteMessages.allTeams, etc. I looked at the Java API for this stuff and saw nothing that jumped out like a setSubTopic() method, so I assumed that it was as simple as setting the destination to something.something. That seems to be the way they did it in the MXML/AS examples I saw, but when I try to send the message I get an error saying that there is no siteMessages.allUsers destination. Any suggestions would be appreciated.
[flexcoders] Plot Graph and One Plot Point
I have a PlotChart that uses a DateTimeAxis for the x, and a LinearAxis for the y. I get something strange when there is only one point to plot. The point renders fine on the chart, but the horizontal axis renderer only shows one date (1/1/70), and that's not the date of the plot point. I would imagine that it should be the same date as the plot point. Here's my horizontal axis renderer code: mx:horizontalAxis mx:DateTimeAxis baseAtZero=false dataUnits=milliseconds labelUnits=days/ /mx:horizontalAxis mx:horizontalAxisRenderer mx:AxisRenderer visible=true labelRotation=0 canStagger=false canDropLabels=true showLine=true/ /mx:horizontalAxisRenderer Any ideas? Thanks, Geoff
[flexcoders] Zero line drawn on plot chart
Is there a way to turn off the line that gets drawn to show where 0 (zero) is along the y axis? My y axis is a LinearAxis with a minimum less than 0 (zero). I have baseAtZero set to false, and autoAdjust set to false. Thanks, Geoff
[flexcoders] Re: Colouring the zero line on a chart axis
Yea, and I want to turn it off (or set it to the same color as the background). --- In flexcoders@yahoogroups.com, leonpidgeon [EMAIL PROTECTED] wrote: Hi i have a chart with where the y-axis is -200 to 200 and want to know if there is a way to change the look of the zero axis which runs across the middle of the chart. basically i want to make it red. does anyone have any ideas how this can be done. i have looked through rendering options and can't seem to find anything. thanks
[flexcoders] Re: Zero line drawn on plot chart
That property actually removes the thick light blue line that is drawn between the chart body and the actual axis labels. This is not the zero line. I'm using a PlotChart, so I've checked all of its properties and those of LinearAxis and DateTimeAxis. Nothing stands out. ~Geoff --- In flexcoders@yahoogroups.com, Doug Lowder [EMAIL PROTECTED] wrote: Check out the showLine style of AxisRenderer. Seems like showLine=false ought to do what you want. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: Is there a way to turn off the line that gets drawn to show where 0 (zero) is along the y axis? My y axis is a LinearAxis with a minimum less than 0 (zero). I have baseAtZero set to false, and autoAdjust set to false. Thanks, Geoff
[flexcoders] Re: Zero line drawn on plot chart
Yea, that was it! I'm sure you could color that line something other than blue for that other post. Thanks! Geoff --- In flexcoders@yahoogroups.com, Doug Lowder [EMAIL PROTECTED] wrote: I see what you mean. At least I think I do. Try this in your mx:PlotChart declaration: mx:backgroundElements mx:GridLines horizontalShowOrigin=false/ /mx:backgroundElements There are other options with the GridLines class that you may want or need to set as well. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: That property actually removes the thick light blue line that is drawn between the chart body and the actual axis labels. This is not the zero line. I'm using a PlotChart, so I've checked all of its properties and those of LinearAxis and DateTimeAxis. Nothing stands out. ~Geoff --- In flexcoders@yahoogroups.com, Doug Lowder douglowder@ wrote: Check out the showLine style of AxisRenderer. Seems like showLine=false ought to do what you want. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: Is there a way to turn off the line that gets drawn to show where 0 (zero) is along the y axis? My y axis is a LinearAxis with a minimum less than 0 (zero). I have baseAtZero set to false, and autoAdjust set to false. Thanks, Geoff
[flexcoders] Re: Setting Chart Origin
I do use the minimum property, but that doesn't mean it's the origin. I have a linear axis on the y axis and that has values that range from a negative to a positive and the origin line was drawn at 0 (zero). That wasn't my doing. I think you should be able to set the origin, especially if you have a non-zero based axis. Geoff --- In flexcoders@yahoogroups.com, Sunil Bannur [EMAIL PROTECTED] wrote: Use the minimum property of the Axis Thanks -Sunil From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Friday, February 29, 2008 9:37 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Setting Chart Origin I've looked at every property/method of PlotChart, DateTimeAxis, and a few other classes, and I don't see anything about setting the origin. Maybe it can't be done --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Geoffrey gtb104@ wrote: I removed a horizontal origin by doing this: mx:backgroundElements mx:GridLines horizontalShowOrigin=false/ /mx:backgroundElements But now I want to show the vertical origin, and set it to a specific date (since my horizontal axis is using a DateTimeAxis). Can this be done? Thanks, Geoff
[flexcoders] Re: Best practices for setting up large applications?
Yes, we use Maven to handle dependencies. We also use Cruiseconrol for automated builds, SVN for version control, and WTP for pushing all the stuff to our web server. So far, the all in one project sounds the best. --- In flexcoders@yahoogroups.com, VELO [EMAIL PROTECTED] wrote: U can use maven to help you to handle dependencies. http://code.google.com/p/israfil-mojo/ VELO On Fri, Feb 29, 2008 at 9:38 AM, Gregor Kiddie [EMAIL PROTECTED] wrote: We have 52 modules / libraries split roughly 1/3 to 2/3s, and a single main application. Dozens of views, and dozens of custom components. Our biggest problem is dependency management between the libraries and modules. There is frequent refactoring of a module to pull code out into a library when its identified as being needed. Full build, including generating vos, compiling java code, compiling flex code, and deploying to the server is roughly 16 minutes. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of tomeuchre Sent: 28 February 2008 23:03 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Best practices for setting up large applications? --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: We currently have a master project that links in 25 other projects to build our overall application. The problem with this is that there seems to be a lot of inner dependencies b/w the projects (i.e. one project is a collection of utilities, and several other projects use these utilities). Builds also seem to take forever when you change a project that is linked to many other projects. We initially thought that this would be a good way to set up our application so we could take out certain parts to customize our offerings to customers. Just not sure that it's really giving the advantages we initially thought. Any thought on this? I am looking for something similar: I want to get an idea of what some of the largest Flex apps ever built (and utilized on a routine basis) are. I have one with 11 different views, and about 35 components, and it is about 1.5mb to load. Anybody have examples of larger ones? If so, what kind of issues do you run into?
[flexcoders] Re: DateTimeAxis does not work correctly when minField set?
I thought that I read somewhere that Flex assumes 2 digit dates are based off of 1900. Try setting the dates in your xml file to 4 character dates(2007, 2008, and 2009). Geoff --- In flexcoders@yahoogroups.com, Nate Pearson [EMAIL PROTECTED] wrote: Bump again. Someone has to have run into this before. I appreciate any help. -Nate --- In flexcoders@yahoogroups.com, Nate Pearson napearson99@ wrote: Anyone? Bump. --- n flexcoders@yahoogroups.com, Nate Pearson napearson99@ wrote: hey, I'm trying to make some floating bars with dates. If minField is set under my bar series the dates come up at 1908 and 1909. If i remove minField the dates work correctly. Any ideas? Code below. Place the xml file in date/SampleData.xml. Try it once the way it is and once without the minField ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Model id=dataSet source=/data/sampleData.xml / mx:Panel height=100% width=100% mx:BarChart height=100% width=100% dataProvider={dataSet.Sample} mx:series mx:BarSeries xField=end minField=start/ /mx:series mx:horizontalAxis mx:DateTimeAxis id=chartDTAxis dataUnits=days / /mx:horizontalAxis mx:verticalAxis mx:CategoryAxis categoryField=desc/ /mx:verticalAxis /mx:BarChart /mx:Panel /mx:Application YearlyData Sample start=05/01/07 end=01/01/09 desc=Project/ Sample start=09/01/07 end=01/01/08 desc=Project/ Sample start=06/01/07 end=10/01/08 desc=Project/ Sample start=07/01/07 end=11/01/09 desc=Project/ Sample start=06/01/07 end=01/01/08 desc=Project/ Sample start=02/01/07 end=01/01/09 desc=Project/ Sample start=04/01/07 end=04/01/08 desc=Project/ Sample start=01/01/07 end=06/01/08 desc=Project/ Sample start=02/01/07 end=01/01/08 desc=Project/ Sample start=01/01/07 end=01/01/08 desc=Project/ /YearlyData
[flexcoders] Re: DateTimeAxis does not work correctly when minField set?
Try setting labelUnits=months on your DateTimeAxis. If that doesn't work, then I'm not sure what the answer is. Geoff --- In flexcoders@yahoogroups.com, Nate Pearson [EMAIL PROTECTED] wrote: Thanks for the reply! That worked, now it says 2008 and 2009. I set my dataUnits to months on my datetimeaxis. I still only see years though Is there a way to custom render the tick marks on that axis? Thanks! Nate --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I thought that I read somewhere that Flex assumes 2 digit dates are based off of 1900. Try setting the dates in your xml file to 4 character dates(2007, 2008, and 2009). Geoff --- In flexcoders@yahoogroups.com, Nate Pearson napearson99@ wrote: Bump again. Someone has to have run into this before. I appreciate any help. -Nate --- In flexcoders@yahoogroups.com, Nate Pearson napearson99@ wrote: Anyone? Bump. --- n flexcoders@yahoogroups.com, Nate Pearson napearson99@ wrote: hey, I'm trying to make some floating bars with dates. If minField is set under my bar series the dates come up at 1908 and 1909. If i remove minField the dates work correctly. Any ideas? Code below. Place the xml file in date/SampleData.xml. Try it once the way it is and once without the minField ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Model id=dataSet source=/data/sampleData.xml / mx:Panel height=100% width=100% mx:BarChart height=100% width=100% dataProvider={dataSet.Sample} mx:series mx:BarSeries xField=end minField=start/ /mx:series mx:horizontalAxis mx:DateTimeAxis id=chartDTAxis dataUnits=days / /mx:horizontalAxis mx:verticalAxis mx:CategoryAxis categoryField=desc/ /mx:verticalAxis /mx:BarChart /mx:Panel /mx:Application YearlyData Sample start=05/01/07 end=01/01/09 desc=Project/ Sample start=09/01/07 end=01/01/08 desc=Project/ Sample start=06/01/07 end=10/01/08 desc=Project/ Sample start=07/01/07 end=11/01/09 desc=Project/ Sample start=06/01/07 end=01/01/08 desc=Project/ Sample start=02/01/07 end=01/01/09 desc=Project/ Sample start=04/01/07 end=04/01/08 desc=Project/ Sample start=01/01/07 end=06/01/08 desc=Project/ Sample start=02/01/07 end=01/01/08 desc=Project/ Sample start=01/01/07 end=01/01/08 desc=Project/ /YearlyData
[flexcoders] Re: Setting Chart Origin
I've created a JIRA issue(Feature Request) for this. If anyone thinks this would be a useful feature, please vote for it. Issue number: FLEXDMV-1671 https://bugs.adobe.com/jira/browse/FLEXDMV-1671 Geoff --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: I do use the minimum property, but that doesn't mean it's the origin. I have a linear axis on the y axis and that has values that range from a negative to a positive and the origin line was drawn at 0 (zero). That wasn't my doing. I think you should be able to set the origin, especially if you have a non-zero based axis. Geoff --- In flexcoders@yahoogroups.com, Sunil Bannur sbannur@ wrote: Use the minimum property of the Axis Thanks -Sunil From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Friday, February 29, 2008 9:37 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Setting Chart Origin I've looked at every property/method of PlotChart, DateTimeAxis, and a few other classes, and I don't see anything about setting the origin. Maybe it can't be done --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Geoffrey gtb104@ wrote: I removed a horizontal origin by doing this: mx:backgroundElements mx:GridLines horizontalShowOrigin=false/ /mx:backgroundElements But now I want to show the vertical origin, and set it to a specific date (since my horizontal axis is using a DateTimeAxis). Can this be done? Thanks, Geoff
[flexcoders] Re: Can Flex 2.01 work with blazeds?
In Flex 2.0.1, the attribute is uri not url. You would probably also need to add the 'messageTypes' attribute to the service tag for: proxy-config.xml messaging-config.xml remoteingConfig.xml You'll see the values required in your Flex 2.0.1 config files. Geoff --- In flexcoders@yahoogroups.com, candysmate [EMAIL PROTECTED] wrote: I tried hooking up Flex 2.01 with the blazeds turnkey download and got unexpected attribute 'url' found in 'endpoint' from file: services- config.xml so .. er
[flexcoders] Re: BlazeDS Subtopics from Java - SOLVED
Trial and error solved this since I couldn't find any examples or documentation. The AsyncMessage object in the Java class needs to be set up like this: ... msg.setDestination(siteMessages); msg.setHeader(DSSubtopic, siteData.userSummary); ... siteMessages is the name of the destination set up in messaging- config.xml. You also need to specify a DSSubtopic in the AsyncMessage header. The Consumer(from AS or MXML) needs to have: siteMessagesConsumer.subtopic = siteData.*; I found out that you can't just specify userSummary in the DSSubtopic and set siteMessagesConsumer.subtopic = '*'. This resulted in an error when trying to actually publish a message. The subtopic must be nested, siteData.*. Hope this helps someone else. Geoff --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: I see plenty of examples of how to do subtopics all from MXML/AS code, but how to you create a message in Java that has a subtopic? Here are some code snippets: :::messaging-config.xml::: destination id=siteMessages properties server max-cache-size1000/max-cache-size allow-subtopicstrue/allow-subtopics subtopic-separator./subtopic-separator /server /properties channels channel ref=my-streaming-amf//channels /destination :::main.mxml::: mx:Script public function onCreationComplete():void { siteMessagesConsumer.destination = siteMessages; siteMessagesConsumer.subtopic = *; siteMessagesConsumer.subscribe(); } public function onSiteMessages( event:MessageEvent ):void { trace(Got it!); } /mx:Script mx:Consumer id=siteMessagesConsumer message=onSiteMessages(event)/ :::MyDelegate.java::: private void sendFlexMessage() throws MyException { MessageBroker msgBroker = MessageBroker.getMessageBroker(null); String clientID = UUIDUtils.createUUID(); // Generate a message AsyncMessage msg = new AsyncMessage(); msg.setDestination(siteMessages.allUsers); msg.setClientId(clientID); msg.setMessageId(UUIDUtils.createUUID()); msg.setTimestamp(System.currentTimeMillis()); msg.setBody(getSomeObject()); // Send a message msgBroker.routeMessageToService(msg, null); } The sendFlexMessage() method is called from somewhere else. This worked when my destination was just siteMessages. But I want to send subtopics like siteMessages.allUsers, siteMessages.allTeams, etc. I looked at the Java API for this stuff and saw nothing that jumped out like a setSubTopic() method, so I assumed that it was as simple as setting the destination to something.something. That seems to be the way they did it in the MXML/AS examples I saw, but when I try to send the message I get an error saying that there is no siteMessages.allUsers destination. Any suggestions would be appreciated.
[flexcoders] Re: Can't Get Socket Policy File
No ideas? --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: A few points of clarrification. The OK: Policy file accepted status was there because I tried manually loading the policy file by doing: flash.system.Security.loadPolicyFile (http://removed:843/crossdomain.xml); When I removed that line, I no longer get the OK status. My crossdomain.xml file looks like this: ?xml version=1.0 encoding=UTF-8? cross-domain-policy xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:noNamespaceSchemaLocation=http://www.adobe.com/xml/schemas/Polic yFileSocket.xsd site-control permitted-cross-domain-policies=master-only/ allow-access-from domain=*.removed.com to-ports=8080,/ /cross-domain-policy I'm also seeing this error: Error: Request for resource at xmlsocket://removed: by requestor from http://removed:8080/flex/bin/Main.swf is denied due to lack of policy file permissions. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: Downloaded the latest Flash Player and parts of our app that rely on XML socket connection broke. I see that you need to explicitly allow socket connections now via a crossdomain.xml file. Best practice is to host it on port 843. I think I've done that, but my FP doesn't seem to register it. I'm getting the following status reported in my policyfiles.txt file: OK: Policy file accepted: http://removed:843/crossdomain.xml Warning: Timeout on xmlsocket://removed:843 (at 3 seconds) while waiting for socket policy file. This should not cause any problems, but see http://www.adobe.com/go/strict_policy_files for an explanation. Well, it does cause a problem, and these two messages seem to conflict each other. Why does the error state a URL of xmlsocket://.. What's xmlsocket? Never heard of that. Is my Tomcat config incorrect? I added a new connector to the server.xml file like so: Connector connectionTimeout=2 port=843 protocol=HTTP/1.1/ If I point my browser to http://localhost:843/crossdomain.xml, I can fetch the file, so this has me scratching my head! Any thought appreciated. Geoff
[flexcoders] Can't connect to JMS with BlazeDS
I'm trying to connect to our JMS service (Apache ActiveMQ), but am not having much luck. Here are some config files. message-config.xml destination id=flex-jms-topic adapter ref=jms/ properties server allow-subtopicstrue/allow-subtopics subtopic-separator./subtopic-separator /server jms destination-typeTopic/destination-type message-typejavax.jms.TextMessage/message-type connection-factoryTopicConnectionFactory/connection-factory destination-jndi-nameGTBTopic/destination-jndi-name delivery-modeNON_PERSISTENT/delivery-mode message-priorityDEFAULT_PRIORITY/message-priority preserve-jms-headerstrue/preserve-jms-headers acknowledge-modeAUTO_ACKNOWLEDGE/acknowledge-mode max-producers1/max-producers initial-context-environment property nameContext.SECURITY_PRINCIPAL/name valueuserA/value /property property nameContext.SECURITY_CREDENTIALS/name valuepw123/value /property property nameContext.PROVIDER_URL/name valuetcp://localhost:61616/value /property property nameContext.INITIAL_CONTEXT_FACTORY/name valueorg.apache.activemq.jndi. ActiveMQInitialContextFactory/value /property /initial-context-environment /jms /properties /destination I subscribe to this topic in my Application's creationComplete handler. // Subscribe to JMS topic __jmsTopicConsumer = new Consumer(); __jmsTopicConsumer.destination = flex-jms-topic; __jmsTopicConsumer.subtopic = data.*; __jmsTopicConsumer.addEventListener(MessageEvent.MESSAGE, onJMSMessageResult); __jmsTopicConsumer.addEventListener(MessageFaultEvent.FAULT, onJMSMessageFault); __jmsTopicConsumer.subscribe(); Here's my ActiveMQ configuration, which is mostly the default settings. activemq.xml beans xmlns=http://www.springframework.org/schema/beans; xmlns:amq=http://activemq.org/config/1.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://activemq.org/config/1.0 http://activemq.apache.org/schema/activemq-core.xsd http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd; bean class=org.springframework.beans.factory.config.PropertyPlaceholderConfi\ gurer/ broker xmlns=http://activemq.org/config/1.0; brokerName=localhost dataDirectory=${activemq.base}/data destinationPolicy policyMap policyEntries policyEntry topic=FOO. producerFlowControl=false memoryLimit=1mb dispatchPolicy strictOrderDispatchPolicy/ /dispatchPolicy subscriptionRecoveryPolicy lastImageSubscriptionRecoveryPolicy/ /subscriptionRecoveryPolicy /policyEntry /policyEntries /policyMap /destinationPolicy transportConnectors transportConnector name=openwire uri=tcp://localhost:61616 discoveryUri=multicast://default/ transportConnector name=ssl uri=ssl://localhost:61617/ transportConnector name=stomp uri=stomp://localhost:61613/ transportConnector name=xmpp uri=xmpp://localhost:61222/ /transportConnectors networkConnectors networkConnector name=default-nc uri=static://tcp://localhost:61616/ /networkConnectors /broker commandAgent config here jetty config here /beans I even configured a static topic. jndi.properties java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory java.naming.provider.url = vm://localhost topic.MyTopic = FOO.MyTopic I know the static topic is created because I can go to the ActiveMQ web console and see the topic 'MyTopic' listed. Any help would be appreciated as I've been at this for a few days now. Thanks, Geoff
[flexcoders] Re: Can't connect to JMS with BlazeDS
This is all I see: [BlazeDS] [Service.Message.JMS] JMS consumer for JMS destination 'MyTopic' is being removed from the JMS adapter due to the following error: MyTopic [BlazeDS] [Service.Message.JMS] JMS consumer for JMS destination 'MyTopic' is stopping. [BlazeDS] [Service.Message.JMS] The corresponding MessageClient for JMS consumer for JMS destination 'MyTopic' is being invalidated [BlazeDS] [Service.Message] Warning: could not find MessageClient for clientId in pushMessageToClients: 219F9B21-7B1A-57EA-730F-0051B4FBD6F1 for destination: flex-jms-topic [BlazeDS] [Service.Message] Warning: could not find MessageClient for clientId in pushMessageToClients: 219F9B21-7B1A-57EA-730F-0051B4FBD6F1 for destination: flex-jms-topic --- In flexcoders@yahoogroups.com, meteatamel [EMAIL PROTECTED] wrote: Can you enable server side logging for JMSAdapter and let us know what you are seeing? To enable server side logging, go to services-config.xml and under logging section, make sure you have debug level and under patterns, have Service.Message.JMS. -Mete --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I'm trying to connect to our JMS service (Apache ActiveMQ), but am not having much luck. Here are some config files. message-config.xml destination id=flex-jms-topic adapter ref=jms/ properties server allow-subtopicstrue/allow-subtopics subtopic-separator./subtopic-separator /server jms destination-typeTopic/destination-type message-typejavax.jms.TextMessage/message-type connection-factoryTopicConnectionFactory/connection-factory destination-jndi-nameMyTopic/destination-jndi-name delivery-modeNON_PERSISTENT/delivery-mode message-priorityDEFAULT_PRIORITY/message-priority preserve-jms-headerstrue/preserve-jms-headers acknowledge-modeAUTO_ACKNOWLEDGE/acknowledge-mode max-producers1/max-producers initial-context-environment property nameContext.SECURITY_PRINCIPAL/name valueuserA/value /property property nameContext.SECURITY_CREDENTIALS/name valuepw123/value /property property nameContext.PROVIDER_URL/name valuetcp://localhost:61616/value /property property nameContext.INITIAL_CONTEXT_FACTORY/name valueorg.apache.activemq.jndi. ActiveMQInitialContextFactory/value /property /initial-context-environment /jms /properties /destination I subscribe to this topic in my Application's creationComplete handler. // Subscribe to JMS topic __jmsTopicConsumer = new Consumer(); __jmsTopicConsumer.destination = flex-jms-topic; __jmsTopicConsumer.subtopic = data.*; __jmsTopicConsumer.addEventListener(MessageEvent.MESSAGE, onJMSMessageResult); __jmsTopicConsumer.addEventListener(MessageFaultEvent.FAULT, onJMSMessageFault); __jmsTopicConsumer.subscribe(); Here's my ActiveMQ configuration, which is mostly the default settings. activemq.xml beans xmlns=http://www.springframework.org/schema/beans; xmlns:amq=http://activemq.org/config/1.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://activemq.org/config/1.0 http://activemq.apache.org/schema/activemq-core.xsd http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd; bean class=org.springframework.beans.factory.config.PropertyPlaceholderConfi\ gurer/ broker xmlns=http://activemq.org/config/1.0; brokerName=localhost dataDirectory=${activemq.base}/data destinationPolicy policyMap policyEntries policyEntry topic=FOO. producerFlowControl=false memoryLimit=1mb dispatchPolicy strictOrderDispatchPolicy/ /dispatchPolicy subscriptionRecoveryPolicy lastImageSubscriptionRecoveryPolicy/ /subscriptionRecoveryPolicy /policyEntry /policyEntries /policyMap /destinationPolicy transportConnectors transportConnector name=openwire uri=tcp://localhost:61616 discoveryUri=multicast://default/ transportConnector name=ssl uri=ssl://localhost:61617/ transportConnector name=stomp uri=stomp://localhost:61613/ transportConnector name=xmpp uri=xmpp://localhost:61222/ /transportConnectors networkConnectors networkConnector name=default-nc uri=static://tcp://localhost:61616/ /networkConnectors /broker commandAgent config here jetty config here /beans I even configured a static topic. jndi.properties java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
[flexcoders] Convert Flex App to AIR App
I have an existing Flex app... a pretty complex one. Multiple projects, J2EE backend, RemoteObject calls, BlazeDS messaging with JMS, etc, etc. What's the best way to convert this existing app to an AIR app? Would it be possible to just reference the SWF from the main Flex app? I'd rather not copy the entire main flex project into the newly created AIR package. That would be a lot of duplicate code. Thanks, Geoff
[flexcoders] Re: Convert Flex App to AIR App
Thanks Robert, looks interesting! The Ant idea was interesting too, but I have a feeling that in the future we'd want to use some AIR-specific APIs, and I don't think an Ant task could accomplish that. The pattern that article outlines sounds just right for the job. ~Geoff --- In flexcoders@yahoogroups.com, Robert Cadena [EMAIL PROTECTED] wrote: Hi Geoff, Here's a link that should be helpful: http://www.adobe.com/devnet/air/flex/articles/flex_air_codebase.html Some time ago I dealt with the same issue on Flex 2 beta. Basically, the way I dealt with it was to extract all the functionality into a Library Project, then create an AIR and a Flex project that is simply a shell that brings in the library project. I did this when I was too lazy to make an ant build file that could generate both Flex and AIR from the same project and because it was easier for developers not used to ant to pick up and use in Flex Builder. If I had the time I would make an ant file but separating into a library is quick and easy. best of luck /r http://www.searchcoders.com/ On Wed, May 7, 2008 at 10:18 AM, Geoffrey [EMAIL PROTECTED] wrote: I have an existing Flex app... a pretty complex one. Multiple projects, J2EE backend, RemoteObject calls, BlazeDS messaging with JMS, etc, etc. What's the best way to convert this existing app to an AIR app? Would it be possible to just reference the SWF from the main Flex app? I'd rather not copy the entire main flex project into the newly created AIR package. That would be a lot of duplicate code. Thanks, Geoff -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Can AIR app get Workstation Credentials?
Our flex app requires a login(HTML page) before launching the main app(the SWF does not handle the logging in). Converting to an AIR app and I was wondering if I could get the logged in user's credentials from the workstation so we don't require a login screen.
[flexcoders] Re: Can AIR app get Workstation Credentials?
Yea, I guess, it would be nice to not require a login. You know, a single sign-on approach. --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: I don't think is possible. And wouldn't it be a security problem if it was? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Wednesday, May 14, 2008 2:11 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Can AIR app get Workstation Credentials? Our flex app requires a login(HTML page) before launching the main app(the SWF does not handle the logging in). Converting to an AIR app and I was wondering if I could get the logged in user's credentials from the workstation so we don't require a login screen.
[flexcoders] Re: insidious gray bar in FULLSCREEN with OS X Air app
I believe you mean WindowedApplication, not nativeWindow. --- In flexcoders@yahoogroups.com, Jim Hayes [EMAIL PROTECTED] wrote: Is it the status bar? If so, set the nativeWindow's showStatusBar = false. This one got me! (I felt stupid :-( ) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jhno Sent: 15 May 2008 13:52 To: flexcoders@yahoogroups.com Subject: [flexcoders] insidious gray bar in FULLSCREEN with OS X Air app Greetings FC's, Running a Flex 3 AIR application in FULLSCREEN mode results in a gray bar at the bottom of the screen that I can not, for the life of me, get rid of. The bar is clearly the bottom component of an OS X window. I have tried adjusting the window settings in x-app.xml, to no avail. The problem occurs even with a maximally simple Flex app. I have seen this on several different systems and all monitor resolutions: it is very consistent. These are OS X 10.5 systems, the most recent Flex and AIR downloads from Adobe. Has anybody else seen this problem? Thanks big foaming heaps, sudsminimal __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
[flexcoders] Re: Can AIR app get Workstation Credentials?
I've decided to create a login panel to allow the user to login first, but I've run into a snag. We're using acegi as our security layer, and it intercepts all requests checking for state. I thought that I could just call the j_acegi_security_check.jsp directly supplying it with user and password, but it returns the acegilogin.jsp page. I noticed that my initial request to the j_acegi_security_check.jsp page had no jsessionid associated with it, so I thought that was the problem. To test that idea I created another HTTPSession request that gets spit out upon applicationComplete to a bogus page on the server. Now my AIR session seems to have the JSESSIONID cookie set because when I send the real 'logon' request, I see the same JSESSIONID in the header. Unfortunately, this didn't work either because I still get the acegilogin.jsp page returned to me. The only real difference I see between the web and AIR requests is that the 'Referer' is different in the header. From AIR, the referer is app:/AirMain.swf, from the web version of our app it's acegilogin.jsp;jsessionid=098CEB40890309539C7E50EF410B54DE. Does anyone have experience integrating AIR and acegi? --- In flexcoders@yahoogroups.com, Kevin Aebig [EMAIL PROTECTED] wrote: Isn't this a perfect usage of the EncryptedStore feature? Why not save the login credentials when the person first logs in, than save them via the EncryptedStore for the remaining usage. !k _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Wednesday, May 14, 2008 3:11 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Can AIR app get Workstation Credentials? Our flex app requires a login(HTML page) before launching the main app(the SWF does not handle the logging in). Converting to an AIR app and I was wondering if I could get the logged in user's credentials from the workstation so we don't require a login screen.
[flexcoders] Stress Testing a BlazeDS Application
Is there a FREE way to stress test a real-time messaging BlazeDS application? I tried using JMeter, but I can't capture all of the http request data to set up the test because you need to use a proxy for that, and BlazeDS falls back to a polling channel if a proxy is used. I looked in flexunit, but that doesn't seem like it's appropriate for this type of test. I want to establish 100, 200, 300,... clients until it breaks the server. All that needs to happen is a login(via acegi security) and a Consumer subscription request. Unfortunately, acegi requires a jsessionid for each http request to validate, and that's what I'm having difficulty with. Basically, any requests to the server are interrupted by acegi and the jsessionid is validated. If the validation is successful, the web asset is fetched. If validation fails, the login JSP page is returned. This is also causing issues with an AIR app that I have that has a flex login interface. The jesssionid doesn't seem to get cached within the AIR http request headers. Thanks for any help. ~Geoff~
[flexcoders] Automation libraries kill my app
I'm trying to use FunFX(http://funfx.rubyforge.org/) to do some automated testing of our GUI. I noticed that after I add the automation libraries to the compiler options of my main project, I can no longer interact with various parts of the UI using the mouse. This includes textinput, textarea, buttons, numericstepper, etc. I can tab to these controls, but I can not click on them to bring focus to it. Very odd. I've added the libraries in the main project's Additional Compiler Arguments property under Flex Compiler like so: -include-libraries C:\flex-sdk\frameworks\libs\automation.swc C:\flex-sdk\frameworks\libs\automation_agent.swc Any thought? Geoff
[flexcoders] Re: Automation libraries kill my app
I added a mouseevent handlers to teh stage and this is what I see when I click on a textarea: The MouseEvent's currentTarget is the application root. The target is a VBox. I'm not really sure where this VBox is comming from. Is it something automation adds in there? The TextArea is inside a FormItem, Form, CustomCanvas, CustomPanel, Canvas, Canvas, Application. Thanks, Geoff --- In flexcoders@yahoogroups.com, Sangavi G [EMAIL PROTECTED] wrote: Hi, This happens if there is an invisible container on the top of these controls. The solution you can try is to add a mouseClick event listener to the application stage and find out the container which is overlapping these controls. (or you can find this out even in the design view) Once you get the container you can try adding the mouseEnabled=false for that container. Regards, Sangavi On Sat, May 24, 2008 at 12:08 AM, Geoffrey [EMAIL PROTECTED] wrote: I'm trying to use FunFX(http://funfx.rubyforge.org/) to do some automated testing of our GUI. I noticed that after I add the automation libraries to the compiler options of my main project, I can no longer interact with various parts of the UI using the mouse. This includes textinput, textarea, buttons, numericstepper, etc. I can tab to these controls, but I can not click on them to bring focus to it. Very odd. I've added the libraries in the main project's Additional Compiler Arguments property under Flex Compiler like so: -include-libraries C:\flex-sdk\frameworks\libs\automation.swc C:\flex-sdk\frameworks\libs\automation_agent.swc Any thought? Geoff
[flexcoders] Streaming BlazeDS connection reverting to polling
I know there is a hardware imposed limitation to the number of BlazeDS real-time streaming connections that you can establish. I've heard it's in the hundreds, so I'm trying to see how many I can connect to my server(WinXP Pro 64-bit with two 3GHz Xeon CPUs and 8GB of RAM). Oddly enough after the 10th client logs in, all subsequent logins revert to a polling connection. Is there some limit on the number of streaming connections you can have before they fall back to polling? Something else I'm missing? BTW, even with polling I can establish 200 connections and the server barely blinks except for an increase in CPU usage due to all of that polling. Thanks, Geoff
[flexcoders] Re: Streaming BlazeDS connection reverting to polling
Just what I was looking for. Thanks! Geoff --- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote: Hi Geoffrey, Good info here: http://www.flexlive.net/?p=102 http://www.flexlive.net/?p=102 For long polling, looks like you can change the value for max-waiting-poll-requests in WEB-INF/flex/services-config.xml. For streaming it's max-streaming-clients. After the limits are met, new connections fall back to simple polling. -TH --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I know there is a hardware imposed limitation to the number of BlazeDS real-time streaming connections that you can establish. I've heard it's in the hundreds, so I'm trying to see how many I can connect to my server(WinXP Pro 64-bit with two 3GHz Xeon CPUs and 8GB of RAM). Oddly enough after the 10th client logs in, all subsequent logins revert to a polling connection. Is there some limit on the number of streaming connections you can have before they fall back to polling? Something else I'm missing? BTW, even with polling I can establish 200 connections and the server barely blinks except for an increase in CPU usage due to all of that polling. Thanks, Geoff
[flexcoders] Missing AsnDecoder Class
I seem to have the wrong version of the flex-messaging jar because when I start my server I get the spew below. I looked at all the flex-messaging jars on my system and I don't see it anywhere. All copies have the same manifest of: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.6.2 Created-By: 1.5.0_11-b03 (Sun Microsystems Inc.) Sealed: false Implementation-Title: LiveCycle Data Services 2.5.1 Implementation-Version: 2.5.1.173666 Implementation-Vendor: Adobe Systems Inc. Any ideas? Jul 2, 2008 10:32:27 AM org.apache.catalina.core.ApplicationContext log SEVERE: StandardWrapper.Throwable java.lang.NoClassDefFoundError: flex/messaging/license/AsnDecoder at flex.messaging.license.StandardLicense.init(StandardLicense.java:50) at flex.messaging.license.LicenseServiceImpl.validateLicense(LicenseServiceImpl.java:250) at flex.messaging.license.LicenseServiceImpl.init(LicenseServiceImpl.java:296) at flex.messaging.MessageBrokerServlet.buildLicenseService(MessageBrokerServlet.java:274) at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:117) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4364) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Jul 2, 2008 10:32:27 AM org.apache.catalina.core.StandardContext loadOnStartup SEVERE: Servlet /air-lcds threw load() exception java.lang.NoClassDefFoundError: flex/messaging/license/AsnDecoder at flex.messaging.license.StandardLicense.init(StandardLicense.java:50) at flex.messaging.license.LicenseServiceImpl.validateLicense(LicenseServiceImpl.java:250) at flex.messaging.license.LicenseServiceImpl.init(LicenseServiceImpl.java:296) at flex.messaging.MessageBrokerServlet.buildLicenseService(MessageBrokerServlet.java:274) at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:117) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4364) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Jul 2, 2008 10:32:27 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jul 2, 2008 10:32:27 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-843 Jul 2, 2008 10:32:27 AM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jul 2, 2008 10:32:27 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/16 config=null Jul 2, 2008 10:32:27 AM
[flexcoders] Re: Missing AsnDecoder Class
Odd, the AsnDecoder class isn't listed in the online LCDS Java API. Maybe they didn't release this class. I can't seem to find any info about this class online. Jeeze, what the heck did I do? Geoff --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: I seem to have the wrong version of the flex-messaging jar because when I start my server I get the spew below. I looked at all the flex-messaging jars on my system and I don't see it anywhere. All copies have the same manifest of: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.6.2 Created-By: 1.5.0_11-b03 (Sun Microsystems Inc.) Sealed: false Implementation-Title: LiveCycle Data Services 2.5.1 Implementation-Version: 2.5.1.173666 Implementation-Vendor: Adobe Systems Inc. Any ideas? Jul 2, 2008 10:32:27 AM org.apache.catalina.core.ApplicationContext log SEVERE: StandardWrapper.Throwable java.lang.NoClassDefFoundError: flex/messaging/license/AsnDecoder at flex.messaging.license.StandardLicense.init(StandardLicense.java:50) at flex.messaging.license.LicenseServiceImpl.validateLicense(LicenseServiceImpl.java:250) at flex.messaging.license.LicenseServiceImpl.init(LicenseServiceImpl.java:296) at flex.messaging.MessageBrokerServlet.buildLicenseService(MessageBrokerServlet.java:274) at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:117) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4364) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Jul 2, 2008 10:32:27 AM org.apache.catalina.core.StandardContext loadOnStartup SEVERE: Servlet /air-lcds threw load() exception java.lang.NoClassDefFoundError: flex/messaging/license/AsnDecoder at flex.messaging.license.StandardLicense.init(StandardLicense.java:50) at flex.messaging.license.LicenseServiceImpl.validateLicense(LicenseServiceImpl.java:250) at flex.messaging.license.LicenseServiceImpl.init(LicenseServiceImpl.java:296) at flex.messaging.MessageBrokerServlet.buildLicenseService(MessageBrokerServlet.java:274) at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:117) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4364) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Jul 2, 2008 10:32:27 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jul 2, 2008 10:32:27 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting
[flexcoders] Re: Missing AsnDecoder Class - SOLVED
I was missing the flex-messaging-req.jar. --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: Odd, the AsnDecoder class isn't listed in the online LCDS Java API. Maybe they didn't release this class. I can't seem to find any info about this class online. Jeeze, what the heck did I do? Geoff --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I seem to have the wrong version of the flex-messaging jar because when I start my server I get the spew below. I looked at all the flex-messaging jars on my system and I don't see it anywhere. All copies have the same manifest of: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.6.2 Created-By: 1.5.0_11-b03 (Sun Microsystems Inc.) Sealed: false Implementation-Title: LiveCycle Data Services 2.5.1 Implementation-Version: 2.5.1.173666 Implementation-Vendor: Adobe Systems Inc. Any ideas? Jul 2, 2008 10:32:27 AM org.apache.catalina.core.ApplicationContext log SEVERE: StandardWrapper.Throwable java.lang.NoClassDefFoundError: flex/messaging/license/AsnDecoder at flex.messaging.license.StandardLicense.init(StandardLicense.java:50) at flex.messaging.license.LicenseServiceImpl.validateLicense(LicenseServiceImpl.java:250) at flex.messaging.license.LicenseServiceImpl.init(LicenseServiceImpl.java:296) at flex.messaging.MessageBrokerServlet.buildLicenseService(MessageBrokerServlet.java:274) at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:117) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4364) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Jul 2, 2008 10:32:27 AM org.apache.catalina.core.StandardContext loadOnStartup SEVERE: Servlet /air-lcds threw load() exception java.lang.NoClassDefFoundError: flex/messaging/license/AsnDecoder at flex.messaging.license.StandardLicense.init(StandardLicense.java:50) at flex.messaging.license.LicenseServiceImpl.validateLicense(LicenseServiceImpl.java:250) at flex.messaging.license.LicenseServiceImpl.init(LicenseServiceImpl.java:296) at flex.messaging.MessageBrokerServlet.buildLicenseService(MessageBrokerServlet.java:274) at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:117) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4364) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Jul 2, 2008 10:32:27 AM org.apache.coyote.http11
[flexcoders] RTMP and Spring Security(Acegi) Issues
I'm wondering if anyone out there has implemented LiveCycle Data Services using Spring Security as their security layer? I'm having issues with RTMP communications between server/client, meaning I'm not getting any. I've modified our existing Java delegate to ast as the Assembler for a managed collection. When the Assembler's fill() method gets called, it tries to retrieve the desired information from our Service class. I get an AuthenticationCredentialsNotFoundException as seen below: error snippet org.acegisecurity.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext at org.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:339) at org.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:254) at org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:63) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:630) ... /error snippet I think it's because the HTTPFlexSession is authenticated, but the RTMPFlexSession operates outside the context. I don't know how to make it authenticated, or to authenticate the client so that all sessions have valid credentials. Any suggestions would be appreciated. ~Geoff
[flexcoders] Re: RTMP and Spring Security(Acegi) Issues
I've looked around the net and haven't found anything helpful. Any suggestions would be great. Thanks, Geoff --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: I'm wondering if anyone out there has implemented LiveCycle Data Services using Spring Security as their security layer? I'm having issues with RTMP communications between server/client, meaning I'm not getting any. I've modified our existing Java delegate to ast as the Assembler for a managed collection. When the Assembler's fill() method gets called, it tries to retrieve the desired information from our Service class. I get an AuthenticationCredentialsNotFoundException as seen below: error snippet org.acegisecurity.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext at org.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecuri tyInterceptor.java:339) at org.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityIn terceptor.java:254) at org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodS ecurityInterceptor.java:63) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMetho dInvocation.java:161) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercep t(Cglib2AopProxy.java:630) ... /error snippet I think it's because the HTTPFlexSession is authenticated, but the RTMPFlexSession operates outside the context. I don't know how to make it authenticated, or to authenticate the client so that all sessions have valid credentials. Any suggestions would be appreciated. ~Geoff
[flexcoders] Re: RTMP and Spring Security(Acegi) Issues
I'm guessing that we don't implement security the correct way (or the best way) right now. Currently, I have a login State that takes the username and password and makes an HTTPService call to the JSP page that does user authentication. If that comes back successfully, then I change State to the main application. That seems to take care of all of the HTTP requests, but the RTMP requests obviously fail (or else I wouldn't be here ;-)). I read the docs about using LoginCommand, but I didn't see how that ties into Acegi. I'm wondering if you can authenticate the Flex client, and not just the session. If so, wouldn't the sessions (HTTP and RTMP) also be authenticated since they fall under the FlexClient object? Just a thought. Geoff --- In flexcoders@yahoogroups.com, jahhaj12345 [EMAIL PROTECTED] wrote: I'm having the same problems you are. I've been through several options but haven't found one that's acceptable from a security point of view if you are trying to use the rememberme functionality. To get it working without rememberme, provide a login form from your flex application and once authenticated using form login, use that username/password combination for the RTMP's ChannelSet login. And depending on how you handle authentication on your end, you may need to provide your own LoginCommand and UserDetailsService. I've done both of these and it works. Does anyone out there have a way to get rememberme working for RTMP? I know the problem is cause by the RTMPFlexSession being outside the HTTPSession. Is there anyway to sync these up? Or is there anyway to do a single sign-on with RTMP? Jason --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I've looked around the net and haven't found anything helpful. Any suggestions would be great. Thanks, Geoff --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I'm wondering if anyone out there has implemented LiveCycle Data Services using Spring Security as their security layer? I'm having issues with RTMP communications between server/client, meaning I'm not getting any. I've modified our existing Java delegate to ast as the Assembler for a managed collection. When the Assembler's fill() method gets called, it tries to retrieve the desired information from our Service class. I get an AuthenticationCredentialsNotFoundException as seen below: error snippet org.acegisecurity.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext at org.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecuri tyInterceptor.java:339) at org.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityIn terceptor.java:254) at org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodS ecurityInterceptor.java:63) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMetho dInvocation.java:161) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercep t(Cglib2AopProxy.java:630) ... /error snippet I think it's because the HTTPFlexSession is authenticated, but the RTMPFlexSession operates outside the context. I don't know how to make it authenticated, or to authenticate the client so that all sessions have valid credentials. Any suggestions would be appreciated. ~Geoff
[flexcoders] Re: RTMP and Spring Security(Acegi) Issues - SOLVED
I seem to have got it working. Thanks for your help jahhaj12345! What I ended up doing was to create a custom LoginCommand class. I used the one from here: http://blog.f4k3.net/fake/entry/acegi_logincommand_for_fds. I made two changes shown below: //The name of our Acegi configuration file. private static String[] CONFIG_LOCATIONS = {classpath:security-context.xml}; //ldapAuthenticationProvider is from our Acegi config file, and it the name of the bean that is used for authentication via LDAP. authenticationProvider = (AuthenticationProvider)applicationContext.getBean(ldapAuthenticationProvider); I then updated services-config.xml and added: security login-command class=com.gdais.security.AcegiLoginCommand server=Tomcat/ security-constraint id=basic-read-access auth-methodBasic/auth-method roles roleROLE_MANAGERS/role roleROLE_USERS/role /roles /security-constraint /security //The roles came from the Acegi config file. After that, I had to add the [managed] metadata tag to one of my ValueObjects and it all seemed to work. I'll be honest, I don't really understand why this works, it just does. What I mean by 'works' is that the managed collection on the client gets filled with data successfully. I haven't yet tested pushing new entries to that managed collection after the initial fill. I hope this post helps someone else. ~Geoff --- In flexcoders@yahoogroups.com, jahhaj12345 [EMAIL PROTECTED] wrote: I don't know of a way to just authenticate the client. From everything I've read, you have to authenticate the HTTP and RTMP sessions individually. For my application, I had to create my own LoginCommand to handle the flex RTMP authentication. Here's my understanding of how it's working for me: 1. On my client, I get the channelset to use and then call channelSet.login(username, password). You could also call the setCredentials on the actual DataService the same way, but my services are all created at runtime on the server instead of being statically defined in services-config.xml. 2. That channelSet (or dataservice) from above authenticates through the login-command configured in services-config.xml. This is where the custom LoginCommand I created is configured. The doAuthentication function of LoginCommand is as follows: public Principal doAuthentication(String username, Object credentials) { Authentication auth = authenticationProvider.authenticate(new UsernamePasswordAuthenticationToken(username, credentials)); // authenticationProvider is a spring security DaoAuthenticationProvider SecurityContextHolder.getContext().setAuthentication(auth); return auth; } This should authenticate the RTMP session. I don't know if this is the best way, but it seems to work. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I'm guessing that we don't implement security the correct way (or the best way) right now. Currently, I have a login State that takes the username and password and makes an HTTPService call to the JSP page that does user authentication. If that comes back successfully, then I change State to the main application. That seems to take care of all of the HTTP requests, but the RTMP requests obviously fail (or else I wouldn't be here ;-)). I read the docs about using LoginCommand, but I didn't see how that ties into Acegi. I'm wondering if you can authenticate the Flex client, and not just the session. If so, wouldn't the sessions (HTTP and RTMP) also be authenticated since they fall under the FlexClient object? Just a thought. Geoff --- In flexcoders@yahoogroups.com, jahhaj12345 halvorsonj@ wrote: I'm having the same problems you are. I've been through several options but haven't found one that's acceptable from a security point of view if you are trying to use the rememberme functionality. To get it working without rememberme, provide a login form from your flex application and once authenticated using form login, use that username/password combination for the RTMP's ChannelSet login. And depending on how you handle authentication on your end, you may need to provide your own LoginCommand and UserDetailsService. I've done both of these and it works. Does anyone out there have a way to get rememberme working for RTMP? I know the problem is cause by the RTMPFlexSession being outside the HTTPSession. Is there anyway to sync these up? Or is there anyway to do a single sign-on with RTMP? Jason --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I've looked around the net and haven't found anything helpful. Any suggestions would be great. Thanks, Geoff --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I'm wondering if anyone out there has implemented LiveCycle Data Services
[flexcoders] Re: RTMP and Spring Security(Acegi) Issues - SOLVED
One last thing I had to do to get it to work. I added -Dacegi.security.strategy=MODE_INHERITABLETHREADLOCAL to my Tomcat JVM arguments. Otherwise, setting and getting the Authentication object was accessing different instances of some security object. ~Geoff --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: I seem to have got it working. Thanks for your help jahhaj12345! What I ended up doing was to create a custom LoginCommand class. I used the one from here: http://blog.f4k3.net/fake/entry/acegi_logincommand_for_fds. I made two changes shown below: //The name of our Acegi configuration file. private static String[] CONFIG_LOCATIONS = {classpath:security-context.xml}; //ldapAuthenticationProvider is from our Acegi config file, and it the name of the bean that is used for authentication via LDAP. authenticationProvider = (AuthenticationProvider)applicationContext.getBean(ldapAuthenticationProvider); I then updated services-config.xml and added: security login-command class=com.gdais.security.AcegiLoginCommand server=Tomcat/ security-constraint id=basic-read-access auth-methodBasic/auth-method roles roleROLE_MANAGERS/role roleROLE_USERS/role /roles /security-constraint /security //The roles came from the Acegi config file. After that, I had to add the [managed] metadata tag to one of my ValueObjects and it all seemed to work. I'll be honest, I don't really understand why this works, it just does. What I mean by 'works' is that the managed collection on the client gets filled with data successfully. I haven't yet tested pushing new entries to that managed collection after the initial fill. I hope this post helps someone else. ~Geoff --- In flexcoders@yahoogroups.com, jahhaj12345 halvorsonj@ wrote: I don't know of a way to just authenticate the client. From everything I've read, you have to authenticate the HTTP and RTMP sessions individually. For my application, I had to create my own LoginCommand to handle the flex RTMP authentication. Here's my understanding of how it's working for me: 1. On my client, I get the channelset to use and then call channelSet.login(username, password). You could also call the setCredentials on the actual DataService the same way, but my services are all created at runtime on the server instead of being statically defined in services-config.xml. 2. That channelSet (or dataservice) from above authenticates through the login-command configured in services-config.xml. This is where the custom LoginCommand I created is configured. The doAuthentication function of LoginCommand is as follows: public Principal doAuthentication(String username, Object credentials) { Authentication auth = authenticationProvider.authenticate(new UsernamePasswordAuthenticationToken(username, credentials)); // authenticationProvider is a spring security DaoAuthenticationProvider SecurityContextHolder.getContext().setAuthentication(auth); return auth; } This should authenticate the RTMP session. I don't know if this is the best way, but it seems to work. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I'm guessing that we don't implement security the correct way (or the best way) right now. Currently, I have a login State that takes the username and password and makes an HTTPService call to the JSP page that does user authentication. If that comes back successfully, then I change State to the main application. That seems to take care of all of the HTTP requests, but the RTMP requests obviously fail (or else I wouldn't be here ;-)). I read the docs about using LoginCommand, but I didn't see how that ties into Acegi. I'm wondering if you can authenticate the Flex client, and not just the session. If so, wouldn't the sessions (HTTP and RTMP) also be authenticated since they fall under the FlexClient object? Just a thought. Geoff --- In flexcoders@yahoogroups.com, jahhaj12345 halvorsonj@ wrote: I'm having the same problems you are. I've been through several options but haven't found one that's acceptable from a security point of view if you are trying to use the rememberme functionality. To get it working without rememberme, provide a login form from your flex application and once authenticated using form login, use that username/password combination for the RTMP's ChannelSet login. And depending on how you handle authentication on your end, you may need to provide your own LoginCommand and UserDetailsService. I've done both of these and it works. Does anyone out there have a way to get rememberme working for RTMP? I know the problem is cause by the RTMPFlexSession being outside the HTTPSession. Is there anyway
[flexcoders] LCDS Memory Usage
Looking in the LiveCycle Data Services ES Developer's Guide, page 190, it states: By default, the Data Management Service caches items returned from fill() and getItem() calls and uses cached items to implement paging and to build object graphs on the server when implementing lazy associations. This causes a complete copy of the managed state of all active clients to be kept in each server's memory. Here's what I think that means. If I have 100 clients, and each client has one managed collection that contains 100 items in it, then there would be 10,000 copies residing in memory on the server(100 objects for 100 users). Am I understanding this correctly? Does this seem inefficient? What if those objects happened to be really big objects... I mean really big. Seems like that would take up a lot of memory on the server. Has anyone come up against this in practice? Thanks, Geoff
[flexcoders] Re: LCDS Memory Usage
I saw that you can turn cache-items to false and it will only store the IDs in memory, but at the expense of paging, or at least more efficient paging. Is this true? I thought the docs said that to do paging it would have to grab all the objects again, then grab the subset of data you want. In our particular instance, we have very large objects that are relatively unique across clients. Some objects will be shared, but most won't. Just trying to forecast how it will effect the server. Thanks, Geoff --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: That is basically how it works but only if you have auto-sync enabled=true and cache-items=true on your destination settings. The auto-sync feature requires that we maintain at least the identities of all objects managed on every client so that we know where to push changes. The goal here is that you don't have to worry about tracking that and can still easily keep clients in sync. Also, if two clients fetch an object with the same id, only one copy is cached. If you turn cache-items=false, we cache only the ids, not the items so we keep a lot less state around (though we do have to go back to the assembler more often so that is more load on the database). If you turn auto-sync off, the server maintains no state but the synchronization functionality would then only work if you enable manual sync - i.e. where your clients specify subscriptions they want to listen to and also can specify meta-data that is attached to all changes made. That meta-data is used to route changes to the right subscribed clients. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Wednesday, July 23, 2008 5:21 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS Memory Usage Looking in the LiveCycle Data Services ES Developer's Guide, page 190, it states: By default, the Data Management Service caches items returned from fill() and getItem() calls and uses cached items to implement paging and to build object graphs on the server when implementing lazy associations. This causes a complete copy of the managed state of all active clients to be kept in each server's memory. Here's what I think that means. If I have 100 clients, and each client has one managed collection that contains 100 items in it, then there would be 10,000 copies residing in memory on the server(100 objects for 100 users). Am I understanding this correctly? Does this seem inefficient? What if those objects happened to be really big objects... I mean really big. Seems like that would take up a lot of memory on the server. Has anyone come up against this in practice? Thanks, Geoff
[flexcoders] LCDS - Tomcat - JOTM Integration
After a couple days of fussing around, I was able to successfully integrate JOTM into our webapp, and thought that I'd share what I did. Hopefully it will be useful to someone else. Environment: Eclipse 3.3.1.1 Tomcat 6.0.16 LCDS 2.5.1 JOTM 2.0.10 Installation: 1) Download JOTM 2.0.10 from http://forge.objectweb.org/projects/jotm/ if you don't already have it. 2) Unzip to c:\ 3) Link those jars to Tomcat a. Double-click Tomcat definition in the Servers tab of Eclipse. b. Click Open launch configuration. c. Select the Classpath tab. d. Select User Entries, and then Add External JARs. e. Navigate to C:\jotm-2.0.10\lib. f. Select all classes except commons-logging.jar and log4j.jar. g. Apply the changes and exit Tomcat properties. h. (optional) test JOTM installation by starting the server and accessing the below JSP file*. Success will be obvious. 4) Edit your META-INF\context.xml to include the following line: Transaction name=UserTransaction auth=Container factory=org.objectweb.jotm.UserTransactionFactory jotm.timeout=60/ You should now be able to perform create, delete, and update operations on a managed collection of a DataService. * Optional JSP file(I got this from someone in this forum, but can't remember who) %@ page import=javax.transaction.UserTransaction % %@ page import=javax.naming.InitialContext % %@ page import=javax.naming.Context % [EMAIL PROTECTED] import=javax.naming.NamingException% body startbr/ % try { Context ctx = new InitialContext(); String userTransactionJndi = java:comp/UserTransaction; String userSpecified = System.getProperty(UserTxJndiName); if (userSpecified != null) { userTransactionJndi = userSpecified; } UserTransaction userTransaction = (UserTransaction) ctx.lookup(userTransactionJndi); if (userTransaction != null) { userTransaction.begin(); out.println(begin ok!br); userTransaction.commit(); out.println(commit ok!br); } else { out.println(Context returned null userTransaction); } } catch (NamingException ne) { out.println(ne.toString()); } catch (Exception e) { out.println(e.toString()); } % done /body
[flexcoders] How do you auto-refresh LCDS?
I'm not sure how you refresh clients when there's a change on the server. After I perform a _ds.fill(), the user can delete 1+ of the items from the managed collection. The ActionScript looks like: private function deleteItems():void { var selectedTasks:Array = taskList.getSelectedTasks(); for each (var task:ExploitationTaskVO in selectedTasks) { _ds.deleteItem(task); } // Commit the deletes to the server if needed if (__ds.commitRequired) { __ds.commit(); } } _ds.commit() has to be called to propagate changes to the server because I have _ds.autoCommit = false. The LCDS JavaDocs state that changes from a createItem() or updateItem() call will propigate to all clients if auto-refresh=true. Is that true for deleteItem() calls too? And where is this auto-refresh property? I don't see it under Java AbstractAssembler or ActionScript DataService classes. Also, what if I create, update, or delete a task on the server without doing it through the DataService(like through a java delegate). Can I force the DataService to refresh it's clients on the java side? Is this what the DataServiceTransaction.refreshFill() method is for? Thanks, Geoff
[flexcoders] Multiple AIR Instances
Did I miss something? Can you only run one instance of an AIR app?
[flexcoders] DataServiceException
I'm trying to create a DataServiceTransaction to push an update out to my DataService clients. I'm getting the below error when it tries to create the DataServiceTransaction. flex.data.DataServiceException: Unable to access UserTransaction in DataService. at flex.data.DataServiceTransaction.doBegin(DataServiceTransaction.java:855) at flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:807) at flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:270) at flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:283) ... My code is: DataServiceTransaction dst = DataServiceTransaction.begin(true); dst.refreshFill(myTasks, null); dst.commit(); Any ideas? Geoff
[flexcoders] Re: DataServiceException
I just went through installing/configuring JTA using JOTM(which was not as straight forward as the docs say) with Tomcat. The bummer is that I can't debug into the DataServiceTransaction class... no source. I guess I could try passing false to the begin method, but I should be able to use JOTM. BTW, thanks for your help on that other LCDS issue. --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: When you create a DataServiceTransaction, especially with true so it needs to start a JTA transaction, it is look in the JNDI namespace for the standard UserTransaction object i.e. new InitialContext().lookup(java:comp/UserTransaction). That call is not working... if you are not in a JEE container or Tomcat with JOTM installed that would explain it.You can try passing false to begin and that would avoid use of the JTA transaction manager. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Monday, August 04, 2008 1:31 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataServiceException I'm trying to create a DataServiceTransaction to push an update out to my DataService clients. I'm getting the below error when it tries to create the DataServiceTransaction. flex.data.DataServiceException: Unable to access UserTransaction in DataService. at flex.data.DataServiceTransaction.doBegin(DataServiceTransaction.java:855) at flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:807) at flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:270) at flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:283) ... My code is: DataServiceTransaction dst = DataServiceTransaction.begin(true); dst.refreshFill(myTasks, null); dst.commit(); Any ideas? Geoff
[flexcoders] Re: DataServiceException
I pass false to my begin() method and that stops the DataServiceException from happening, but now nothing seems to happen after I commit(). Here's a current code snippet: DataServiceTransaction dst = DataServiceTransaction.begin(false); dst.refreshFill(myTasks, null); dst.commit(); The destination parameter for refreshFill(), is that the same string as the parameter I pass to the DataService constructor in ActionScript and the name of the destination I set up in data-management-config.xml? (i.e. __ds = new DataService(myTasks); destination id=myTasks ) I would expect to get a hit on the fill() method in my Assembler after the commit() is called, but I ain't gettin' nut'in. Ideas? Thanks, Geoff --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: Yeah, I wish this stuff was easier to install and configure. Too bad this JTA stuff hasn't been picked up by servlet containers as part of the core. To help debug this problem, here's the source for a .jsp file which does the same thing we do. Usually once this works, DataServiceTransaction.begin(true) will work too: %@ page import=javax.transaction.UserTransaction % %@ page import=javax.naming.InitialContext % %@ page import=javax.naming.Context % body startbr % try { Context ctx = new InitialContext(); String userTransactionJndi = java:comp/UserTransaction; String userSpecified = System.getProperty(UserTxJndiName); if (userSpecified != null) { userTransactionJndi = userSpecified; } UserTransaction userTransaction = (UserTransaction) ctx.lookup(userTransactionJndi); if (userTransaction != null) { userTransaction.begin(); out.println(begin ok!br); userTransaction.commit(); out.println(commit ok!br); } else { out.println(returned null); } } catch (Exception ne) { out.println(ne.toString()); } % done /body From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Monday, August 04, 2008 2:51 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: DataServiceException I just went through installing/configuring JTA using JOTM(which was not as straight forward as the docs say) with Tomcat. The bummer is that I can't debug into the DataServiceTransaction class... no source. I guess I could try passing false to the begin method, but I should be able to use JOTM. BTW, thanks for your help on that other LCDS issue. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Jeff Vroom jvroom@ wrote: When you create a DataServiceTransaction, especially with true so it needs to start a JTA transaction, it is look in the JNDI namespace for the standard UserTransaction object i.e. new InitialContext().lookup(java:comp/UserTransaction). That call is not working... if you are not in a JEE container or Tomcat with JOTM installed that would explain it. You can try passing false to begin and that would avoid use of the JTA transaction manager. Jeff From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of Geoffrey Sent: Monday, August 04, 2008 1:31 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] DataServiceException I'm trying to create a DataServiceTransaction to push an update out to my DataService clients. I'm getting the below error when it tries to create the DataServiceTransaction. flex.data.DataServiceException: Unable to access UserTransaction in DataService. at flex.data.DataServiceTransaction.doBegin(DataServiceTransaction.java:855) at flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:807) at flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:270) at flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:283) ... My code is: DataServiceTransaction dst = DataServiceTransaction.begin(true); dst.refreshFill(myTasks, null); dst.commit(); Any ideas? Geoff
[flexcoders] Re: DataServiceException
What version of LCDS was this written for? I can't seem to resolve seq.getItemInfo() with my 2.5.1 jars. --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: Yeah, it should be calling any fill methods which are still actively managed by clients in that refreshFill call - as long as you have autoSync=true. There are a couple of ways to track this down: 1) Put in this printSeq.jsp file (enclosed below) and request it. It will show you all active fills, etc. If that is empty, somehow the client's fill is not auto-sync'd. 2) If you turn on the Service.* debug target it should at least indicate which fills it is trying to refresh. Jeff - printSeqs.jsp: %@ page import=flex.data.SequenceManager % %@ page import=flex.messaging.MessageBroker% %@ page import=flex.data.DataService% %@ page import=flex.data.DataDestination% %@ page import=java.util.Map% %@ page import=java.util.List% %@ page import=java.util.Iterator% body code % MessageBroker mb = MessageBroker.getMessageBroker(null); DataService ds = (DataService) mb.getServiceByType(flex.data.DataService); if (ds == null) out.print(no data service); else { Map dests = ds.getDestinations(); for (Iterator it = dests.entrySet().iterator(); it.hasNext(); ) { Map.Entry ent = (Map.Entry) it.next(); String destName = (String) ent.getKey(); DataDestination dest = (DataDestination) ent.getValue(); SequenceManager seq = dest.getSequenceManager(); out.print(Destination: + destName + br); out.print(preSequenceInfo:); out.print(seq.getSequenceInfo()); out.print(/preppreItemInfo:br); out.print(seq.getItemInfo()); out.print(/pre); out.print(p); } } % done /code /body From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Wednesday, August 06, 2008 2:16 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: DataServiceException I pass false to my begin() method and that stops the DataServiceException from happening, but now nothing seems to happen after I commit(). Here's a current code snippet: DataServiceTransaction dst = DataServiceTransaction.begin(false); dst.refreshFill(myTasks, null); dst.commit(); The destination parameter for refreshFill(), is that the same string as the parameter I pass to the DataService constructor in ActionScript and the name of the destination I set up in data-management-config.xml? (i.e. __ds = new DataService(myTasks); destination id=myTasks ) I would expect to get a hit on the fill() method in my Assembler after the commit() is called, but I ain't gettin' nut'in. Ideas? Thanks, Geoff --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Jeff Vroom jvroom@ wrote: Yeah, I wish this stuff was easier to install and configure. Too bad this JTA stuff hasn't been picked up by servlet containers as part of the core. To help debug this problem, here's the source for a .jsp file which does the same thing we do. Usually once this works, DataServiceTransaction.begin(true) will work too: %@ page import=javax.transaction.UserTransaction % %@ page import=javax.naming.InitialContext % %@ page import=javax.naming.Context % body startbr % try { Context ctx = new InitialContext(); String userTransactionJndi = java:comp/UserTransaction; String userSpecified = System.getProperty(UserTxJndiName); if (userSpecified != null) { userTransactionJndi = userSpecified; } UserTransaction userTransaction = (UserTransaction) ctx.lookup(userTransactionJndi); if (userTransaction != null) { userTransaction.begin(); out.println(begin ok!br); userTransaction.commit(); out.println(commit ok!br); } else { out.println(returned null); } } catch (Exception ne) { out.println(ne.toString()); } % done /body From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of Geoffrey Sent: Monday, August 04, 2008 2:51 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: DataServiceException I just went through installing/configuring JTA using JOTM(which was not as straight forward as the docs say) with Tomcat. The bummer is that I can't debug into the DataServiceTransaction class... no source. I guess I could try passing false to the begin method, but I should be able to use JOTM. BTW, thanks for your help on that other LCDS issue. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Jeff Vroom jvroom@ wrote: When you create a DataServiceTransaction
[flexcoders] LCDS ds-console WAR
Does anyone use it? What does it do? I deployed it, and can run it, but I'm getting NPE errors when I select the other tabs. Also, there are no Applications listed in my ComboBox. I have a LCDS application up and running on my server, so I'd expect to see something listed. Here's the error I get: TypeError: Error #1009: Cannot access a property or method of a null object reference. at console::ConsoleManager/activateListener() at console/setCurrentTab() at console/__consoleNavigator_change() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.containers::ViewStack/dispatchChangeEvent() at mx.containers::ViewStack/commitProperties() at mx.containers::TabNavigator/commitProperties() at mx.core::UIComponent/validateProperties() at mx.managers::LayoutManager/validateProperties() at mx.managers::LayoutManager/doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2() at mx.core::UIComponent/callLaterDispatcher()
[flexcoders] Re: FDS (or LCDS) and refreshFill() from Java
I'm having the same issues that Dimitrios had below(changes to properties of items in managed collections not showing up). I was wondering if Jeff Vroom's advice is still the preferred method for LCDS2.6. quote To update those properties, you need to call dts.updateItem for each item where the properties have changed. /quote --- In flexcoders@yahoogroups.com, Dimitrios Gianninas [EMAIL PROTECTED] wrote: Ah, thank you very much for the enlightment Jeff, that explains things. Perhaps in a future release there can be a method called refreshFillFromDB() (or something like that) that will cause LCDS to make the same call to retrieve the items from the DB - as the first call to fill() - and push those changes out to affected clients only - rather than rely on updateItem for each item. This will probably be more performant in my case as in some cases only the properties of a batch of items change. Dimitrios Gianninas Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Vroom Sent: Monday, June 18, 2007 9:27 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] FDS (or LCDS) and refreshFill() from Java That is the right code to refresh a fill from server side code that is not part of your assembler methods. It could be the case that for some reason the fill parameters are not matching the fill parameters used by your clients or that when FDMS calls the fill method on the assembler, it sees the same item ids returned that are already on the client. Turning on the server debug logging for the pattern DataService.* (in 2.0.1) and Service.Data.* (in 2.5) would provide more diagnostics about what is happening. One other problem with refreshFill is that if the properties of the items have changed but the identities of the items in the filled collection have not, the refreshFill won't pick it up. RefreshFill is just about refreshing the membership of the objects in the filled collection - i.e. which items are in that list. It is not about updating the properties of the items in the filled collection. To update those properties, you need to call dts.updateItem for each item where the properties have changed. If bandwidth/performance is not too much of a problem, you can simply call updateItem for each item id in the list where you just pass in null for the previous item and null for the list of properties that have changed. This is similar in performance to just having the clients re-execute the fill since they will be pushed all of the items in the collection and will update their local copies of all of the items with these changes. Part of the rationale for this behavior is that we don't want to necessarily cache a copy of every managed item on the server. That is really the only way we can know whether an item has changed (by comparing the old and new versions) and is somewhat expensive. That said, if you do have the cache-items setting turned on, we should be able to do a better job of this even if it takes a few CPU cycles. I think we already have an enhancement filed for this feature but I'll check and if not file one. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dimitrios Gianninas Sent: Monday, June 18, 2007 6:04 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] FDS (or LCDS) and refreshFill() from Java Hi, Basically I have a requirement to refresh a list which all clients pull in via FDS from the Java side. I thought the code below would cause all clients to refresh but it doesn't. Any ideas of what is missing or what is incorrect? List x = new ArrayList(); x.add( new Integer(16) ); x.add( InboxConstants.INBOX_DISPLAY_ACTIVE ); DataServiceTransaction dts = DataServiceTransaction.begin( false ); dts.setSendMessagesToPeers( true ); // notify other nodes in a cluster dts.refreshFill( inboxDS, x ); dts.commit(); Dimitrios Gianninas Developer Optimal Payments Inc. AVIS IMPORTANT WARNING Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur. This electronic
[flexcoders] Re: LCDS ds-console WAR
Thanks for the reply, but I was running it that way. --- In flexcoders@yahoogroups.com, zdenekmikan [EMAIL PROTECTED] wrote: You have to run it through http access (e.g. http://localhost:8400/ds-console/), not by double-clicking on html file in deployed folder. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: Does anyone use it? What does it do? I deployed it, and can run it, but I'm getting NPE errors when I select the other tabs. Also, there are no Applications listed in my ComboBox. I have a LCDS application up and running on my server, so I'd expect to see something listed. Here's the error I get: TypeError: Error #1009: Cannot access a property or method of a null object reference. at console::ConsoleManager/activateListener() at console/setCurrentTab() at console/__consoleNavigator_change() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.containers::ViewStack/dispatchChangeEvent() at mx.containers::ViewStack/commitProperties() at mx.containers::TabNavigator/commitProperties() at mx.core::UIComponent/validateProperties() at mx.managers::LayoutManager/validateProperties() at mx.managers::LayoutManager/doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2() at mx.core::UIComponent/callLaterDispatcher()
[flexcoders] Re: RTMP and Spring Security(Acegi) Issues - SOLVED
I was wondering if anyone knows exactly when the AcegiLoginCommand class gets processes. Does it get processed once when you create a DataService object, or does it get processed every time an RTMP request is made? --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: One last thing I had to do to get it to work. I added -Dacegi.security.strategy=MODE_INHERITABLETHREADLOCAL to my Tomcat JVM arguments. Otherwise, setting and getting the Authentication object was accessing different instances of some security object. ~Geoff --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I seem to have got it working. Thanks for your help jahhaj12345! What I ended up doing was to create a custom LoginCommand class. I used the one from here: http://blog.f4k3.net/fake/entry/acegi_logincommand_for_fds. I made two changes shown below: //The name of our Acegi configuration file. private static String[] CONFIG_LOCATIONS = {classpath:security-context.xml}; //ldapAuthenticationProvider is from our Acegi config file, and it the name of the bean that is used for authentication via LDAP. authenticationProvider = (AuthenticationProvider)applicationContext.getBean(ldapAuthenticationProvider); I then updated services-config.xml and added: security login-command class=com.gdais.security.AcegiLoginCommand server=Tomcat/ security-constraint id=basic-read-access auth-methodBasic/auth-method roles roleROLE_MANAGERS/role roleROLE_USERS/role /roles /security-constraint /security //The roles came from the Acegi config file. After that, I had to add the [managed] metadata tag to one of my ValueObjects and it all seemed to work. I'll be honest, I don't really understand why this works, it just does. What I mean by 'works' is that the managed collection on the client gets filled with data successfully. I haven't yet tested pushing new entries to that managed collection after the initial fill. I hope this post helps someone else. ~Geoff --- In flexcoders@yahoogroups.com, jahhaj12345 halvorsonj@ wrote: I don't know of a way to just authenticate the client. From everything I've read, you have to authenticate the HTTP and RTMP sessions individually. For my application, I had to create my own LoginCommand to handle the flex RTMP authentication. Here's my understanding of how it's working for me: 1. On my client, I get the channelset to use and then call channelSet.login(username, password). You could also call the setCredentials on the actual DataService the same way, but my services are all created at runtime on the server instead of being statically defined in services-config.xml. 2. That channelSet (or dataservice) from above authenticates through the login-command configured in services-config.xml. This is where the custom LoginCommand I created is configured. The doAuthentication function of LoginCommand is as follows: public Principal doAuthentication(String username, Object credentials) { Authentication auth = authenticationProvider.authenticate(new UsernamePasswordAuthenticationToken(username, credentials)); // authenticationProvider is a spring security DaoAuthenticationProvider SecurityContextHolder.getContext().setAuthentication(auth); return auth; } This should authenticate the RTMP session. I don't know if this is the best way, but it seems to work. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I'm guessing that we don't implement security the correct way (or the best way) right now. Currently, I have a login State that takes the username and password and makes an HTTPService call to the JSP page that does user authentication. If that comes back successfully, then I change State to the main application. That seems to take care of all of the HTTP requests, but the RTMP requests obviously fail (or else I wouldn't be here ;-)). I read the docs about using LoginCommand, but I didn't see how that ties into Acegi. I'm wondering if you can authenticate the Flex client, and not just the session. If so, wouldn't the sessions (HTTP and RTMP) also be authenticated since they fall under the FlexClient object? Just a thought. Geoff --- In flexcoders@yahoogroups.com, jahhaj12345 halvorsonj@ wrote: I'm having the same problems you are. I've been through several options but haven't found one that's acceptable from a security point of view if you are trying to use the rememberme functionality. To get it working without rememberme, provide a login form from your flex application and once authenticated using form login, use that username/password
[flexcoders] LCDS: Debug RTMP Traffic
I'm having some issues with 2 DataServices running over RTMP. The first DataService loads on application startup and work fine (I get data). The second load later on in the application, but this one get's no data. It doesn't appear that it even makes the connect request because my result and fault handlers don't get hit. Is there a tool (like Charles, ServiceCapture, or Wireshark) that can be used to verify that something over an RTMP channel is being sent from the client? Like I said, nothing seems to happen when I issue the DataService.connect() call. I've enabled a bunch of logging on the server(via the services-config.xml file), but if that traffic isn't reaching the server, all the logging in the world won't help. BTW, if you say that Wireshark can be used, then please post the filter you use because I couldn't figure out one that only showed RTMP traffic. As a matter of fact, I couldn't find anything that looked like RTMP traffic in the log session. I don't know if it's important or not, but the server and the client are all running locally. Env: Tomcat 6.0.16 LCDS 2.6 Flex 3 Thanks, ~Geoff
[flexcoders] Re: LCDS: Debug RTMP Traffic
I'll try using the TraceTarget class. Our config uses port 2040 for RTMP. I tried filtering on tcp.port==2040, but that didn't seem to get anything. I also tried rtmp.port==2040 and rtmpt.port==2040. Those didn't seem to work either. By 'work' I mean that when the filter was applied, there were no network activity listed in the Wiresshark top panel. Any other ideas on filtering? --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: Have you tried enabling the client side debug logging with mx:TraceTarget/? You get the highest level client side tracing that way... just make sure you use the debug player, then look in the flashlog.txt. For wireshark, I think you can probably filter based on the server port used to establish the connection. Look at your RTMP configuration but typically it is 2038 or 1935 or something like that. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Friday, September 19, 2008 7:35 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS: Debug RTMP Traffic I'm having some issues with 2 DataServices running over RTMP. The first DataService loads on application startup and work fine (I get data). The second load later on in the application, but this one get's no data. It doesn't appear that it even makes the connect request because my result and fault handlers don't get hit. Is there a tool (like Charles, ServiceCapture, or Wireshark) that can be used to verify that something over an RTMP channel is being sent from the client? Like I said, nothing seems to happen when I issue the DataService.connect() call. I've enabled a bunch of logging on the server(via the services-config.xml file), but if that traffic isn't reaching the server, all the logging in the world won't help. BTW, if you say that Wireshark can be used, then please post the filter you use because I couldn't figure out one that only showed RTMP traffic. As a matter of fact, I couldn't find anything that looked like RTMP traffic in the log session. I don't know if it's important or not, but the server and the client are all running locally. Env: Tomcat 6.0.16 LCDS 2.6 Flex 3 Thanks, ~Geoff
[flexcoders] Re: LCDS: Debug RTMP Traffic
TraceTarget reported the following when the UI with the second DataService loads: 'C44F8220-F189-21B2-CC03-874C13991A33' producer set destination to 'DefaultHTTP'. 'direct_http_channel' channel endpoint set to http://localhost:8080/main/ 'cds-consumer-tasks-null' consumer set destination to 'tasks'. Configuration for destination='tasks': properties metadata identity property=id/ /metadata network paging enabled=false/ /network use-transactionstrue/use-transactions /properties New DataService for destination: tasks '19BCB91C-2215-DC18-D015-874C6044FDA8' producer set destination to 'tasks'. Creating a new independent data store for destination: tasks Adding data service: tasks to the data store: null initialized: false LSODatabase close(): null TaskDS.as: Connecting to DataService. 'ds-producer-tasks' producer connected. 'ds-producer-tasks' producer acknowledge of '1EBA99AC-11A5-3E3B-0B1C-874C60449CA4'. This is the last thing it reports related to DataServices. It looks like the DataService attempts to connect, but I'm missing all the connection jazz that I get from the first DataService connection (namely RTMP stuff. Am I reading this right? Looks like it's trying to connect over an HTTP channel). Here's what a successful connection looks like: ConfigDS.as: Connecting to DataService. 'my-rtmp' channel endpoint set to rtmp://localhost:2039 'my-rtmp' channel settings are: channel id=my-rtmp type=mx.messaging.channels.RTMPChannel endpoint uri=rtmp://localhost:2039/ properties/ /channel 'my-rtmp' channel got connect attempt status. (Object)#0 code = NetConnection.Connect.Success description = Connection succeeded. details = (null) DSMessagingVersion = 1 id = A66F4650-DB1E-E678-DB08-C1CD3BF2591A level = status objectEncoding = 3 'my-rtmp' channel is connected. 'ds-producer-configurationData' producer acknowledge of '0ADAF447-0616-0F7B-376A-8758AC3385D9'. 'ds-producer-configurationData' producer connected. ConfigDS.as: Connection to DataService success. --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: I'll try using the TraceTarget class. Our config uses port 2039 for RTMP. I tried filtering on tcp.port==2039, but that didn't seem to get anything. I also tried rtmp.port==2039 and rtmpt.port==2039. Those didn't seem to work either. By 'work' I mean that when the filter was applied, there were no network activity listed in the Wiresshark top panel. Any other ideas on filtering? --- In flexcoders@yahoogroups.com, Jeff Vroom jvroom@ wrote: Have you tried enabling the client side debug logging with mx:TraceTarget/? You get the highest level client side tracing that way... just make sure you use the debug player, then look in the flashlog.txt. For wireshark, I think you can probably filter based on the server port used to establish the connection. Look at your RTMP configuration but typically it is 2038 or 1935 or something like that. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Friday, September 19, 2008 7:35 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS: Debug RTMP Traffic I'm having some issues with 2 DataServices running over RTMP. The first DataService loads on application startup and work fine (I get data). The second load later on in the application, but this one get's no data. It doesn't appear that it even makes the connect request because my result and fault handlers don't get hit. Is there a tool (like Charles, ServiceCapture, or Wireshark) that can be used to verify that something over an RTMP channel is being sent from the client? Like I said, nothing seems to happen when I issue the DataService.connect() call. I've enabled a bunch of logging on the server(via the services-config.xml file), but if that traffic isn't reaching the server, all the logging in the world won't help. BTW, if you say that Wireshark can be used, then please post the filter you use because I couldn't figure out one that only showed RTMP traffic. As a matter of fact, I couldn't find anything that looked like RTMP traffic in the log session. I don't know if it's important or not, but the server and the client are all running locally. Env: Tomcat 6.0.16 LCDS 2.6 Flex 3 Thanks, ~Geoff
[flexcoders] Re: LCDS: Debug RTMP Traffic
Our endpoints are created in the services-config.xml, and the destinations for DataServices are configured in data-management-config.xml. the RTMP endpoint config is as such: channel-definition id=my-rtmp class=mx.messaging.channels.RTMPChannel endpoint url=rtmp://localhost:2039 class=flex.messaging.endpoints.RTMPEndpoint/ properties idle-timeout-minutes30/idle-timeout-minutes /properties /channel-definition A DataService destination looks like: default-channels channel ref=my-rtmp/ /default-channels destination id=tasks adapter ref=java-adapter / properties use-transactionstrue/use-transactions sourceblah.blah.blah.TasksDelegate/source scopeapplication/scope cache-itemsfalse/cache-items metadata identity property=id/ /metadata network subscription-timeout-minutes0/subscription-timeout-minutes paging enabled=false/ /network /properties /destination The two destinations are identical, except for the source class. I am using the compiler argument [-services C:\workspace\flex\src\main\webapp\WEB-INF\flex\services-config.xml], which points to the correct services-config.xml file. The task DataService is created in ActionScript like so: // Create a datasource __ds = new DataService(tasks); __ds.cacheID = ExpTasks; __ds.autoSaveCache = false; __ds.autoConnect = false; __ds.autoCommit = false; __ds.addEventListener(DataConflictEvent.CONFLICT, onDataConflict, false, 0, true); __ds.addEventListener(DataServiceFaultEvent.FAULT, onDataServiceFault, false, 0, true); // Connect to datasource connect(); The connect() method just registers some event listeners and then calls __ds.connect(). The whole point to this is that we intend to replace our 30 Java delegates and 130+ remote methods with DataServices so our application can run in offline mode (assuming there's cached data). If there's a better way to do this, I'm open to suggestions. Thanks, Geoff --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: Yeah, it looks like somehow you are getting a DataService trying to use a DirectHTTPChannel.That only works for for HTTPService, and WebService. DataService needs a channelSet which supports AMF (AMFChannel, or RTMPChannel).I'm confused how you are getting into this situation though... those get created on the client via the endpoint property on some services or you can define one explicitly in ActionScript or MXML.Can you show how this tasks destination is getting defined in ActionScript? How is its channelSet specified - on the client via the channelSet property or on the server? If it is on the server, make sure you are compiling against the services-config.mxml file (it is a project/compiler option). Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Sunday, September 21, 2008 5:04 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: LCDS: Debug RTMP Traffic TraceTarget reported the following when the UI with the second DataService loads: 'C44F8220-F189-21B2-CC03-874C13991A33' producer set destination to 'DefaultHTTP'. 'direct_http_channel' channel endpoint set to http://localhost:8080/main/ 'cds-consumer-tasks-null' consumer set destination to 'tasks'. Configuration for destination='tasks': properties metadata identity property=id/ /metadata network paging enabled=false/ /network use-transactionstrue/use-transactions /properties New DataService for destination: tasks '19BCB91C-2215-DC18-D015-874C6044FDA8' producer set destination to 'tasks'. Creating a new independent data store for destination: tasks Adding data service: tasks to the data store: null initialized: false LSODatabase close(): null TaskDS.as: Connecting to DataService. 'ds-producer-tasks' producer connected. 'ds-producer-tasks' producer acknowledge of '1EBA99AC-11A5-3E3B-0B1C-874C60449CA4'. This is the last thing it reports related to DataServices. It looks like the DataService attempts to connect, but I'm missing all the connection jazz that I get from the first DataService connection (namely RTMP stuff. Am I reading this right? Looks like it's trying to connect over an HTTP channel). Here's what a successful connection looks like: ConfigDS.as: Connecting to DataService. 'my-rtmp' channel endpoint set to rtmp://localhost:2039 'my-rtmp' channel settings are: channel id=my-rtmp type=mx.messaging.channels.RTMPChannel endpoint uri=rtmp://localhost:2039/ properties/ /channel 'my-rtmp' channel got connect attempt status. (Object)#0 code = NetConnection.Connect.Success description = Connection succeeded. details = (null) DSMessagingVersion = 1 id = A66F4650-DB1E-E678-DB08-C1CD3BF2591A level = status objectEncoding = 3 'my-rtmp' channel is connected. 'ds-producer-configurationData' producer acknowledge of '0ADAF447-0616-0F7B-376A-8758AC3385D9'. 'ds-producer-configurationData' producer
[flexcoders] Re: LCDS: Debug RTMP Traffic
Adobe support thought that it might be that too, but it doesn't look like that's the issue since it didn't really do anything different when I commented that out. --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: I'll try using the TraceTarget class. Our config uses port 2040 for RTMP. I tried filtering on tcp.port==2040, but that didn't seem to get anything. I also tried rtmp.port==2040 and rtmpt.port==2040. Those didn't seem to work either. By 'work' I mean that when the filter was applied, there were no network activity listed in the Wiresshark top panel. Any other ideas on filtering? --- In flexcoders@yahoogroups.com, Jeff Vroom jvroom@ wrote: Have you tried enabling the client side debug logging with mx:TraceTarget/? You get the highest level client side tracing that way... just make sure you use the debug player, then look in the flashlog.txt. For wireshark, I think you can probably filter based on the server port used to establish the connection. Look at your RTMP configuration but typically it is 2038 or 1935 or something like that. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Friday, September 19, 2008 7:35 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS: Debug RTMP Traffic I'm having some issues with 2 DataServices running over RTMP. The first DataService loads on application startup and work fine (I get data). The second load later on in the application, but this one get's no data. It doesn't appear that it even makes the connect request because my result and fault handlers don't get hit. Is there a tool (like Charles, ServiceCapture, or Wireshark) that can be used to verify that something over an RTMP channel is being sent from the client? Like I said, nothing seems to happen when I issue the DataService.connect() call. I've enabled a bunch of logging on the server(via the services-config.xml file), but if that traffic isn't reaching the server, all the logging in the world won't help. BTW, if you say that Wireshark can be used, then please post the filter you use because I couldn't figure out one that only showed RTMP traffic. As a matter of fact, I couldn't find anything that looked like RTMP traffic in the log session. I don't know if it's important or not, but the server and the client are all running locally. Env: Tomcat 6.0.16 LCDS 2.6 Flex 3 Thanks, ~Geoff
[flexcoders] Re: LCDS: Debug RTMP Traffic
As it turns out, there appears to be a bug in DataServices. To be more specific, the DataStore object that sits between the DataService and the server does not dispatch a result or fault event when the second DataService connects via the DataService.connect() call. --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: Adobe support thought that it might be that too, but it doesn't look like that's the issue since it didn't really do anything different when I commented that out. --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I'll try using the TraceTarget class. Our config uses port 2040 for RTMP. I tried filtering on tcp.port==2040, but that didn't seem to get anything. I also tried rtmp.port==2040 and rtmpt.port==2040. Those didn't seem to work either. By 'work' I mean that when the filter was applied, there were no network activity listed in the Wiresshark top panel. Any other ideas on filtering? --- In flexcoders@yahoogroups.com, Jeff Vroom jvroom@ wrote: Have you tried enabling the client side debug logging with mx:TraceTarget/? You get the highest level client side tracing that way... just make sure you use the debug player, then look in the flashlog.txt. For wireshark, I think you can probably filter based on the server port used to establish the connection. Look at your RTMP configuration but typically it is 2038 or 1935 or something like that. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Friday, September 19, 2008 7:35 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS: Debug RTMP Traffic I'm having some issues with 2 DataServices running over RTMP. The first DataService loads on application startup and work fine (I get data). The second load later on in the application, but this one get's no data. It doesn't appear that it even makes the connect request because my result and fault handlers don't get hit. Is there a tool (like Charles, ServiceCapture, or Wireshark) that can be used to verify that something over an RTMP channel is being sent from the client? Like I said, nothing seems to happen when I issue the DataService.connect() call. I've enabled a bunch of logging on the server(via the services-config.xml file), but if that traffic isn't reaching the server, all the logging in the world won't help. BTW, if you say that Wireshark can be used, then please post the filter you use because I couldn't figure out one that only showed RTMP traffic. As a matter of fact, I couldn't find anything that looked like RTMP traffic in the log session. I don't know if it's important or not, but the server and the client are all running locally. Env: Tomcat 6.0.16 LCDS 2.6 Flex 3 Thanks, ~Geoff
[flexcoders] TextInput with Prompt
If you don't have a lot of space for a label next to a TextInput, then you may want to try using my TextInputPrompted class. You use this class just like you would any other TextInput, but there's an extra prompt property. Whatever you set prompt to is displayed in the TextInput in light grey. Once you start typing something in the TextInput, the prompt will go away, and the text turns dark. Here's a blog about it http://gtb104.blogspot.com/2008/10/new-flex-class.html .
[flexcoders] Resource Bundle Missing in AIR
I'm using localization on a flex project for a slightly different use. We have 2 projects that share the same code base, but we want to change some UI text that's displayed. So, we're using localization to swap certain text strings to be project specific. Everything works fine for the web version, but if I try to take that same localization setup and use it in our AIR version, it cannot find the required resource bundles. I've looked and they(web/AIR) appear to be set up identically. My locales are: en_US_ProjA and en_US_ProjB. The AIR compiler argument is -locale=en_US,en_US_ProjA. I only put the one project in to test getting the proper resource. My directories are: projRoot.src.locale.en_US.* projRoot.src.locale.en_US_ProjA.* projRoot.src.locale.en_US_ProjB.* When I debug a piece of localization code I see that the localeMap has 2 entries, en_US and en_US_ProjA. Both contain the same entries, but the properties files are pointing to different Obects. For example: en_US_ProjA$CairngormMessages_properties (@c3547b9). I should be seeing a UI_Text property file in the list of resource bundle objects, but it's missing. I'm stumped as to why it works just fine from a browser, but pukes in AIR. Thanks, Geoff
[flexcoders] Re: Resource Bundle Missing in AIR
Still have not found a fix for this. Any one else run into an issue like this? Thanks, Geoff --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: I'm using localization on a flex project for a slightly different use. We have 2 projects that share the same code base, but we want to change some UI text that's displayed. So, we're using localization to swap certain text strings to be project specific. Everything works fine for the web version, but if I try to take that same localization setup and use it in our AIR version, it cannot find the required resource bundles. I've looked and they(web/AIR) appear to be set up identically. My locales are: en_US_ProjA and en_US_ProjB. The AIR compiler argument is -locale=en_US,en_US_ProjA. I only put the one project in to test getting the proper resource. My directories are: projRoot.src.locale.en_US.* projRoot.src.locale.en_US_ProjA.* projRoot.src.locale.en_US_ProjB.* When I debug a piece of localization code I see that the localeMap has 2 entries, en_US and en_US_ProjA. Both contain the same entries, but the properties files are pointing to different Obects. For example: en_US_ProjA$CairngormMessages_properties (@c3547b9). I should be seeing a UI_Text property file in the list of resource bundle objects, but it's missing. I'm stumped as to why it works just fine from a browser, but pukes in AIR. Thanks, Geoff
[flexcoders] Re: Resource Bundle Missing in AIR - Solved
RTFM mx:Metadata [ResourceBundle(Resource_file_name)] /mx:Metadata Forgot this part --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: Still have not found a fix for this. Any one else run into an issue like this? Thanks, Geoff --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I'm using localization on a flex project for a slightly different use. We have 2 projects that share the same code base, but we want to change some UI text that's displayed. So, we're using localization to swap certain text strings to be project specific. Everything works fine for the web version, but if I try to take that same localization setup and use it in our AIR version, it cannot find the required resource bundles. I've looked and they(web/AIR) appear to be set up identically. My locales are: en_US_ProjA and en_US_ProjB. The AIR compiler argument is -locale=en_US,en_US_ProjA. I only put the one project in to test getting the proper resource. My directories are: projRoot.src.locale.en_US.* projRoot.src.locale.en_US_ProjA.* projRoot.src.locale.en_US_ProjB.* When I debug a piece of localization code I see that the localeMap has 2 entries, en_US and en_US_ProjA. Both contain the same entries, but the properties files are pointing to different Obects. For example: en_US_ProjA$CairngormMessages_properties (@c3547b9). I should be seeing a UI_Text property file in the list of resource bundle objects, but it's missing. I'm stumped as to why it works just fine from a browser, but pukes in AIR. Thanks, Geoff
[flexcoders] saveCache() - Couldn't acquire lock error.
I'm getting an error when trying to save fill results to the local cache. Here's the error spew: onSaveCacheFault(): ERROR: (mx.messaging.messages::ErrorMessage)#0 body = (Object)#1 clientId = (null) correlationId = destination = extendedData = (null) faultCode = Client.Save.Failed faultDetail = Couldn't acquire lock. Operation failed. faultString = Could not save local cache: Error: Couldn't acquire lock. Operation failed. at LSODBStore/acquireLock()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\projects\data\src\mx\data \LSODatabase.as:659] at LSODBStore/begin()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\projects\data\src\mx\data\LSODa tabase.as:422] at mx.data::LSODatabase/begin()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\projects\data\src\mx\ data\LSODatabase.as:142] at mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::saveCache()[C:\depot\flex\branches\enterp rise_corfu_rc\frameworks\projects\data\src\mx\data\DataStore.as:2636] at anonymous()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\projects\data\src\mx\data\ConcreteDa taService.as:1771] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.rpc::AsyncDispatcher/timerEventHandler() at flash.utils::Timer/_timerDispatch() at flash.utils::Timer/tick() headers = (Object)#2 messageId = 9F56BAD2-667A-6A94-F8A7-8DF33BE3B59E rootCause = (null) timestamp = 0 timeToLive = 0 The command I use to save to cache is: __ds.saveCache(); This is quite perplexing as it was working fine until I loaded a new workspace for some other work. Ever since I've come back to the Flex workspace, it's failed to save to the local cache. Any ideas would be appreciated. ~Geoff
[flexcoders] LCDS: DataService.fill() not filling
Does anyone know what would prevent a DataService.fill() call to not populate it's managed collection? I have an ArrayCollection that is the dataProvider for a DataGrid. I see that data is coming back from the fill() call, but it doesn't appear to be passing that data to the ArrayCollection. If I inspect that variable after the fill() completes, it's empty. I double checked that the ArrayCollection that I'm passing to the fill() method is indeed the one that is used as the dataProvider. Any thoughts would be appreciated. ~Geoff