[flexcoders] VO problem
Hi List, I have some problems with my ValueObjects. First I give you my system configuration: SuSE Linux 9.2 Tomcat 5.5.7 Flex 1.5 Eclipse 3 Java 1.5 In my application I have Java Value Objects on the server side and I mapped them to my ActionScript 2.0 with Object.registerClass(). My problem is FLEX seems not to notice changes on the Java Value Objects. If I add a variable to the Java VO and the AS2 VO FLEX doesn't show it. I started tomcat again, no change. To check if I did the AS2 VOs correctly I used Java2AS written by Christophe Conraets. Here is the same effect. I change the Java VO, restart FLEX and Java2AS shows no change. I checked the class file created by Java, the changes are in there. The Java VO works fine in Java, every change is in it and the class file is composed in the WEB-INF/classes directory of my FLEX app. I'm a little bit confused. Is there any cache or something like that I can delete? Or is there anything in the flex-config.xml I didn't notice? I appreciate for any help. Greets Christoph -- Christoph Guse Löhstraße 34 41747 Viersen Tel. 0 21 62 / 50 24 066 Mobil 01 72 / 160 74 84 VoIP 0 12 12 / 39 64 48 831 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: I need assistance with datdgrid row height.
yes, the problem is that I am using a textArea in the cell renderer and I can't set the height of the textArea to something like a variableRowHeight. I just created to columns, which I was trying to avoid but no big deal, and got rid of the cell renderer. thanks though. --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Did you also set wordWrap=true on the appropriate DataGridColumn? Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ryan99899 Sent: Thursday, May 26, 2005 5:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] I need assistance with datdgrid row height. I am loading search results in a datagrid and I need to make the row heights automatically change based on the length of the text. variableRowHeight is not getting the job done. The problem may lie in the cell renderer but I need a suggestion to fix this. Thanks ryan Yahoo! Groups Links 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] unable to invoke right clicking in apllication
I want to implement context menu for different components in my application. The right click need to be implemented in Tree, DataGrid and TileList. My context menu is the same as given in Chapter 10 of Developing Rich Clients with Macromedia Flex, Components: Designing for Resuability. I want to show dynamic context menu item based on where the user has right clicked in the Tree. The tree is in panel having linkbar above the tree. Now when i right click on the tree, the right click only works on the panel and linkbar but does not work when i try to right click on tree. The correct menu Item does not appear when I right click on the tree. I want the right click to function only on the tree and not on panel. I have attached with this mail the code i am working on. It would be great if someone could help me out with this. Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony 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/ MvelopesTree1.mxml Description: 1673402403-MvelopesTree1.mxml
RE: [flexcoders] right mouse click in flex
Hi, ContextMenu only works with top-level objects in Flex application. ContextMenu wouldn't work with any nested object/component, I believe that is why it is not working with Tree in your case. Macromedia Flash Player team is looking into this issue and we hope it gets resolved in future version of Flash Player. For now, you can have ContextMenu at application level and show relevant menu-items by finding out where mouse is, when right-click happens. Please search the flexcoders archives, there has been some discussions on the same. http://www.mail-archive.com/flexcoders@yahoogroups.com/ Hope that helps... Thanks -abdul -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of shettyaditsathish Sent: Friday, May 27, 2005 11:51 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] right mouse click in flex I have created a context menu in my root application. Now i have different components in my root application.I have a tree and a datagrid which are the child components of my root application. Now in the component in which tree is created ,there is a link bar (i.e. on top of the tree).There is also a panel on top of tree and Link bar.Now the problem is that the right click functionality i have created only shows up on the linkBar and panel even though all the three are in the same component. It never shows up on the tree.Same is the problem with datagrid,when i give the id of the component to the contextOver attribute of context menu.i have tried my best.Please if someone could help me out it would be great. If someone could give me help on how to invoke the right click functionality on the right click of a node of a tree it would be great. Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] CFlogin, SetCredentials and the RemoteObject
What version of CF are you using Dave? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dave buhlerSent: Friday, May 27, 2005 10:36 AMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] CFlogin, SetCredentials and the RemoteObject Thanks! On 5/27/05, Indy Nagpal [EMAIL PROTECTED] wrote: Yes, I think that is the logic behind "named" objects.On 5/27/05, dave buhler [EMAIL PROTECTED] wrote:Interesting...So if I use the named remote objects in the flex-config file, the paths to the CFCs aren't visible?I should use a decompiler on my own app to see, but I had assumed the paths would be compiled.Dave On 5/26/05, Indy Nagpal [EMAIL PROTECTED] wrote: Have you looked at creating named remoteobjects? That way even though the methods might be visible in the decompiler, but path to the actual cfc won't be. Hmm... regarding your swf file finally being part of cfm page... I've find myself more comfortable with "standalone" flex apps (that interact with CF through remoteobject) rather and flex apps embedded in cfm pages. I find debugging quite painful when a flex app is embbed in a cfm page. Indy On 5/27/05, dave buhler [EMAIL PROTECTED] wrote: I was debating if I should have my login page exist within HTML or as a sep., stand alone MXML page.I mention it because I'm pretty sure the CFC method names and service names would be visible to a decompiler and thus, visible to any user who stumbles across the Flex Admin system or has just simple access to the Login screen, if the login is part of the overall Admin SWF. Ultimately, my MXML will be a CFM page and I was going to only show the Flex SWF if the session is valid, otherwise, kick them back to the sep.login page. Any thoughts? Dave On 5/25/05, Indy Nagpal [EMAIL PROTECTED] wrote: Hi Dave: Here is my setup, I don't know if this helps. I have a CF application where users need to login. Once they successfully plug in their username and password, their session is setup (I'm using jessionid). I have a cfc (with relevant functions forlogin/logout) that is used for authenticating users and setting up session. I call that cfc as remoteobject, firing the login function in the cfc,passing it the username and password. If the login is successful, the session for the user is setup and all is sweet. I can access the user's session info through the same cfc (i have a function that returns their session structure Flex. And my Flex code can then look at the session object of the user and do what it needs to. I think the key for you would be to get jsessionid going, along withusing functions within a cfc to validate the user and return user's session (or any other value that you want to return to flex). Indy On 5/26/05, dave buhler [EMAIL PROTECTED] wrote: Hi Indy, I understand setting up perhaps the username and password as a session variable. Can you show me an example of how you are passing over the username and password in the remote object? I can see adding it as something like the following on each request: service.getKittens(loginVO,kittensVO) ...but was wondering if there was another method that is used directly with the remote object configuration. Dave On 5/24/05, Indy Nagpal [EMAIL PROTECTED] wrote: Hi Dave: I've never tried using RemoteObject with cflogin, but RemoteObject works very nicely with CF session variables, so it should be able to pass that information to your application. To get it to work with session variables, I was using CF and Flex on the same server, and had turned on jsessionid (in CF Admin). Indy On 5/23/05, dave buhler [EMAIL PROTECTED] wrote: Does the RemoteObject permit the passing of a username and password to a CFLogin tag? I want to create an instance of NetConnection and include setCredentials(username,password) to pass over to my remote object for a valid user check on each request. If it's not supported in Flex, does anyone have any suggestions so that we can ensure a valid username and password is part of each remote CFC request. Best, mx.controls.Alert.show('Dave') 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
RE: [flexcoders] Converting Java POJO to Actionscript Errors
Hari- THanks for your response. I tried that but I got a compilation error that there is no method with the name MyPojo. I suppose that means I have to manually write the underlying ActionScript class for my Java POJO? That just seems like a really bad implementation design b/c if MyPojo Java class changes, then I have to manually change my ActionScript class. urr...what am I missing?! --- Doodi, Hari - BLS CTR [EMAIL PROTECTED] wrote: Try this. mx:script... var newObj:Object = new MyPojo(); // constructor of your POJO function addToGrid() { newObj = remoteObj.getNewJob(); myDataGrid.addItem(newObj); } /mx:script Thanks! Hari -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Friday, May 27, 2005 9:46 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Converting Java POJO to Actionscript Errors Gang- I'm a newbie and all the flexdocs on MM's site couldn't give me a concrete answer. I have a datagrid that is populated from an ArrayList of POJO's (using the remote object). That works fine. I then have another method that is called 30 seconds later then returns a single POJO (of the same type from the POJOs returned in the first method). I then try to add it to my datagrid using the myDatagrid.addItem(newObj), but I get the below debug error. Warning: Reference to undeclared variable, '_global.com.MyPojo' at mx_utils_ClassUtil::findClass() Warning: valueOf is not a function at mx_utils_ClassUtil::getFlexClass() Is there a special way I need to declare 'newObj' (which I pass into the datagrid.addItem() method), or do I have to explicity write the AS-equilavent class of my Java POJO class? I would think Flex could convert this class for me, but I'm obviously missing an important step to add it to the datagrid/dataprovider. Thanks in advance for your help. mx:script... var newObj:Object; function addToGrid() { newObj = remoteObj.getNewJob(); myDataGrid.addItem(newObj); } /mx:script mx:DataGrid id=myDataGrid dataProvider={remoteObj.getAll.result} ... Yahoo! Groups Links __ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Converting Java POJO to Actionscript Errors
Hi, First couple of questions - did you register your POJO with AS class using Object.registerClass( ) method? What is the constructor method of you Pojo ? After both of above are in place(implemented) then you can create new object of your POJO type and assign your newly returned object to it and then add this new object to your datagrid using myDataGrid.addItem( ); This is what I did. AS class looks like class classes.MyPojo { public var myArray:Array; private static var registered:Boolean = Object.registerClass(full path of you java class goes here, classes. MyPojo); } In my MXML you can ignore statements which sets initial attribute values function addRow() { var oNewItem:Object = new MyPojo (); oNewItem.adj_num = 12 ; oNewItem.adj_type = ; oNewItem.adj_category = ; oNewItem.adj_amt_terms_desc = Doodi; oNewItem.adj_reporter_applied_flag = N; oNewItem.adj_sign = Additive; oNewItem.adj_factor = ; oNewItem.adj_order_applied = 12; myDataGrid.addItem(oNewItem); focusNewRow(); doLater(this,focusNewRow); } Thanks! Hari -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of suzy lawson Sent: Friday, May 27, 2005 10:22 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Converting Java POJO to Actionscript Errors Hari- THanks for your response. I tried that but I got a compilation error that there is no method with the name MyPojo. I suppose that means I have to manually write the underlying ActionScript class for my Java POJO? That just seems like a really bad implementation design b/c if MyPojo Java class changes, then I have to manually change my ActionScript class. urr...what am I missing?! --- Doodi, Hari - BLS CTR [EMAIL PROTECTED] wrote: Try this. mx:script... var newObj:Object = new MyPojo(); // constructor of your POJO function addToGrid() { newObj = remoteObj.getNewJob(); myDataGrid.addItem(newObj); } /mx:script Thanks! Hari -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Friday, May 27, 2005 9:46 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Converting Java POJO to Actionscript Errors Gang- I'm a newbie and all the flexdocs on MM's site couldn't give me a concrete answer. I have a datagrid that is populated from an ArrayList of POJO's (using the remote object). That works fine. I then have another method that is called 30 seconds later then returns a single POJO (of the same type from the POJOs returned in the first method). I then try to add it to my datagrid using the myDatagrid.addItem(newObj), but I get the below debug error. Warning: Reference to undeclared variable, '_global.com.MyPojo' at mx_utils_ClassUtil::findClass() Warning: valueOf is not a function at mx_utils_ClassUtil::getFlexClass() Is there a special way I need to declare 'newObj' (which I pass into the datagrid.addItem() method), or do I have to explicity write the AS-equilavent class of my Java POJO class? I would think Flex could convert this class for me, but I'm obviously missing an important step to add it to the datagrid/dataprovider. Thanks in advance for your help. mx:script... var newObj:Object; function addToGrid() { newObj = remoteObj.getNewJob(); myDataGrid.addItem(newObj); } /mx:script mx:DataGrid id=myDataGrid dataProvider={remoteObj.getAll.result} ... Yahoo! Groups Links __ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Converting Java POJO to Actionscript Errors
Hari, Thanks...I'll give this a shot. So my question is, why do I have to write a matching AS class to match my POJO? When I populate my Datagrid from the remote object (arraylist of POJOs), I din't have to write any AS classes. --- Doodi, Hari - BLS CTR [EMAIL PROTECTED] wrote: Hi, First couple of questions - did you register your POJO with AS class using Object.registerClass( ) method? What is the constructor method of you Pojo ? After both of above are in place(implemented) then you can create new object of your POJO type and assign your newly returned object to it and then add this new object to your datagrid using myDataGrid.addItem( ); This is what I did. AS class looks like class classes.MyPojo { public var myArray:Array; private static var registered:Boolean = Object.registerClass(full path of you java class goes here, classes. MyPojo); } In my MXML you can ignore statements which sets initial attribute values function addRow() { var oNewItem:Object = new MyPojo (); oNewItem.adj_num = 12 ; oNewItem.adj_type = ; oNewItem.adj_category = ; oNewItem.adj_amt_terms_desc = Doodi; oNewItem.adj_reporter_applied_flag = N; oNewItem.adj_sign = Additive; oNewItem.adj_factor = ; oNewItem.adj_order_applied = 12; myDataGrid.addItem(oNewItem); focusNewRow(); doLater(this,focusNewRow); } Thanks! Hari -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of suzy lawson Sent: Friday, May 27, 2005 10:22 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Converting Java POJO to Actionscript Errors Hari- THanks for your response. I tried that but I got a compilation error that there is no method with the name MyPojo. I suppose that means I have to manually write the underlying ActionScript class for my Java POJO? That just seems like a really bad implementation design b/c if MyPojo Java class changes, then I have to manually change my ActionScript class. urr...what am I missing?! --- Doodi, Hari - BLS CTR [EMAIL PROTECTED] wrote: Try this. mx:script... var newObj:Object = new MyPojo(); // constructor of your POJO function addToGrid() { newObj = remoteObj.getNewJob(); myDataGrid.addItem(newObj); } /mx:script Thanks! Hari -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Friday, May 27, 2005 9:46 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Converting Java POJO to Actionscript Errors Gang- I'm a newbie and all the flexdocs on MM's site couldn't give me a concrete answer. I have a datagrid that is populated from an ArrayList of POJO's (using the remote object). That works fine. I then have another method that is called 30 seconds later then returns a single POJO (of the same type from the POJOs returned in the first method). I then try to add it to my datagrid using the myDatagrid.addItem(newObj), but I get the below debug error. Warning: Reference to undeclared variable, '_global.com.MyPojo' at mx_utils_ClassUtil::findClass() Warning: valueOf is not a function at mx_utils_ClassUtil::getFlexClass() Is there a special way I need to declare 'newObj' (which I pass into the datagrid.addItem() method), or do I have to explicity write the AS-equilavent class of my Java POJO class? I would think Flex could convert this class for me, but I'm obviously missing an important step to add it to the datagrid/dataprovider. Thanks in advance for your help. mx:script... var newObj:Object; function addToGrid() { newObj = remoteObj.getNewJob(); myDataGrid.addItem(newObj); } /mx:script mx:DataGrid id=myDataGrid dataProvider={remoteObj.getAll.result} ... Yahoo! Groups Links __ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ Yahoo! Groups Links __ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ 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] The Softer Side of On Demand: A Peek at Software and Workflow News
http://members.whattheythink.com/home/od05sherburne7.cfm "...Exstream was showing its brand-new Dialogue Version 5, which, according to Vice President of Marketing Kelley Sloane, has over 250 enhancements. With this release, Exstream teamed up with Macromedia to use its Flex Server to create Dialogue Anywhere for Marketing, allowing creation of a rich Internet user experience and the ability to create an interface similar to a PC. Sloane claims Exstream is the first company to deploy an application like this, designed for corporations that have marketing staff scattered in various geographic locations. Users can log on to Dialogue, create marketing messages and rules, and send their work for approval under a defined workflow cycle, having them incorporated in documents at run time.." 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 the Yahoo! Terms of Service.
[flexcoders] Data Binding and Server Objects
If I'm getting objects from a web service and want to use them in data binding, do I have to re-create them in ActionScript in order for their various properties and sub-objects to be bindable? Ideally, I'd like to just use what the server gives me and not rewrite the objects in AS. i.e.: (in my ModelLocator) public static var userInfo:Object; (in my GetUserCommand) ModelLocator.userInfo = event.result[0]; (In my mxml) mx:Label text='{Welcome, +ModelLocator.userInfo.firstname+ +ModelLocator.userInfo.lastname}' / Is it possible to get this to work like that? or will ModelLocator need to have something like: public static var userInfo:UserVO; function ModelLocator() { ModelLocator.userInfo = new UserVO(); } class com.app.path.UserVO ... I'd rather avoid having to create all the server side objects on the client side; they come from the web service strongly typed, which is good enough for me, but does Flex need to have all of the bindable properties defined at complie-time for binding to work? Thanks, Sean Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Tree change event
I see it now. That may be a bug. Report it at http://www.macromedia.com/go/wish Maybe someone else will have some suggestions. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mika Kiljunen Sent: Friday, May 27, 2005 3:30 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Tree change event Hi, I forgot to mention that the tree has dragEnabled=true, which makes this lost event occur. It also seems that it doesnt send any of these events either on when clicked with CTRL down: dragEnter dragExit dragOver dragDrop dragComplete -Mika From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Tracy Spratt Sent: 26. toukokuuta 2005 19:45 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Tree change event I dont see that behavior. Try the sample app below. Select a node, the node label will display in the Label field below. CTRL-click that node to deselect, and the Label control becomes empty. Tracy ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml width=600 height=400 mx:Script![CDATA[ // Variable that contains the data provider. var myDP : Array; // Function to initialize the data provider. function initTree() { myDP = new Array(); myDP.addItem({label:one}); myDP.addItem({label:two}); myDP.addItem({label:three}); myTree.dataProvider = myDP; } private function onChange(oEvent:Object):Void { lblSelectedNode.text = oEvent.target.selectedNode.getProperty(label); } ]]/mx:Script mx:Tree id=myTree initialize=initTree() change=onChange(event)/ mx:Label id=lblSelectedNode / /mx:Application From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mika Kiljunen Sent: Thursday, May 26, 2005 3:15 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Tree change event Hi, I noticed that the trees change event does not work as expected ( the same way as for example in DataGrid ). When a user selects a node on a tree, the tree sends change event properly, as in DataGrid. But when the user deselects (is that a word?) a node by clicking it with CTRL key down, it does not send change event (as datagrid does). This causes real problems, since I get no info that the there are no nodes now selected ( as user has done something I can not follow) and my buttons that should be disabled when no nodes are selected, stay enabled - leads to errors. Is there a fix or a nice workaround on this issue? Is this a feature or a bug in the Tree? -- Mika Kiljunen Ohjelmistosuunnittelija / Intensium Oy [EMAIL PROTECTED]ium.fi GSM: +358 50 352 4842 http://www.intensium.fi 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 the Yahoo! Terms of Service.
RE: [flexcoders] Converting Java POJO to Actionscript Errors
(Hi suzy, firstly, I'm a little confused as to how Kevin Ewok's response turned into your message - are you saying you're having the same issue as Kevin? Let me first comment on Kevin's issue which will provide good background for yours...). On looking again at the warning Keven is getting from ClassUtil it means that he didn't link in the com.MyPojo class to his SWF... that is, the compiler didn't include the AS class because it wasn't referenced anywhere. Having a dummy variable of com.MyPojo type is one way to cause a dependency on that class to have it compiled and linked in to the SWF. But, furthermore, by using Object.registerClass() you can avoid the ClassUtil issue altogether because the player will attempt to create types for you from the registerd information while processing the AMF response before the ClassUtil gets a chance to look at the result. The ClassUtil is a legacy system from Flex 1.0 SOAP-based RemoteObject (which is not supported in Flex 1.5) where by you could use a special _remoteClass property to map client/server types since Object.registerClass wasn't useful for non-AMF communication (i.e. XML transactions are just strings and thus don't' get processed by the player). Since Flex 1.5 RemoteObject only uses AMF, the _remoteClass method is not suggested for Flex 1.5 and you should use Object.registerClass(). Now, for Suzy's question... Essentially what you're looking for here is that Remote POJOs turn into plain old dynamic Objects on the client, right? The problem is that in Flex 1.5 RemoteObject still has the deprecated _remoteClass property in the response (which you should be able to see in the AMF trace output). The old ClassUtil is designed to always do this translation for you if it finds the _remoteClass property... that is, it expects that typed POJOs map to a corresponding AS type (that must be available at runtime from the SWF). By calling Object.registerClass you could bypass the ClassUtil's translation attempt altogether... and, actually here's an idea, perhaps you can trick the player into registering your remote POJO class to just plain old Object to get a dynamic object back? Pete -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of suzy lawson Sent: Friday, May 27, 2005 11:44 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Converting Java POJO to Actionscript Errors Hari, Thanks...I'll give this a shot. So my question is, why do I have to write a matching AS class to match my POJO? When I populate my Datagrid from the remote object (arraylist of POJOs), I din't have to write any AS classes. --- Doodi, Hari - BLS CTR [EMAIL PROTECTED] wrote: Hi, First couple of questions - did you register your POJO with AS class using Object.registerClass( ) method? What is the constructor method of you Pojo ? After both of above are in place(implemented) then you can create new object of your POJO type and assign your newly returned object to it and then add this new object to your datagrid using myDataGrid.addItem( ); This is what I did. AS class looks like class classes.MyPojo { public var myArray:Array; private static var registered:Boolean = Object.registerClass(full path of you java class goes here, classes. MyPojo); } In my MXML you can ignore statements which sets initial attribute values function addRow() { var oNewItem:Object = new MyPojo (); oNewItem.adj_num = 12 ; oNewItem.adj_type = ; oNewItem.adj_category = ; oNewItem.adj_amt_terms_desc = Doodi; oNewItem.adj_reporter_applied_flag = N; oNewItem.adj_sign = Additive; oNewItem.adj_factor = ; oNewItem.adj_order_applied = 12; myDataGrid.addItem(oNewItem); focusNewRow(); doLater(this,focusNewRow); } Thanks! Hari -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of suzy lawson Sent: Friday, May 27, 2005 10:22 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Converting Java POJO to Actionscript Errors Hari- THanks for your response. I tried that but I got a compilation error that there is no method with the name MyPojo. I suppose that means I have to manually write the underlying ActionScript class for my Java POJO? That just seems like a really bad implementation design b/c if MyPojo Java class changes, then I have to manually change my ActionScript class. urr...what am I missing?! --- Doodi, Hari - BLS CTR [EMAIL PROTECTED] wrote: Try this. mx:script... var newObj:Object = new MyPojo(); // constructor of your POJO function addToGrid() { newObj = remoteObj.getNewJob(); myDataGrid.addItem(newObj); } /mx:script Thanks! Hari -Original Message-
[flexcoders] Color Picker - IE CSS Explorer
Anyone have any sample code to make a color picker like the one used in the flex css explorer. I don't want to re-invent the wheel if necessary. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Color Picker - IE CSS Explorer
Look in C:\Program Files\Macromedia\Flex\extras\colorpicker (or equivalent) Ali -- Alistair McLeod Development Director iteration::two [EMAIL PROTECTED] Office: +44 (0)131 338 6108 This e-mail and any associated attachments transmitted with it may contain confidential information and must not be copied, or disclosed, or used by anyone other than the intended recipient(s). If you are not the intended recipient(s) please destroy this e-mail, and any copies of it, immediately. Please also note that while software systems have been used to try to ensure that this e-mail has been swept for viruses, iteration::two do not accept responsibility for any damage or loss caused in respect of any viruses transmitted by the e-mail. Please ensure your own checks are carried out before any attachments are opened. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of nextadvantage Sent: 27 May 2005 17:52 To: flexcoders@yahoogroups.com Subject: [flexcoders] Color Picker - IE CSS Explorer Anyone have any sample code to make a color picker like the one used in the flex css explorer. I don't want to re-invent the wheel if necessary. Yahoo! Groups Links 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] Resizing SWFs in mx:Loader
Hello, I'm having trouble when loading SWFs in to a Flex app using mx:Loader. Basically, the SWF isn't being resized to the Loader, no matter what I do. Simple test case: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Panel width=415 height=340 mx:Image source=http://localhost/europe.swf; id=preview scaleContent=true maintainAspectRatio=true width=100% height=100% / /mx:Panel /mx:Application The SWF I'm trying to load here can be seen here: http://kryten.rawnet.com/flex/europe.swf And what I get with the above code is here: http://kryten.rawnet.com/flex/europe.jpg I've been pointed in the direction of the following message, but this hasn't helped either: http://www.mail-archive.com/flexcoders@yahoogroups.com/msg06839.html Any suggestions? Cheers, Tim. -- --- Badpen Tech - CF and web-tech: http://tech.badpen.com/ --- RAWNET LTD - independent digital media agency We are big, we are funny and we are clever! New site launched at http://www.rawnet.com/ --- This message may contain information which is legally privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. Such notification notwithstanding, any comments, opinions, information or conclusions expressed in this message are those of the originator, not of rawnet limited, unless otherwise explicitly and independently indicated by an authorised representative of rawnet limited. --- 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: Converting Java POJO to Actionscript Errors
Pete- Thanksto answer your confusion...Suzy and Kevin are the same person, when I registered, the wrong username got auto-populated when I joined flexcoders and there's no profile for me to fix it. Getting back to your response (thanks by the way), I've tried assigning the returned remote object to a general AS object (see example below)...that does not workthat's what causing these errors. I tried issuing the Object.registerClass() method to my Java POJO w/i my mxml file where I load the Datagrid...that does not work either. I guess I will be forced to write the AS class that matches my POJO...this is probbaly going to be annoying since my POJO is an object graph and involves inheritancewriting the same class twice seems like a poor design to me. I see there are some Ant scripts out there that do this, but they don't generate the class for me if there is inheritance. I would think there's a way I can just plug the returned single POJO in the datagridafter all, the datagrid was first populated with an array of the SAME POJOs w/o having to register any classes!! I think I'm getting a head-ache!! --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: (Hi suzy, firstly, I'm a little confused as to how Kevin Ewok's response turned into your message - are you saying you're having the same issue as Kevin? Let me first comment on Kevin's issue which will provide good background for yours...). On looking again at the warning Keven is getting from ClassUtil it means that he didn't link in the com.MyPojo class to his SWF... that is, the compiler didn't include the AS class because it wasn't referenced anywhere. Having a dummy variable of com.MyPojo type is one way to cause a dependency on that class to have it compiled and linked in to the SWF. But, furthermore, by using Object.registerClass() you can avoid the ClassUtil issue altogether because the player will attempt to create types for you from the registerd information while processing the AMF response before the ClassUtil gets a chance to look at the result. The ClassUtil is a legacy system from Flex 1.0 SOAP-based RemoteObject (which is not supported in Flex 1.5) where by you could use a special _remoteClass property to map client/server types since Object.registerClass wasn't useful for non-AMF communication (i.e. XML transactions are just strings and thus don't' get processed by the player). Since Flex 1.5 RemoteObject only uses AMF, the _remoteClass method is not suggested for Flex 1.5 and you should use Object.registerClass(). Now, for Suzy's question... Essentially what you're looking for here is that Remote POJOs turn into plain old dynamic Objects on the client, right? The problem is that in Flex 1.5 RemoteObject still has the deprecated _remoteClass property in the response (which you should be able to see in the AMF trace output). The old ClassUtil is designed to always do this translation for you if it finds the _remoteClass property... that is, it expects that typed POJOs map to a corresponding AS type (that must be available at runtime from the SWF). By calling Object.registerClass you could bypass the ClassUtil's translation attempt altogether... and, actually here's an idea, perhaps you can trick the player into registering your remote POJO class to just plain old Object to get a dynamic object back? Pete -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of suzy lawson Sent: Friday, May 27, 2005 11:44 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Converting Java POJO to Actionscript Errors Hari, Thanks...I'll give this a shot. So my question is, why do I have to write a matching AS class to match my POJO? When I populate my Datagrid from the remote object (arraylist of POJOs), I din't have to write any AS classes. --- Doodi, Hari - BLS CTR [EMAIL PROTECTED] wrote: Hi, First couple of questions - did you register your POJO with AS class using Object.registerClass( ) method? What is the constructor method of you Pojo ? After both of above are in place(implemented) then you can create new object of your POJO type and assign your newly returned object to it and then add this new object to your datagrid using myDataGrid.addItem( ); This is what I did. AS class looks like class classes.MyPojo { public var myArray:Array; private static var registered:Boolean = Object.registerClass(full path of you java class goes here, classes. MyPojo); } In my MXML you can ignore statements which sets initial attribute values function addRow() { var oNewItem:Object = new MyPojo (); oNewItem.adj_num = 12 ; oNewItem.adj_type = ; oNewItem.adj_category = ; oNewItem.adj_amt_terms_desc = Doodi;
RE: [flexcoders] Resizing SWFs in mx:Loader
Try this link instead: http://www.flexdaddy.info/2005/02/21/sizing-apps-within-the-loader-contr ol/ Note: MM recommends against using _parent and advises using mx.core.Application.application instead. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tim Blair Sent: Friday, May 27, 2005 1:27 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Resizing SWFs in mx:Loader Hello, I'm having trouble when loading SWFs in to a Flex app using mx:Loader. Basically, the SWF isn't being resized to the Loader, no matter what I do. Simple test case: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Panel width=415 height=340 mx:Image source=http://localhost/europe.swf; id=preview scaleContent=true maintainAspectRatio=true width=100% height=100% / /mx:Panel /mx:Application The SWF I'm trying to load here can be seen here: http://kryten.rawnet.com/flex/europe.swf And what I get with the above code is here: http://kryten.rawnet.com/flex/europe.jpg I've been pointed in the direction of the following message, but this hasn't helped either: http://www.mail-archive.com/flexcoders@yahoogroups.com/msg06839.html Any suggestions? Cheers, Tim. -- --- Badpen Tech - CF and web-tech: http://tech.badpen.com/ --- RAWNET LTD - independent digital media agency We are big, we are funny and we are clever! New site launched at http://www.rawnet.com/ --- This message may contain information which is legally privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. Such notification notwithstanding, any comments, opinions, information or conclusions expressed in this message are those of the originator, not of rawnet limited, unless otherwise explicitly and independently indicated by an authorised representative of rawnet limited. --- Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Converting Java POJO to Actionscript Errors
I've tried assigning the returned remote object to a general AS object (see example below)...that does not workthat's what causing these errors. [Pete] The hack I meant was something like this (I've not tested this, just something I guessed might work): static var reg:Boolean = Object.registerClass(com.MyPojo, Object); I tried issuing the Object.registerClass() method to my Java POJO w/i my mxml file where I load the Datagrid...that does not work either. [Pete] Do you mean you tried to register com.MyPojo as type Object as with the above syntax, or do you mean you tried registering it to an AS type matching com.MyPojo? Object.registerClass() in general does work... there must be something that you're not doing correctly that we can try to solve. I listed several possible causes in my previous email. The obvious one is that the AS representation of your Java object(s) must be linked in at compile time (the evidence for this is the ClassUtil error that you received when not using Object.registerClass()) in order for the player to deserialize the type from AMF to the AS type. If the mention of the AS class in the second parameter of Object.registerClass doesn't seem to add a compile time dependency, can you try adding your own dependency on the class like this: private var dummyVar:com.MyPojo; I guess I will be forced to write the AS class that matches my POJO... ...writing the same class twice seems like a poor design to me. [Pete] I disagree - the vast majority of RemoteObject applications that need non-simple types have a client and server representation of ValueObjects. The transfer of the object over the wire is merely the state. Many applications require client and server methods on the object. After all, the datagrid was first populated with an array of the SAME POJOs w/o having to register any classes!! [Pete] How so? 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: Converting Java POJO to Actionscript Errors
OK...i've gotten a lot further. I found an Ant script to create my AS classes from my POJOs (maintaining inheritance). I registered the classes and it compiles fine. THe problem is still there but it looks like the POJO being returned from myRemoteObject is not being converted to it's AS counterpart. When I debug, the 'result' is 'undefined'. I debugged my Service class and I see the data is there. What am I doing wrong where the AS class is not getting populated correctly? Is it because I have my dataprovider set to a remoteObject result? Should I set another varaible for that? Thanks mx:Script ![CDATA[ import com.*; var oNewItem: MyPojo; function addToDataGrid() { oNewItem = myRemoteObj.getNewPojo(); trace(oNewItem); // prints in log-- [object Object] trace(oNewItem.myValue); // prints -- undefined dg.addItem(oNewItem); //still a blank row } /mx:Script mx:DataGrid id=dg dataProvider={myRemoteObj.getAll.result} --- In flexcoders@yahoogroups.com, Kevin Ewok [EMAIL PROTECTED] wrote: Pete- Thanksto answer your confusion...Suzy and Kevin are the same person, when I registered, the wrong username got auto-populated when I joined flexcoders and there's no profile for me to fix it. Getting back to your response (thanks by the way), I've tried assigning the returned remote object to a general AS object (see example below)...that does not workthat's what causing these errors. I tried issuing the Object.registerClass() method to my Java POJO w/i my mxml file where I load the Datagrid...that does not work either. I guess I will be forced to write the AS class that matches my POJO...this is probbaly going to be annoying since my POJO is an object graph and involves inheritancewriting the same class twice seems like a poor design to me. I see there are some Ant scripts out there that do this, but they don't generate the class for me if there is inheritance. I would think there's a way I can just plug the returned single POJO in the datagridafter all, the datagrid was first populated with an array of the SAME POJOs w/o having to register any classes!! I think I'm getting a head-ache!! --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: (Hi suzy, firstly, I'm a little confused as to how Kevin Ewok's response turned into your message - are you saying you're having the same issue as Kevin? Let me first comment on Kevin's issue which will provide good background for yours...). On looking again at the warning Keven is getting from ClassUtil it means that he didn't link in the com.MyPojo class to his SWF... that is, the compiler didn't include the AS class because it wasn't referenced anywhere. Having a dummy variable of com.MyPojo type is one way to cause a dependency on that class to have it compiled and linked in to the SWF. But, furthermore, by using Object.registerClass() you can avoid the ClassUtil issue altogether because the player will attempt to create types for you from the registerd information while processing the AMF response before the ClassUtil gets a chance to look at the result. The ClassUtil is a legacy system from Flex 1.0 SOAP-based RemoteObject (which is not supported in Flex 1.5) where by you could use a special _remoteClass property to map client/server types since Object.registerClass wasn't useful for non-AMF communication (i.e. XML transactions are just strings and thus don't' get processed by the player). Since Flex 1.5 RemoteObject only uses AMF, the _remoteClass method is not suggested for Flex 1.5 and you should use Object.registerClass(). Now, for Suzy's question... Essentially what you're looking for here is that Remote POJOs turn into plain old dynamic Objects on the client, right? The problem is that in Flex 1.5 RemoteObject still has the deprecated _remoteClass property in the response (which you should be able to see in the AMF trace output). The old ClassUtil is designed to always do this translation for you if it finds the _remoteClass property... that is, it expects that typed POJOs map to a corresponding AS type (that must be available at runtime from the SWF). By calling Object.registerClass you could bypass the ClassUtil's translation attempt altogether... and, actually here's an idea, perhaps you can trick the player into registering your remote POJO class to just plain old Object to get a dynamic object back? Pete -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of suzy lawson Sent: Friday, May 27, 2005 11:44 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Converting Java POJO to Actionscript Errors Hari, Thanks...I'll give this a shot. So my question is, why do I have to write a matching AS class to match my POJO? When I populate my Datagrid from the remote object
Re: [flexcoders] mousedown scope
Thanks Manish. I sidestepped the issue by limiting the top-level mousedown so it doesn't conflict with the subcomponent mousedown. That solved my immediate problem. So - I didn't have a change to try setting event.bubbles to false. - Tom At 10:02 AM 5/27/2005, you wrote: On 5/27/05, Tom Fitzpatrick [EMAIL PROTECTED] wrote: Right now, clicking the subcomponent also selects the Panel. I'd like to be able to click the subcomponent without selecting the Panel - sort of a problem of eliminating the bubble-down, I guess. Does setting event.bubbles to false help? -- Yahoo! Groups Links * To visit your group on the web, go to: * http://groups.yahoo.com/group/flexcoders/http://groups.yahoo.com/group/flexcoders/ * * To unsubscribe from this group, send an email to: * mailto:[EMAIL PROTECTED][EMAIL PROTECTED] * * Your use of Yahoo! Groups is subject to the http://docs.yahoo.com/info/terms/Yahoo! Terms of Service. 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] HaloTheme.fla
I'm working on doing some skinning and don't have access to HaloTheme.fla in my Flex 1.5 install. Can someone post a link if they have this file handy? Thanks in advance for any help you can give. Best Regards, Dennis Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] The Softer Side of On Demand: A Peek at Software and Workflow News
Tarik Ahmed wrote: http://members.whattheythink.com/home/od05sherburne7.cfm ...Exstream was showing its brand-new Dialogue Version 5, which, according to Vice President of Marketing Kelley Sloane, has over 250 enhancements. With this release, Exstream teamed up with Macromedia to use its* Flex Server* to create Dialogue Anywhere for Marketing, allowing creation of a rich Internet user experience and the ability to create an interface similar to a PC. Sloane claims Exstream is the first company to deploy an application like this, designed for corporations that have marketing staff scattered in various geographic locations. Users can log on to Dialogue, create marketing messages and rules, and send their work for approval under a defined workflow cycle, having them incorporated in documents at run time.. Thanks for bringing that up. I spent some time at exstream.com, but didn't see a good explanation of how they were using the technology. Anyone find a better citation on this...? tx, jd -- John Dowdell . Macromedia Developer Support . San Francisco CA USA Weblog: http://www.macromedia.com/go/blog_jd Aggregator: http://www.macromedia.com/go/weblogs Technotes: http://www.macromedia.com/support/ Spam killed my private email -- public record is best, thanks. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] CFlogin, SetCredentials and the RemoteObject
Hi Peter, MX 7 installed on JRun4 DaveOn 5/27/05, Peter Farland [EMAIL PROTECTED] wrote: What version of CF are you using Dave? From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of dave buhlerSent: Friday, May 27, 2005 10:36 AMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] CFlogin, SetCredentials and the RemoteObject Thanks! On 5/27/05, Indy Nagpal [EMAIL PROTECTED] wrote: Yes, I think that is the logic behind named objects.On 5/27/05, dave buhler [EMAIL PROTECTED] wrote:Interesting...So if I use the named remote objects in the flex-config file, the paths to the CFCs aren't visible?I should use a decompiler on my own app to see, but I had assumed the paths would be compiled.Dave On 5/26/05, Indy Nagpal [EMAIL PROTECTED] wrote: Have you looked at creating named remoteobjects? That way even though the methods might be visible in the decompiler, but path to the actual cfc won't be. Hmm... regarding your swf file finally being part of cfm page... I've find myself more comfortable with standalone flex apps (that interact with CF through remoteobject) rather and flex apps embedded in cfm pages. I find debugging quite painful when a flex app is embbed in a cfm page. Indy On 5/27/05, dave buhler [EMAIL PROTECTED] wrote: I was debating if I should have my login page exist within HTML or as a sep., stand alone MXML page.I mention it because I'm pretty sure the CFC method names and service names would be visible to a decompiler and thus, visible to any user who stumbles across the Flex Admin system or has just simple access to the Login screen, if the login is part of the overall Admin SWF. Ultimately, my MXML will be a CFM page and I was going to only show the Flex SWF if the session is valid, otherwise, kick them back to the sep.login page. Any thoughts? Dave On 5/25/05, Indy Nagpal [EMAIL PROTECTED] wrote: Hi Dave: Here is my setup, I don't know if this helps. I have a CF application where users need to login. Once they successfully plug in their username and password, their session is setup (I'm using jessionid). I have a cfc (with relevant functions forlogin/logout) that is used for authenticating users and setting up session. I call that cfc as remoteobject, firing the login function in the cfc,passing it the username and password. If the login is successful, the session for the user is setup and all is sweet. I can access the user's session info through the same cfc (i have a function that returns their session structure Flex. And my Flex code can then look at the session object of the user and do what it needs to. I think the key for you would be to get jsessionid going, along withusing functions within a cfc to validate the user and return user's session (or any other value that you want to return to flex). Indy On 5/26/05, dave buhler [EMAIL PROTECTED] wrote: Hi Indy, I understand setting up perhaps the username and password as a session variable. Can you show me an example of how you are passing over the username and password in the remote object? I can see adding it as something like the following on each request: service.getKittens(loginVO,kittensVO) ...but was wondering if there was another method that is used directly with the remote object configuration. Dave On 5/24/05, Indy Nagpal [EMAIL PROTECTED] wrote: Hi Dave: I've never tried using RemoteObject with cflogin, but RemoteObject works very nicely with CF session variables, so it should be able to pass that information to your application. To get it to work with session variables, I was using CF and Flex on the same server, and had turned on jsessionid (in CF Admin). Indy On 5/23/05, dave buhler [EMAIL PROTECTED] wrote: Does the RemoteObject permit the passing of a username and password to a CFLogin tag? I want to create an instance of NetConnection and include setCredentials(username,password) to pass over to my remote object for a valid user check on each request. If it's not supported in Flex, does anyone have any suggestions so that we can ensure a valid username and password is part of each remote CFC request. Best, mx.controls.Alert.show('Dave') Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ To unsubscribe from
RE: [flexcoders] Re: Converting Java POJO to Actionscript Errors
Is myValue on oNewItem a complex type or is it expected to return a simple value? Does the constructor of com.MyPojo take any arguments? If so, does it look something like this? public class com.MyPojo { public var myValue:String; public function MyPojo(mval:String, someval:Object ...) { myValue = mval; // set other vals... } } If so, then you're getting bitten by the deserialziation order of the Flash Player for complex types. When the player is recreated instances of types from their serialized form (be it AMF, RTMP, LSOs), it first creates a shell instance from the type, sets the state, then calls the real constructor (with no args defined). This is by design because serialized objects can't pass constructor arguments so by setting them first you get a chance to access them during object initialization... but it does mean that blindly setting the values from constructor arguments is dangerous as it will override the member variables with undefined (as no arguments were passed to the constructor). Try this check first: public class com.MyPojo { public var myValue:String; public function MyPojo(mval:String, someval:Object ...) { if (mval != undefined) { myValue = mval; // set other vals... } } } (Note: For the keen AS2-savvy engineers out there, you could use the !== or strict not-equal operator to allow for null values to be passed to constructors when not being initialized by deserialization). -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Friday, May 27, 2005 2:34 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Converting Java POJO to Actionscript Errors OK...i've gotten a lot further. I found an Ant script to create my AS classes from my POJOs (maintaining inheritance). I registered the classes and it compiles fine. THe problem is still there but it looks like the POJO being returned from myRemoteObject is not being converted to it's AS counterpart. When I debug, the 'result' is 'undefined'. I debugged my Service class and I see the data is there. What am I doing wrong where the AS class is not getting populated correctly? Is it because I have my dataprovider set to a remoteObject result? Should I set another varaible for that? Thanks mx:Script ![CDATA[ import com.*; var oNewItem: MyPojo; function addToDataGrid() { oNewItem = myRemoteObj.getNewPojo(); trace(oNewItem); // prints in log-- [object Object] trace(oNewItem.myValue); // prints -- undefined dg.addItem(oNewItem); //still a blank row } /mx:Script mx:DataGrid id=dg dataProvider={myRemoteObj.getAll.result} --- In flexcoders@yahoogroups.com, Kevin Ewok [EMAIL PROTECTED] wrote: Pete- Thanksto answer your confusion...Suzy and Kevin are the same person, when I registered, the wrong username got auto-populated when I joined flexcoders and there's no profile for me to fix it. Getting back to your response (thanks by the way), I've tried assigning the returned remote object to a general AS object (see example below)...that does not workthat's what causing these errors. I tried issuing the Object.registerClass() method to my Java POJO w/i my mxml file where I load the Datagrid...that does not work either. I guess I will be forced to write the AS class that matches my POJO...this is probbaly going to be annoying since my POJO is an object graph and involves inheritancewriting the same class twice seems like a poor design to me. I see there are some Ant scripts out there that do this, but they don't generate the class for me if there is inheritance. I would think there's a way I can just plug the returned single POJO in the datagridafter all, the datagrid was first populated with an array of the SAME POJOs w/o having to register any classes!! I think I'm getting a head-ache!! --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: (Hi suzy, firstly, I'm a little confused as to how Kevin Ewok's response turned into your message - are you saying you're having the same issue as Kevin? Let me first comment on Kevin's issue which will provide good background for yours...). On looking again at the warning Keven is getting from ClassUtil it means that he didn't link in the com.MyPojo class to his SWF... that is, the compiler didn't include the AS class because it wasn't referenced anywhere. Having a dummy variable of com.MyPojo type is one way to cause a dependency on that class to have it compiled and linked in to the SWF. But, furthermore, by using Object.registerClass() you can avoid the ClassUtil issue altogether because the player will attempt to create types for you from the registerd information while processing the AMF
RE: [flexcoders] CFlogin, SetCredentials and the RemoteObject
Ok. I believe you can register named objects for CFCs in CFMX 7's copy of gateway-config.xml asit shares essentially the same code as Flex 1.5's gateway- (though note this would be a Flex concept being introduced into a CF/Flash Remoting world)let me know if you are having any difficulties. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dave buhlerSent: Friday, May 27, 2005 3:03 PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] CFlogin, SetCredentials and the RemoteObject Hi Peter,MX 7 installed on JRun4Dave On 5/27/05, Peter Farland [EMAIL PROTECTED] wrote: What version of CF are you using Dave? From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of dave buhlerSent: Friday, May 27, 2005 10:36 AMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] CFlogin, SetCredentials and the RemoteObject Thanks! On 5/27/05, Indy Nagpal [EMAIL PROTECTED] wrote: Yes, I think that is the logic behind "named" objects.On 5/27/05, dave buhler [EMAIL PROTECTED] wrote:Interesting...So if I use the named remote objects in the flex-config file, the paths to the CFCs aren't visible?I should use a decompiler on my own app to see, but I had assumed the paths would be compiled.Dave On 5/26/05, Indy Nagpal [EMAIL PROTECTED] wrote: Have you looked at creating named remoteobjects? That way even though the methods might be visible in the decompiler, but path to the actual cfc won't be. Hmm... regarding your swf file finally being part of cfm page... I've find myself more comfortable with "standalone" flex apps (that interact with CF through remoteobject) rather and flex apps embedded in cfm pages. I find debugging quite painful when a flex app is embbed in a cfm page. Indy On 5/27/05, dave buhler [EMAIL PROTECTED] wrote: I was debating if I should have my login page exist within HTML or as a sep., stand alone MXML page. I mention it because I'm pretty sure the CFC method names and service names would be visible to a decompiler and thus, visible to any user who stumbles across the Flex Admin system or has just simple access to the Login screen, if the login is part of the overall Admin SWF.Ultimately, my MXML will be a CFM page and I was going to only show the Flex SWF if the session is valid, otherwise, kick them back to the sep. login page. Any thoughts? Dave On 5/25/05, Indy Nagpal [EMAIL PROTECTED] wrote: Hi Dave: Here is my setup, I don't know if this helps. I have a CF application where users need to login. Once they successfully plug in their username and password, their session is setup (I'm using jessionid). I have a cfc (with relevant functions forlogin/logout) that is used for authenticating users and setting up session. I call that cfc as remoteobject, firing the login function in the cfc,passing it the username and password. If the login is successful, the session for the user is setup and all is sweet. I can access the user's session info through the same cfc (i have a function thatreturns their session structure Flex. And my Flex code can then look at the session object of the user and do what it needs to. I think the key for you would be to get jsessionid going, along with using functions within a cfc to validate the user and return user's session (or any other value that you want to return to flex). Indy On 5/26/05, dave buhler [EMAIL PROTECTED] wrote: Hi Indy, I understand setting up perhaps the username and password as a session variable. Can you show me an example of how you are passing over the username and password in the remote object? I can see adding it as something like the following on each request: service.getKittens(loginVO,kittensVO) ...but was wondering if there was another method that is used directly with the remote object configuration. Dave On 5/24/05, Indy Nagpal [EMAIL PROTECTED] wrote: Hi Dave: I've never tried using RemoteObject with cflogin, but RemoteObject works very nicely with CF session variables, so it should be able to pass that information to your application. To get it to work with session variables, I was using CF and Flex on the same server, and had turned on jsessionid (in CF Admin). Indy On 5/23/05, dave buhler [EMAIL PROTECTED] wrote: Does the RemoteObject permit the passing of a username and
Re: [flexcoders] Re: Converting Java POJO to Actionscript Errors
Kevin, here's one other thing to try if Peter's advice isn't relevant: Often, an AS class that is mapped from a POJO will not be referenced anywhere in the application code, since it only arrives in the application as a result of being deserialized. What happens in this case is that the MXMLC compiler does not link the AS class into the application, and deserialization will fail silently in pretty much exactly the way you describe. It looks like the object arrives from the debug printouts, but AS code will behave as if it's undefined. (I wasted about 4 hours debugging this case yesterday, so it happens.) To avoid this, somewhere in a class that *is* being linked, include the following line: static var myPojoDependency:Function = com.MyPojo. Alternatively, just include another cop yof the Object.registerClass() call for MyPojo in a class that is already being linked in. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Friday, May 27, 2005 2:34 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Converting Java POJO to Actionscript Errors OK...i've gotten a lot further. I found an Ant script to create my AS classes from my POJOs (maintaining inheritance). I registered the classes and it compiles fine. THe problem is still there but it looks like the POJO being returned from myRemoteObject is not being converted to it's AS counterpart. When I debug, the 'result' is 'undefined'. I debugged my Service class and I see the data is there. What am I doing wrong where the AS class is not getting populated correctly? Is it because I have my dataprovider set to a remoteObject result? Should I set another varaible for that? Thanks mx:Script ![CDATA[ import com.*; var oNewItem: MyPojo; function addToDataGrid() { oNewItem = myRemoteObj.getNewPojo(); trace(oNewItem); // prints in log-- [object Object] trace(oNewItem.myValue); // prints -- undefined dg.addItem(oNewItem); //still a blank row } /mx:Script mx:DataGrid id=dg dataProvider={myRemoteObj.getAll.result} --- In flexcoders@yahoogroups.com, Kevin Ewok [EMAIL PROTECTED] wrote: Pete- Thanksto answer your confusion...Suzy and Kevin are the same person, when I registered, the wrong username got auto-populated when I joined flexcoders and there's no profile for me to fix it. Getting back to your response (thanks by the way), I've tried assigning the returned remote object to a general AS object (see example below)...that does not workthat's what causing these errors. I tried issuing the Object.registerClass() method to my Java POJO w/i my mxml file where I load the Datagrid...that does not work either. I guess I will be forced to write the AS class that matches my POJO...this is probbaly going to be annoying since my POJO is an object graph and involves inheritancewriting the same class twice seems like a poor design to me. I see there are some Ant scripts out there that do this, but they don't generate the class for me if there is inheritance. I would think there's a way I can just plug the returned single POJO in the datagridafter all, the datagrid was first populated with an array of the SAME POJOs w/o having to register any classes!! I think I'm getting a head-ache!! --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: (Hi suzy, firstly, I'm a little confused as to how Kevin Ewok's response turned into your message - are you saying you're having the same issue as Kevin? Let me first comment on Kevin's issue which will provide good background for yours...). On looking again at the warning Keven is getting from ClassUtil it means that he didn't link in the com.MyPojo class to his SWF... that is, the compiler didn't include the AS class because it wasn't referenced anywhere. Having a dummy variable of com.MyPojo type is one way to cause a dependency on that class to have it compiled and linked in to the SWF. But, furthermore, by using Object.registerClass() you can avoid the ClassUtil issue altogether because the player will attempt to create types for you from the registerd information while processing the AMF response before the ClassUtil gets a chance to look at the result. The ClassUtil is a legacy system from Flex 1.0 SOAP-based RemoteObject (which is not supported in Flex 1.5) where by you could use a special _remoteClass property to map client/server types since Object.registerClass wasn't useful for non-AMF communication (i.e. XML transactions are just strings and thus don't' get processed by the player). Since Flex 1.5 RemoteObject only uses AMF, the _remoteClass method is not suggested for Flex 1.5 and you should use Object.registerClass(). Now, for Suzy's question... Essentially what you're looking for here is that Remote POJOs turn into plain old dynamic Objects on
Re: [flexcoders] Resizing SWFs in mx:Loader
Hi Tim, You're using an image component, and not a loader component. Once you change to a loader component, you can do the following: I get the size of the SWF being loaded into the loader component and then resize the loader component to the size of the contents. By doing so, I can control the surrounding objects, too, if need be. We had built a much more complicated app in Flash with a loader component that needed its own resize engine for layouts. Here's pseudo-code: //load swf controls go here. // get size of contents loaderHeight = media_ldr.content._height loaderWidth = media_ldr.content._width // media_ldr.setSize(loaderWidth,loaderHeight); Dave 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 the Yahoo! Terms of Service.
[flexcoders] Flash Remoting bug in Map handling
Hey all, This is both an FYI and a query to see if anyone has a solution to this issue. There seems to be a bug in Flash Remoting in the handling of java.util.Map keys. Setup: Flex 1.5 Remoting configured with serializationFlex/serialization lowercase-keysfalse/lowercase-keys The issue is that Map keys are always made lowercase. The issue appears to be in the deserializing of objects of type 'ECMA Array' coming from Flash. To reproduce create a Java service: public class RemotingService { public Map getMap() { Map map = new HashMap(); map.put(Uppercase Key, value); return map; } public Object echo(Object obj) { return obj; } } Using these services in Flex to reproduce this bug as follows: 1. Call getMap() to get the map instance from the server 2. trace the map keys - the key will still be mixed case 3. Call echo() with the map as argument 4. trace the returned map keys - the key will be all lowercase It seems to me that the Map contents should be able to round trip without modification. Turning on debugging in the gateway, I you can see that the type of the map is 'ECMA Array'. There doesn't seem to be a way to create an ECMA Array in ActionScript. You can only get one back from a Remoting call. I need my Map key case to be preserved. The only workaround for this issue I can think of is to clone the Map contents into an ActionScript object before sending it back to the server: var clone = {}; for (var p in map) { clone[p] = map[p]; } This does work - the gateway debugging shows that this is now of type 'Object' which correctly becomes a Map with key case preserved in Java. Anyone got any better ideas? Alon alon at carbonfive.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] CFlogin, SetCredentials and the RemoteObject
Hi Peter, I'm assuming the CFC is the object? What are the benefits of registering the named objects in the gateway-config file? Is there an informal list of best-practices for security when working with remoting? I would understand if MM couldn't comment on suggesting best practices for security. Dave On 5/27/05, Peter Farland [EMAIL PROTECTED] wrote: Ok. I believe you can register named objects for CFCs in CFMX 7's copy of gateway-config.xml asit shares essentially the same code as Flex 1.5's gateway- (though note this would be a Flex concept being introduced into a CF/Flash Remoting world)let me know if you are having any difficulties. From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of dave buhlerSent: Friday, May 27, 2005 3:03 PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] CFlogin, SetCredentials and the RemoteObject Hi Peter,MX 7 installed on JRun4Dave On 5/27/05, Peter Farland [EMAIL PROTECTED] wrote: What version of CF are you using Dave? From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of dave buhlerSent: Friday, May 27, 2005 10:36 AMTo: flexcoders@yahoogroups.com Subject: Re: [flexcoders] CFlogin, SetCredentials and the RemoteObject Thanks! On 5/27/05, Indy Nagpal [EMAIL PROTECTED] wrote: Yes, I think that is the logic behind named objects.On 5/27/05, dave buhler [EMAIL PROTECTED] wrote:Interesting...So if I use the named remote objects in the flex-config file, the paths to the CFCs aren't visible?I should use a decompiler on my own app to see, but I had assumed the paths would be compiled.Dave On 5/26/05, Indy Nagpal [EMAIL PROTECTED] wrote: Have you looked at creating named remoteobjects? That way even though the methods might be visible in the decompiler, but path to the actual cfc won't be. Hmm... regarding your swf file finally being part of cfm page... I've find myself more comfortable with standalone flex apps (that interact with CF through remoteobject) rather and flex apps embedded in cfm pages. I find debugging quite painful when a flex app is embbed in a cfm page. Indy On 5/27/05, dave buhler [EMAIL PROTECTED] wrote: I was debating if I should have my login page exist within HTML or as a sep., stand alone MXML page. I mention it because I'm pretty sure the CFC method names and service names would be visible to a decompiler and thus, visible to any user who stumbles across the Flex Admin system or has just simple access to the Login screen, if the login is part of the overall Admin SWF.Ultimately, my MXML will be a CFM page and I was going to only show the Flex SWF if the session is valid, otherwise, kick them back to the sep. login page. Any thoughts? Dave On 5/25/05, Indy Nagpal [EMAIL PROTECTED] wrote: Hi Dave: Here is my setup, I don't know if this helps. I have a CF application where users need to login. Once they successfully plug in their username and password, their session is setup (I'm using jessionid). I have a cfc (with relevant functions forlogin/logout) that is used for authenticating users and setting up session. I call that cfc as remoteobject, firing the login function in the cfc,passing it the username and password. If the login is successful, the session for the user is setup and all is sweet. I can access the user's session info through the same cfc (i have a function thatreturns their session structure Flex. And my Flex code can then look at the session object of the user and do what it needs to. I think the key for you would be to get jsessionid going, along with using functions within a cfc to validate the user and return user's session (or any other value that you want to return to flex). Indy On 5/26/05, dave buhler [EMAIL PROTECTED] wrote: Hi Indy, I understand setting up perhaps the username and password as a session variable. Can you show me an example of how you are passing over the username and password in the remote object? I can see adding it as something like the following on each request: service.getKittens(loginVO,kittensVO) ...but was wondering if there was another method that is used directly with the remote object configuration. Dave On 5/24/05, Indy Nagpal [EMAIL PROTECTED] wrote: Hi Dave: I've never tried using RemoteObject with cflogin, but RemoteObject works very nicely with CF session variables, so it should be able to
[flexcoders] Virtual Mapped directory not rendering MXML files
Hello there, Got a small issue; I'm running flex 1.5 with integrated JRun, and have created a virtual mapping to my mxml files I did this by adding a virtual-mapping tag to my jrun_root/server_name/WEB-INF/jrun-web.xml file so: http://localhost:8700/foo points to c:\path_to\my_mxml\ When I then try to visit http://localhost:8700/foo I get my mxml dumped back out at me as text, instead of a rendered swf. Anyone got any idea why? Thanks in advance! -ekz 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 the Yahoo! Terms of Service.
[flexcoders] Re: Custom ComboBoxCellRenderer Issue
You're not missing anything. There's a super-secret mouseDown handler in the datagrid that is messing you up. Lots of folks have tried various ways to workaround it and I think they've succeeded. Last time we tried it, we subclassed the DataGrid and overrode its onMouseDown method to see if it hittest the combobox which is acting as the cellEditor function onMouseDown() : Void { var pt = new Object(); pt.x = _root._xmouse; pt.y = _root._ymouse; _root.localToGlobal(pt); if (cellEditor._visible cellEditor.isCellEditor) { if (cellEditor.hitTest(pt.x, pt.y)) return; // if comboheight 30, then dropdown is visible if (cellEditor.combo.height 30 cellEditor.combo.dropdown._visible cellEditor.combo.dropdown.hitTest(pt.x, pt.y)) return; } super.onMouseDown(); } The the cell renderer watches for the close event on the combobox and destroys its dropdown. function close() { size(); combo.dropdown.removeMovieClip(); combo.mask.removeMovieClip(); } 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: Tree change event
Yeah, looks like a bug. Don't see any obvious workarounds either. One questions: Do you even want to allow de-selecting a row? It might be possible to block that by overriding the onPress handlers in the SelectableRows in the Tree. 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: Panel Mouse Down Problem
There are some idiosyncracies when objects appear and disappear under the mouse. In general, by listening to all mouse events (down, up, over, out) you can see a pattern that you can look for (you may see an over instead of a down for example). In other situations, this can be remedied by not changing the object under the mouse in response to a mouse event, which can be done by taking the functionality in the mouse event, wrapping it in a function and calling it via doLater. function showAlertLater() { Alert.show(...) } mousedown=doLater(this, 'showAlertLater') No guarantees, but we've worked around these kinds of issues successfully. 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/