[flexcoders] Re: ADG/DataGrid prevent render even from firing immediately on propertyChange
You might try enableAutoUpdate and disableAutoUpdate on ICollectionView, not sure if that has the desired affect or not. You could also put custom events in your model objects and manually dispatch collection events or call explicitly tell the grid when to update. --- In flexcoders@yahoogroups.com, tntomek tnto...@... wrote: Hi, Is there any way to tell the ADG to not re-render itself immediately after a propertyChanged even has been fired in the dataProvider? I have quite a wide row (lots of cells) and lots of custom logic that updates these dependent properties on each row. i.e. calculated columns. I am doing the calculations at dataProvider level vs labelFunctions. On each set function of one of my cells in the row I raise a propertyChanged event if the value was changed. Tracing through what the ADG is doing I'm finding that its re-rendering each time I raise this event even if its in the same row. Is there any way to tell the ADG to wait a few milliseconds in case another propertyChanged event comes in so as to render once instead of 10 times? If there is no ADG option what is the best pattern for this assuming I want to do this in my underlying dataprovider objects. Should I raise custom events and fake a itemUpdated once I know there are no more changes? I don't see a clean way to do this however since I never really know when I'm done, and using a timer or something of this nature seems like a major hack. -Tom
[flexcoders] Re: AdvancedDataGrid, calling a sort on a column without a hidden header.
Just sort the collection that the grid is bound to. --- In flexcoders@yahoogroups.com, djhatrick djhatr...@... wrote: How do i duplicate the functionality of of sorting an advancedDatagrid without a header release event. I'd like to sort my IHierarchicalCollectionView recursively. Thanks, Patrick
[flexcoders] Re: How do I do a sort on IHierarchicalCollectionView
I don't think that it is different. IHierarchicalCollectionView extends ICollectionView which is where the sort is defined. --- In flexcoders@yahoogroups.com, djhatrick djhatr...@... wrote: By the way, why is the sort different from ICollectionView? This makes this confusing because all my items duplicate... etc. private function sortDataField(value:String):void { //var hd:IHierarchicalCollectionView = IHierarchicalCollectionView(adg.dataProvider); var hd:IHierarchicalCollectionView =adg.dataProvider as IHierarchicalCollectionView; var sort:Sort = new Sort(); sort.fields = [new SortField(id)]; hd.sort = sort; gc.refresh(); } --- In flexcoders@yahoogroups.com, foobone9 foobone9@ wrote: Just sort the collection that the grid is bound to. --- In flexcoders@yahoogroups.com, djhatrick djhatrick@ wrote: How do i duplicate the functionality of of sorting an advancedDatagrid without a header release event. I'd like to sort my IHierarchicalCollectionView recursively. Thanks, Patrick
[flexcoders] Re: BlazeDS RemoteObject Performance
I think you need to invest in Live Cycle Data Servies. --- In flexcoders@yahoogroups.com, Aldo Bucchi aldo.buc...@... wrote: ( I copy this email from an internal communication I received ) quote Hello, I've found a serious performance problem on an application written on Flex/AIR and using BlazeDS v3.0.0.544. By looking at the logs I can see that the server side method (invoked via RemoteObject on the client side) never executes in more than two threads at the same time. What I mean is that if I fire 5 simultaneous requests to the method using RemoteObject from the flex side, and log when the method is executed and when it returns, I get something like this: 12:00:00 Method Executed 12:00:00 Method Executed 12:00:01 Method Exiting 12:00:01 Method Executed 12:00:04 Method Exiting 12:00:04 Method Executed 12:00:10 Method Exiting 12:00:10 Method Executed 12:00:11 Method Exiting 12:00:13 Method Exiting While on the client side I see that all the 5 invocations were fired at 12:00:00. As you can see, the method tend to take a while to run. But the big problem is that the log suggest that some queuing is happening on the server side, allowing only a maximum of two threads to run in parallel at any given time. I thought it could be a problem with the thread pool of the servlet container, but my Tomcat has the following configuration: Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=150 minSpareThreads=4/ So I guessed that the limit could be imposed by BlazeDS itself. But haven't found anything on the documentation. Of course, I could be wrong and the problem may be something else. Any ideas? Thanks, Leo /quote Note: The Remote Object destination has application scope, which means that there is only one instance of the Java object per application. Regards, A -- Aldo Bucchi U N I V R Z Office: +56 2 795 4532 Mobile:+56 9 7623 8653 skype:aldo.bucchi http://www.univrz.com/ http://aldobucchi.com/ PRIVILEGED AND CONFIDENTIAL INFORMATION This message is only for the use of the individual or entity to which it is addressed and may contain information that is privileged and confidential. If you are not the intended recipient, please do not distribute or copy this communication, by e-mail or otherwise. Instead, please notify us immediately by return e-mail. INFORMACIÓN PRIVILEGIADA Y CONFIDENCIAL Este mensaje está destinado sólo a la persona u organización al cual está dirigido y podría contener información privilegiada y confidencial. Si usted no es el destinatario, por favor no distribuya ni copie esta comunicación, por email o por otra vía. Por el contrario, por favor notifíquenos inmediatamente vía e-mail.
[flexcoders] Re: Flex to Air and remote coldfusion
Does your AIR app have access to the same remoting-config.xml as the Flex app? --- In flexcoders@yahoogroups.com, Scott h...@... wrote: I've written an application in Flex now I'm working on an Air application to connect to the coldfusion remoting services through the original application. However, I can't seem to access the remote objects in the flex application through Air. Is there anything special I have to be aware of if I'm connecting to another application's service? Thanks Scott
[flexcoders] Re: Form with 3 Custom Components...
You can just handle the click event from your button and in the handler function pull the necessary information out of your 3 custom components and then do what you want with it. --- In flexcoders@yahoogroups.com, Laurence MacNeill lmacne...@... wrote: I have a form with 3 Custom Components on it. I want to be able to click a single button on the form (button is not in any of the custom components) that will submit the form. But I'm confused as how to do this? From what I understand, I somehow need to get all three custom components to throw an event at the same time, yes? And to have them throw these events when a button is clicked, and said button is not a part of any of the three components. Therein lies my confusion. How do I do this? Or would it just be easier to combine all three components into one giant component that contains the submit button? Seems like bad programming practice to me, tho. There's gotta be a way to keep the three components separate, and have a submit button on the main form that will trigger the submit event in all three components simultaneously, I would think -- I just can't figure out how to do it. Thanks for any help you can offer, Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Re: Form with 3 Custom Components...
If you're that worried about it have your subcomponents implement a common interface to act as the contract between them and the parent which provides the api for the parent to pull the data out. --- In flexcoders@yahoogroups.com, Laurence MacNeill lmacne...@... wrote: At 05:32 PM 5/14/2009, you wrote: You can just handle the click event from your button and in the handler function pull the necessary information out of your 3 custom components and then do what you want with it. Right -- but don't I have to have those components dispatch their own events in order to pull data from them? At least, as I understand it, that's the best practice. What you're telling me to do (if I'm understanding) would tightly couple my form with the components, because I'd be accessing stuff that's supposed to be internal to the components, right? The way I understand it, I need to get the components to dispatch an event and pass a Value Object back to my main form. But I need it to happen when I click a button on the form -- so I have no idea where to put the Event Listener inside the components to cause them to dispatch their events. That's where I'm getting confused. Thanks, Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Re: Do we get any notification when user dissconnects from LCDS
Create an object that implements the FlexSessionListener interface. Then set your object to receive the callbacks: FlexContext.getFlexSession().addSessionDestroyedListener(your Object); --- In flexcoders@yahoogroups.com, Dharmendra Chauhan chauhan_i...@... wrote: Thanks Jeffrey, I am using RTMT channel, which interface I need to implement in order to get notification or I have.I mean what are the ways to implement it. I need to close some open connections to the backend system when Flex Client goes down. Regards, Dharmendra --- In flexcoders@yahoogroups.com, Jeffrey Vroom jeff@ wrote: The FlexSession object dispatches session closed events. For RTMP sessions, these will be pretty much immediate. For HTTP sessions though, they are dispatched when the session expires. So for RTMP you get quick notification but for HTTP it will be delayed based on your session expiration interval. Jeff On Tue, May 12, 2009 at 10:39 PM, Dharmendra Chauhan chauhan_icse@ wrote: Hi, I have to release resources when user get disconnected from LCDS. What I need to implement in java to listen it ? User may disconnect due to network failure ,when he closes the flex Window etc.. Thanks, Dharmendra
[flexcoders] Re: Validating items in DataGrids
I would just create a custom item renderer who examines its own data and if it finds something it doesn't like it draws a red bordering using the drawing API in updateDisplayList. --- In flexcoders@yahoogroups.com, nhid nhi...@... wrote: Hi, I am also working on this problem, does anyone has an idea how to draw the red border when validation failed on a field in the datagrid? Thanks for any help. Nhi On Fri, May 8, 2009 at 2:50 PM, Ravi Suda sudaraviku...@... wrote: John, I am working on a similar requirement. I want to show the mandatory fields in datagrid as a validation error(red border). Could you provide your custom item renderer that you created. Thanks in Advance Ravi --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, j_lentzz jelentz@ wrote: True. Good idea. I've already coded the method to increment a counter to display number of failed items. I'll modify the item renderer too and see what appears. Thanks, John --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Roman Protsiuk roman.protsiuk@ wrote: Then all you need is dataProvider. Validate items held in there. And change some property of the item that indicates whether it's valid or not. Then item renderer easily can draw something bad basing on that info. R. On 9/19/07, j_lentzz jelentz@ wrote: I'm doing something like that right now for the individual cells. I've integrated a validator into the cell object. However, I need to be able to validate the complete datagrid when the save button is pressed. If the user never moves to a cell, I can't use the itemEditEnd to validate, I need to move through the data and check. Using the itemEditor.newInstance() and calling my validation routine, I can detect that a validation fails. Now I'm going to try to use the itemRenderer property to indicate the nice red boxes. John --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders% 40yahoogroups.com, Roman Protsiuk roman.protsiuk@ wrote: I remember I did it like this: public class FilesDataGridColumnEditor extends TextInput { public function SomeDataGridEditor() { _validator.source = this; _validator.triggerEvent = change; _validator.required = true; _validator.property = text; } private var _validator : Validator = new SomeValidator(); } It's not the best practices, but as far as I remember it worked. :) R. On 9/18/07, merelypixels merelypixels@ wrote: seems to me that no mucking about with itemEditors is necessary... extract the data you need from your dataProvider and then validate that data directly before sending it on. If you want the little red validation things, you should probably validate on a field by field basis using the dataGrids itemEditEnd event, validating using dg.itemEditorInstance and doing e.preventDefault() if the field is invalid. Hope that helps! -Pixels --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com flexcoders%40yahoogroups.comflexcoders%40yahoogroups.com, j_lentzz jelentz@ wrote: Hi, I'm now trying to validating the contents of a datagrid and I was wondering if there is an established way to do this. It seems like I would need to get an instance of the itemEditor and somehow pass it the value on that row. Then I would either call a validator against that editor, or call a method contained in the itemEditor to do the validation. I can get the itemEditor to do validation when the user is entering data, but I need to be able to do validation on all the entries in the datagrid when the save button is pressed - to handle the cases of missing data in required datagrid fields. I've found some examples of how to validate when the user is entering data for that field, but not for validating the complete datagrid. Any help or ideas would be greatly appreciated. John
[flexcoders] Re: Adding a child to a child...
Either get the child (VBox) back from the canvas using getChildAt and call addChild on it, or add children to it before you add it to the canvas. --- In flexcoders@yahoogroups.com, Laurence MacNeill lmacne...@... wrote: Let's say I want to add, in actionScript, a VBox to my Canvas. var tempVBox = new VBox(); tempVBox.id = myVBox this.addChildAt(tempVBox, 0); Ok, fine. That's all well and good. Now, how do I add children to the VBox I just created? Thanks, Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Re: Application Idea
geni.com is a nice flex/flash family tree app. --- In flexcoders@yahoogroups.com, Brad Bueche brad.bue...@... wrote: Create a Family Tree. I mean the visual for the tree. Branches Nodes Leaves would be either text (Mother/Father, or Family Name) OR Branches Nodes Leaves would be thumb nail images. Mouse/over or hover over a branch, node, tree would bring up a little window with more info about that particular family (couple). Hover window could have children names as links at the bottom of it. Clicking them would take you to the children. Clicking in the main part of the hover window would take you to a page of info about that family. === Create a calculator that keeps a running tab on a visual, realistic roll of paper. Allow user to grab components on the paper and re-arrange them. Be able to still calculate what they have re-arranged on the paper. Allow them to save the work on a piece of paper. Figure out what the most atomic components (building blocks) are. You'll need to be able to do this in order to recognize the new statements that are created on the paper. = Create an sql interface similar to search coders but enable this to also create real sql in a text space. Allow them to drag elements around and re-arrange them. Then paramertize what they have submitted and submit it to the database. The trick is dont let them build in the text area. Let them build through a menu'ing system that prohibits nefarious sql. Why both? Its very hard to do complex sql with a menu'ing system only. brad On Wed, May 13, 2009 at 7:00 AM, kanu kukreja kanukukr...@... wrote: Hello, I'm looking for an idea, so that i can create a application on based on that idea in flash or flex. Thanks, kanu
[flexcoders] LCDS Push API Problem
I have a custom assembler, that uses the interface approach, which returns an object with a XML property. When I open two clients and edit one through LCDS the other updates as expected. I then have server code which updates the same XML property and calls the newer DataServiceTransaction refreshFill(..., null, propertySpecifier) and again both clients update to the new XML property value. However, if I restart both clients and first update via the push API the clients DO NOT receive the changed XML property value. If I next update from a client, both change and from here on out they will respond to the server property change pushes. It appears to me that something is being registered when an object is updated via the assembler that allows it to respond to future server API property pushes. I need the push API to work even when no client updates occur. I should note that when using the push API I am only calling refreshFill with a propertySpecifier and am never calling updateItem. I'm doing this because the XML value is actually a compound property and changes depending on a given fill parameter (it happens to be a date window which I cannot predict from the other server code where the push occurs). Anyone have any thoughts?
[flexcoders] Re: 3D Cube interface
http://www.alex-uhlmann.de/flash/adobe/blog/distortionEffects/effectCube/ --- In flexcoders@yahoogroups.com, christophe_jacquelin christophe_jacque...@... wrote: Hello, I am seaching a example of 3D Cube for an interface in Flex. Thank you, Christophe,
[flexcoders] Re: 3D Cube interface
Check the blog for details: http://weblogs.macromedia.com/auhlmann/ --- In flexcoders@yahoogroups.com, Pedro Sena sena.pe...@... wrote: Are the source files available? Tnx On Thu, Apr 9, 2009 at 5:18 PM, foobone9 foobo...@... wrote: http://www.alex-uhlmann.de/flash/adobe/blog/distortionEffects/effectCube/ --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, christophe_jacquelin christophe_jacquelin@ wrote: Hello, I am seaching a example of 3D Cube for an interface in Flex. Thank you, Christophe, -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
[flexcoders] Re: LCDS Upgrade Problems
I have also noticed an issue when removing metadata sections from destinations in data-management-config.xml. The DataDestination, now getting its relationship information from the Hibernate mapping files, seems to only want to find the related destination from its full class name. Using an independent destination id and setting item-class is not good enough for the relationship to be worked out.
[flexcoders] Re: Problem in sorting XMLList collection as a dataProvider for the list
It's a class property array. That line is simply showing a way to fall back to other compare field properties if none are provided via the 'fields' parameter. --- In flexcoders@yahoogroups.com, geeky developer geekydevelo...@... wrote: Hi foobone9I am trying to implement your sent/recommended code but it is not recognizing internalPropList in line var propList:Array = fields ? fields : internalPropList;. What exactly in internalPropList here? Anyone has any idea, Thanks all for your reply and help . On Thu, Mar 5, 2009 at 4:57 PM, foobone9 foobo...@... wrote: There is a nice example in the Sort class documentation: http://livedocs.adobe.com/flex/3/langref/mx/collections/Sort.html#compareFunction --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, crazy developer geekydeveloper@ wrote: Hi Thanks for replying What does we mean by custom sort compare function, Can we provide any examples of both sort and sort compare functions or little more details about what and how does we do that? Thanks much fro your help On Thu, Mar 5, 2009 at 11:24 AM, Alex Harui aharui@ wrote: If you have a labelfunction, you'll probably need a custom sortcompare function Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui *From:* flexcoders@yahoogroups.com flexcoders%40yahoogroups.com[mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] *On Behalf Of *anuj181 *Sent:* Wednesday, March 04, 2009 3:51 PM *To:* flexcoders@yahoogroups.com flexcoders%40yahoogroups.com *Subject:* [flexcoders] Problem in sorting XMLList collection as a dataProvider for the list Hi Guys I am trying to sort the xmllist collection which is the dataprovider for the list. As the implementation of name-value pairs, i am displaying the entries in form of string in List and would like to sort all the data displayed in the List alphabetically, I am making a call through amfphp call to grab data from backend and populate XMLListCollection but now I need to sort the data in the list. Below is the code,Can anyone please help me where I am messing things up. Also please let me know if there is any question regarding the code and if there is better way of doing it. Thanks /**CODE/ mx:RemoteObject id=amfSetup source=Setup destination=amfphp mx:method name=getList result=getListHandler(event); fault=getListFault(event);/ /mx:RemoteObject [Bindable] private var entriesXmlListFull:XMLList; [Bindable] private var entriesXmlCollection:XMLListCollection; public function getListHandler(event:ResultEvent):void { entriesXmlListFull = XML(event.result).device; populateEntries(); } private function getListFault(event:FaultEvent):void { Alert.Show(Error retreiving Data); } //Displaying names need to be displayed in the List box private function entriesLabelFunc(item:Object):String { var xmlItem:XML = item as XML; return xmlItem..attribute.(@name==friendlyname); } //Populating List with XML Objects private function populateEntries():void { entriesXmlCollection = new XMLListCollection(); for each(var item:XML in entriesXmlListFull) { var friendlyName:String = item..attribute.(@name==friendlyname); //Only add camera type if ( !recordValue hasFriendlyName (itemType.toUpperCase() == CAMERA) ) { entriesXmlCollection.addItem(item); } } //Calling Sort on XMLList collection entriesXmlCollection.sort = sortList; entriesXmlCollection.refresh(); } mx:Sort id=sortList mx:fields mx:SortField name=* caseInsensitive=true / /mx:fields /mx:Sort mx:List id=listData dataProvider={entriesXmlCollection} labelFunction=entriesLabelFunc/
[flexcoders] Re: LCDS Upgrade Problems
I have things up and running now (mostly; I was thrown off a bit by fetchObjectProperties being moved out of the assembler and into the destinations). The problem was a Hibernate version issue. I was using 3.2.0ga and when I popped in the 2.5.4 from the lcds install I was able to get things working. However; I could only get this far when forcing CBLIB proxies (as noted below) by adding aop:config proxy-target-class=true/ to my applicationContext. I am using Spring version 2.5.4 (upgrading soon). I upgraded to Java 6 at the same time as lcds so I'm wondering if this triggered my proxy errors. I think if HibernateAssembler were to implement an interface and then on HibernateType.java line 237 the interface is cast and used; then jdk proxies would work. Thanks for your time Jeff, I'm sure you must be enormously busy. --- In flexcoders@yahoogroups.com, Jeff Vroom jvr...@... wrote: I think this is maybe a problem with the version of hibernate you are using. As part of this simplified configuration feature, the assembler is going into the metadata for hibernate and it seems like the protection-level on that method has changed or is different in the version you are using than the one we compiled against. We are using 3.2.5 I believe. You should not need to change any configuration as it is compatible with the old format. You can remove the metadata section entirely and it will generate the id properties and lazy=true associations for each hibernate association.You can then add assoc tags as needed to change the defaults. Any associated destinations which are not defined are not directly accessible via clients though they are created so you don't have to declare all destinations in your model - just the ones you use fill or getItem calls on. Back to the original error, I guess the other spring configuration you were using was generating some proxy class which did not extend HibernateAssembler? What version of spring are you using? Jeff From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of foobone9 Sent: Thursday, March 05, 2009 6:01 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: LCDS Upgrade Problems That is correct; I have a destination who's source is a derived object of HibernateAssembler (Just to shutoff autoRefreshFill). My assember is then a bean in the Spring container. Obviously something is wrong with this bean because if I force CGLib proxies in my container (to avoid the proxy cast error; even though my derived assembler implements an interface) I get the following error: 17:45:18,606 ERROR [STDERR] MessageBrokerServlet failed to initialize due to runtime exception: Error: java.lang.IllegalAccessError: tried to access method org.hibernate.persister.entity.AbstractEntityPersister.getEntityMetamodel()Lorg/hibernate/tuple/entity/EntityMetamodel; from class flex.data.assemblers.HibernateType at flex.data.assemblers.HibernateType.start(HibernateType.java:247) at flex.data.assemblers.HibernateAssembler.start(HibernateAssembler.java:216) Would I need to update my data-management-config.xml file for 2.6? I am under the impression that it can be greatly simplified (from 2.5.1 config) by removing the hibernate object mappings; but it doesn't need to for backward compatibility. I am using hibernate config files, not annotations, and an example destination I have (one with no relationships) is: destination id=testycle.hibernate adapter ref=java-dao / properties factoryspring/factory sourceTestCycleBean/source use-transactionstrue/use-transactions scopeapplication/scope metadata identity property=id/ /metadata network session-timeout0/session-timeout paging enabled=false pageSize=10/ throttle-inbound policy=ERROR max-frequency=500/ throttle-outbound policy=REPLACE max-frequency=500/ /network server hibernate-entitycom.xxx.ics.dto.TestCycle/hibernate-entity update-conflict-modePROPERTY/update-conflict-mode delete-conflict-modeOBJECT/delete-conflict-mode fill-method namefill/name paramsjava.util.List/params /fill-method fill-configuration use-query-cachefalse/use-query-cache allow-hql-queriestrue/allow-hql-queries /fill-configuration /server /properties channels channel ref=my-rtmp/ /channels /destination and the simple bean definition is: bean id=TestCycleBean class=com.xxx.ics.assembler.MyHibernateAssembler/ I commented everything else out in my data-management-config.xml. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Jeff Vroom jvroom@ wrote: I am thinking your spring configuration must be wrapping the HibernateAssembler in a proxy. The code is getting an error here: HibernateAssembler assembler = (HibernateAssembler) destination.getFactoryInstance().lookup(); when trying to use the factory to get the assembler component from the destination. Usually when you
[flexcoders] Re: LCDS Upgrade Problems
Correction, the Hibernate version bundled with lcds - 3.2.5, not 2.5.4 (that is my Spring version) that I mentioned below. --- In flexcoders@yahoogroups.com, foobone9 foobo...@... wrote: I have things up and running now (mostly; I was thrown off a bit by fetchObjectProperties being moved out of the assembler and into the destinations). The problem was a Hibernate version issue. I was using 3.2.0ga and when I popped in the 2.5.4 from the lcds install I was able to get things working. However; I could only get this far when forcing CBLIB proxies (as noted below) by adding aop:config proxy-target-class=true/ to my applicationContext. I am using Spring version 2.5.4 (upgrading soon). I upgraded to Java 6 at the same time as lcds so I'm wondering if this triggered my proxy errors. I think if HibernateAssembler were to implement an interface and then on HibernateType.java line 237 the interface is cast and used; then jdk proxies would work. Thanks for your time Jeff, I'm sure you must be enormously busy. --- In flexcoders@yahoogroups.com, Jeff Vroom jvroom@ wrote: I think this is maybe a problem with the version of hibernate you are using. As part of this simplified configuration feature, the assembler is going into the metadata for hibernate and it seems like the protection-level on that method has changed or is different in the version you are using than the one we compiled against. We are using 3.2.5 I believe. You should not need to change any configuration as it is compatible with the old format. You can remove the metadata section entirely and it will generate the id properties and lazy=true associations for each hibernate association.You can then add assoc tags as needed to change the defaults.Any associated destinations which are not defined are not directly accessible via clients though they are created so you don't have to declare all destinations in your model - just the ones you use fill or getItem calls on. Back to the original error, I guess the other spring configuration you were using was generating some proxy class which did not extend HibernateAssembler? What version of spring are you using? Jeff From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of foobone9 Sent: Thursday, March 05, 2009 6:01 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: LCDS Upgrade Problems That is correct; I have a destination who's source is a derived object of HibernateAssembler (Just to shutoff autoRefreshFill). My assember is then a bean in the Spring container. Obviously something is wrong with this bean because if I force CGLib proxies in my container (to avoid the proxy cast error; even though my derived assembler implements an interface) I get the following error: 17:45:18,606 ERROR [STDERR] MessageBrokerServlet failed to initialize due to runtime exception: Error: java.lang.IllegalAccessError: tried to access method org.hibernate.persister.entity.AbstractEntityPersister.getEntityMetamodel()Lorg/hibernate/tuple/entity/EntityMetamodel; from class flex.data.assemblers.HibernateType at flex.data.assemblers.HibernateType.start(HibernateType.java:247) at flex.data.assemblers.HibernateAssembler.start(HibernateAssembler.java:216) Would I need to update my data-management-config.xml file for 2.6? I am under the impression that it can be greatly simplified (from 2.5.1 config) by removing the hibernate object mappings; but it doesn't need to for backward compatibility. I am using hibernate config files, not annotations, and an example destination I have (one with no relationships) is: destination id=testycle.hibernate adapter ref=java-dao / properties factoryspring/factory sourceTestCycleBean/source use-transactionstrue/use-transactions scopeapplication/scope metadata identity property=id/ /metadata network session-timeout0/session-timeout paging enabled=false pageSize=10/ throttle-inbound policy=ERROR max-frequency=500/ throttle-outbound policy=REPLACE max-frequency=500/ /network server hibernate-entitycom.xxx.ics.dto.TestCycle/hibernate-entity update-conflict-modePROPERTY/update-conflict-mode delete-conflict-modeOBJECT/delete-conflict-mode fill-method namefill/name paramsjava.util.List/params /fill-method fill-configuration use-query-cachefalse/use-query-cache allow-hql-queriestrue/allow-hql-queries /fill-configuration /server /properties channels channel ref=my-rtmp/ /channels /destination and the simple bean definition is: bean id=TestCycleBean class=com.xxx.ics.assembler.MyHibernateAssembler/ I commented everything else out in my data-management-config.xml. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Jeff Vroom jvroom@ wrote: I am thinking your
[flexcoders] LCDS Upgrade Problems
I am upgrading LCDS from 2.5.1 to 2.6. I have quite a few assemblers that extend the Hibernate assembler and use the Spring factory. On start up the MessageBroker is croaking because of a Null pointer exception in HibernateAssembler line 211. Is the Hibernate assembler code provided in 2.6 as it previously was? (I didn't see it in the install) Has anyone seen this problem or know of any thing to try?
[flexcoders] Re: LCDS Upgrade Problems
Actually, as it turns out now, I had reverted back to the version on Adobe Exchange thinking it was a newer version because I was having the following problem (with what I now know is the newest SpringFactory): 13:32:44,873 INFO [STDOUT] [Flex]MessageBroker failed to start: Exception: java.lang.ClassCastException: $Proxy53 cannot be cast to flex.data.assemblers.HibernateAssembler at flex.data.assemblers.HibernateType.start(HibernateType.java:237) at flex.data.assemblers.HibernateAssembler.start(HibernateAssembler.java:216) --- In flexcoders@yahoogroups.com, Jeff Vroom jvr...@... wrote: I think the problem is that the HibernateAssembler.initialize is not getting called. If you are using the SpringFactory you probably just need a new version of that. I tried putting this up on the adobe component exchange a long time ago but apparently it never made it as I just checked and they still have the old version.I'll try to get that resolved but in the meantime, I put up a copy of the new source file here: http://www.jvroom.com/SpringFactory.java Jeff From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of foobone9 Sent: Thursday, March 05, 2009 11:34 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS Upgrade Problems I am upgrading LCDS from 2.5.1 to 2.6. I have quite a few assemblers that extend the Hibernate assembler and use the Spring factory. On start up the MessageBroker is croaking because of a Null pointer exception in HibernateAssembler line 211. Is the Hibernate assembler code provided in 2.6 as it previously was? (I didn't see it in the install) Has anyone seen this problem or know of any thing to try?
[flexcoders] Re: DataGrid ItemRenderers and display text highlighted search text.
You'll want to work from the item renderer up; not from the data down: http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.html --- In flexcoders@yahoogroups.com, Todd tpreka...@... wrote: Hello All (probably one for Alex H), I know I've seen this implemented before somewhere around the web, but I've search for awhile and can't find it. I have a custom DataGrid that I've subclassed and do lots of trick functionality on it. I pass it a search string, and only the rows that contain that search string are displayed. Now, what I'd like to do is to customize the ItemRenderers so that the portion of text in any ItemRenderer that matches the search string is displayed in a different color and underlined. I know I've seen a demo of this somewhere? Any ideas? Or, any ideas how to implement? My idea is to make a custom DataGridItemRenderer and set it at the DataGrid level so each of the columns will use it. And then on the data property, loop through each of the items being displayed and then format accordingly. However, this seems inefficient, especially since I've already implemented some filterFunctions on the dataProvider... Thanks for any suggestions.
[flexcoders] Re: Scale To Fit
The developer's guide regarding layout sizing: http://livedocs.adobe.com/flex/3/html/help.html?content=size_position_2.html --- In flexcoders@yahoogroups.com, pliechty pliec...@... wrote: Does Flex have a scale to fit mechanism? I would like to scale a component to fit in the visible screen space.
[flexcoders] Re: Problem in sorting XMLList collection as a dataProvider for the list
There is a nice example in the Sort class documentation: http://livedocs.adobe.com/flex/3/langref/mx/collections/Sort.html#compareFunction --- In flexcoders@yahoogroups.com, crazy developer geekydevelo...@... wrote: Hi Thanks for replying What does we mean by custom sort compare function, Can we provide any examples of both sort and sort compare functions or little more details about what and how does we do that? Thanks much fro your help On Thu, Mar 5, 2009 at 11:24 AM, Alex Harui aha...@... wrote: If you have a labelfunction, you'll probably need a custom sortcompare function Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *anuj181 *Sent:* Wednesday, March 04, 2009 3:51 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Problem in sorting XMLList collection as a dataProvider for the list Hi Guys I am trying to sort the xmllist collection which is the dataprovider for the list. As the implementation of name-value pairs, i am displaying the entries in form of string in List and would like to sort all the data displayed in the List alphabetically, I am making a call through amfphp call to grab data from backend and populate XMLListCollection but now I need to sort the data in the list. Below is the code,Can anyone please help me where I am messing things up. Also please let me know if there is any question regarding the code and if there is better way of doing it. Thanks /**CODE/ mx:RemoteObject id=amfSetup source=Setup destination=amfphp mx:method name=getList result=getListHandler(event); fault=getListFault(event);/ /mx:RemoteObject [Bindable] private var entriesXmlListFull:XMLList; [Bindable] private var entriesXmlCollection:XMLListCollection; public function getListHandler(event:ResultEvent):void { entriesXmlListFull = XML(event.result).device; populateEntries(); } private function getListFault(event:FaultEvent):void { Alert.Show(Error retreiving Data); } //Displaying names need to be displayed in the List box private function entriesLabelFunc(item:Object):String { var xmlItem:XML = item as XML; return xmlItem..attribute.(@name==friendlyname); } //Populating List with XML Objects private function populateEntries():void { entriesXmlCollection = new XMLListCollection(); for each(var item:XML in entriesXmlListFull) { var friendlyName:String = item..attribute.(@name==friendlyname); //Only add camera type if ( !recordValue hasFriendlyName (itemType.toUpperCase() == CAMERA) ) { entriesXmlCollection.addItem(item); } } //Calling Sort on XMLList collection entriesXmlCollection.sort = sortList; entriesXmlCollection.refresh(); } mx:Sort id=sortList mx:fields mx:SortField name=* caseInsensitive=true / /mx:fields /mx:Sort mx:List id=listData dataProvider={entriesXmlCollection} labelFunction=entriesLabelFunc/
[flexcoders] Re: LCDS Upgrade Problems
That is correct; I have a destination who's source is a derived object of HibernateAssembler (Just to shutoff autoRefreshFill). My assember is then a bean in the Spring container. Obviously something is wrong with this bean because if I force CGLib proxies in my container (to avoid the proxy cast error; even though my derived assembler implements an interface) I get the following error: 17:45:18,606 ERROR [STDERR] MessageBrokerServlet failed to initialize due to runtime exception: Error: java.lang.IllegalAccessError: tried to access method org.hibernate.persister.entity.AbstractEntityPersister.getEntityMetamodel()Lorg/hibernate/tuple/entity/EntityMetamodel; from class flex.data.assemblers.HibernateType at flex.data.assemblers.HibernateType.start(HibernateType.java:247) at flex.data.assemblers.HibernateAssembler.start(HibernateAssembler.java:216) Would I need to update my data-management-config.xml file for 2.6? I am under the impression that it can be greatly simplified (from 2.5.1 config) by removing the hibernate object mappings; but it doesn't need to for backward compatibility. I am using hibernate config files, not annotations, and an example destination I have (one with no relationships) is: destination id=testycle.hibernate adapter ref=java-dao / properties factoryspring/factory sourceTestCycleBean/source use-transactionstrue/use-transactions scopeapplication/scope metadata identity property=id/ /metadata network session-timeout0/session-timeout paging enabled=false pageSize=10/ throttle-inbound policy=ERROR max-frequency=500/ throttle-outbound policy=REPLACE max-frequency=500/ /network server hibernate-entitycom.xxx.ics.dto.TestCycle/hibernate-entity update-conflict-modePROPERTY/update-conflict-mode delete-conflict-modeOBJECT/delete-conflict-mode fill-method namefill/name paramsjava.util.List/params /fill-method fill-configuration use-query-cachefalse/use-query-cache allow-hql-queriestrue/allow-hql-queries /fill-configuration /server /properties channels channel ref=my-rtmp/ /channels /destination and the simple bean definition is: bean id=TestCycleBean class=com.xxx.ics.assembler.MyHibernateAssembler/ I commented everything else out in my data-management-config.xml. --- In flexcoders@yahoogroups.com, Jeff Vroom jvr...@... wrote: I am thinking your spring configuration must be wrapping the HibernateAssembler in a proxy. The code is getting an error here: HibernateAssembler assembler = (HibernateAssembler) destination.getFactoryInstance().lookup(); when trying to use the factory to get the assembler component from the destination. Usually when you generate a proxy though, it would extend the class being proxied?Does that make sense as to what is going on? Maybe we need to unwrap that proxy in the SpringFactory... I should also have mentioned, the source for the hibernate assembler is in the product. It in resources/samples/assemblers in flex-messaging-dist-src.zip. Jeff From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of foobone9 Sent: Thursday, March 05, 2009 1:39 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: LCDS Upgrade Problems Actually, as it turns out now, I had reverted back to the version on Adobe Exchange thinking it was a newer version because I was having the following problem (with what I now know is the newest SpringFactory): 13:32:44,873 INFO [STDOUT] [Flex]MessageBroker failed to start: Exception: java.lang.ClassCastException: $Proxy53 cannot be cast to flex.data.assemblers.HibernateAssembler at flex.data.assemblers.HibernateType.start(HibernateType.java:237) at flex.data.assemblers.HibernateAssembler.start(HibernateAssembler.java:216) --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Jeff Vroom jvroom@ wrote: I think the problem is that the HibernateAssembler.initialize is not getting called. If you are using the SpringFactory you probably just need a new version of that. I tried putting this up on the adobe component exchange a long time ago but apparently it never made it as I just checked and they still have the old version. I'll try to get that resolved but in the meantime, I put up a copy of the new source file here: http://www.jvroom.com/SpringFactory.java Jeff From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders
[flexcoders] Does ASDoc process metadata tags?
I have classes that are marked with [Managed] and [Bindable] tags. Even though these objects do not extend eventDispatcher I can call dispatchedEvent, addEventListener, and removeEventListener on them. I assume this is because the compiler is wrapping the dispatch code around the object when it sees the metadata tag. This works fine in Flex Builder but when running ASDoc it serves up these calls as errors. Is there a flag I need to set for ASDoc to process the tags when compiling the objects?
[flexcoders] Data Binding to Paged Data (w/ LCDS 2.5.1)
Does anyone have any experience applying watch bindings to items that are paged and throw IPEs? I have a managed object that has relationships to other managed objects. I want to perform operations on the related items when they are pulled client side (from DGs or other view controls) and any time they change (from this client or another); so in the constructor I have: ChangeWatcher.watch(this, [auxUserData, techMinInc], onTechMinIncChange); Where *this is a managed object and techMinInc is a property on the related auxUserData managed object. This throws an IPE from ConcreteDataService and it's not catchable here. Must I first finger auxUserData, catch and handle the IPE before applying the watch? Or does anyone have a best practice approach to this type of problem.
[flexcoders] LCDS 2.5.1 DSprevMessageId Error?
Has anyone seen the following message using LCDS 2.5.1: [Flex] Unable to find message for DSprevMessageId header in batch: xxx It happens when I'm creating new items and then modifying them via the Hibernate assembler. It doesn't seem to cause any problems locally; but when I deploy the app I don't want problems downstream from this... I can't find any mention of DSprevMessageId on the internets. I assume it's the hashed ID for one of my messages; if it's a previous message maybe it doesn't matter anymore? Any insight? Thanks.
[flexcoders] Re: LCDS Attempt To Request a page with Sequence
I had this problem too. Our application is deployed to a limited number of users in a controlled environment so I shutoff the destination and channel timeouts (allowing the user to have an unlimited session time) and I stopped getting these errors. --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: One thing that might help is to use the attribute reconnect fetch=INSTANCE. It seems as though your client is getting disconnected and is reconnecting and upon reconnecting it is trying to fetch a page using a stale reference. DMS is supposed to refresh all references on reconnect but that is not happening here? Do you have the complete server debug log for this case? Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Sent: Monday, March 10, 2008 3:29 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS Attempt To Request a page with Sequence I am getting a new error in 2.5.1 that I have not seen before. This is referencing a lazy loaded class that somehow seems to have be disconnected. The error gets thrown when I try to load the lazy collection after successfully loading the parent object. Any ideas on where to look to solve this? - Kevin [RPC Fault faultString=Attempt to request a page with sequence id: '0' for destination 'userRoles' which the client is not subscribed to. faultCode=Server.Processing faultDetail=null] at mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal: :dispatchFaultEvent http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent ()[C:\depot\flex\branches\enterprise_corfu_b1\frameworks\projects\data\s rc\mx\data\ConcreteDataService.as:2371] at DataListRequestResponder/fault()[C:\depot\flex\branches\enterprise_corfu _b1\frameworks\projects\data\src\mx\data\ConcreteDataService.as:6871] at mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx \rpc\AsyncRequest.as:103] at NetConnectionMessageResponder/statusHandler()[E:\dev\3.0.x\frameworks\pr ojects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:523] at mx.messaging::MessageResponder/status()[E:\dev\3.0.x\frameworks\projects \rpc\src\mx\messaging\MessageResponder.as:222]
[flexcoders] lcds / fds release collection problem
I have a flex 2 application where you can open tabs (of canvases) that display and edit managed data using lcds 2.5.1. The retrieved data is somewhat encapsulated to the UI tab so when the tab is closed I want to release the data to minimize the client memory footprint and data management overhead. The data is retrieved using fill() so to release I use (my DataService).releaseCollection(serviceArray). This synchronous call blocks for a long time and greatly increases the memory footprint. As an example a service array with a length of 127 objects took 48 seconds and actually increased 202,094 bytes just to release. The objects in the service array have several lazy associations; some of which have been accessed; some of which have not (based on paging from my DataGrid). Could there be a circular referencing problem? I am probably doing something obviously wrong but I can't figure it out and would appreciate any advice.
[flexcoders] Re: lcds / fds release collection problem
Unfortunately I already tried releaseCollection(.., true); and the results were the same. In my test scenarios there are no other references to the data outside the collection passed to releaseCollection. Beyond my test scenarios it would be possible to have multiple references in which case I would want the copies to be made and data maintained. Is it possible that my object's lazy relationships are causing excessive graph traversal during the release? If this is the case I'm wondering if I can test that by changing that relationship information in the data management configuration file even though the relationships still exist in my DB without causing any other unintended consequences. --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: Try calling releaseCollection(.., true); If you are releasing a collection which has an object which is still referenced on that client, DMS makes a copy of the instance. This is so that your collection does not have any managed objects after the release call If you pass in the true as the second param it won't make that copy but instead will clear the collection. I have wondered if we need a way to release the reference but leave the collection unchanged... let me know if you think that would help in this case. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of foobone9 Sent: Monday, March 24, 2008 7:18 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] lcds / fds release collection problem I have a flex 2 application where you can open tabs (of canvases) that display and edit managed data using lcds 2.5.1. The retrieved data is somewhat encapsulated to the UI tab so when the tab is closed I want to release the data to minimize the client memory footprint and data management overhead. The data is retrieved using fill() so to release I use (my DataService).releaseCollection(serviceArray). This synchronous call blocks for a long time and greatly increases the memory footprint. As an example a service array with a length of 127 objects took 48 seconds and actually increased 202,094 bytes just to release. The objects in the service array have several lazy associations; some of which have been accessed; some of which have not (based on paging from my DataGrid). Could there be a circular referencing problem? I am probably doing something obviously wrong but I can't figure it out and would appreciate any advice.
[flexcoders] Re: Events in AS3 gives Compile Error 1119
1.)I have a customDataGrid object, which has metadata tag: [Event(name=menuClick,type=mx.events.MenuEvent)] Use the string name: this.mycustomdg.addEventListner(menuClick, handleMenuEvent); OR Create the static string MENU_CLICK somewhere and call it with that.
[flexcoders] Possible Data Service - Hibernate Assembler bug
I have two different apps A B. On startup both use the same DS fill method (and same fill parameters) to login and authenticate a user. The fill returns a managed User object (the logged in user). Both applications work fine on their own. However, I am having the following problem: I start application A - everything works OK I start application B - everything work OK (All data is loaded fine) I terminate application B. - OK I start application B again and get the following stack trace: 09:35:07,815 INFO [STDOUT] [Flex] could not initialize proxy - the owning Session was closed org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:60) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111) at flex.data.assemblers.HibernatePropertyProxy.getHibernateProxyValue(HibernatePropertyProxy.java:60) at flex.data.assemblers.HibernatePropertyProxy.getAlias(HibernatePropertyProxy.java:67) at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:533) at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:518) at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193) at flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:243) at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:549) at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:518) at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193) at flex.messaging.io.amf.Amf3Output.writeObjectArray(Amf3Output.java:800) at flex.messaging.io.amf.Amf3Output.writeAMFArray(Amf3Output.java:431) at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:179) at flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:243) at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:549) at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:518) at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193) at flex.messaging.io.amf.Amf0Output.writeObject(Amf0Output.java:181) at flex.messaging.io.tcchunk.TCCommand.getCommandResponse(TCCommand.java:420) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(AbstractRTMPServer.java:1013) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPConnection.java:435) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:619) I am guessing that some Hibernate proxies that the first run of application B are brought into DS and cached. It then appears that these are not cleaned up or released when the application B session is invalidated (must have something to do with application A still being open). Then when application B is restarted it tries to used the previously cached proxy but that session (and indeed the whole client who first requested it) has ended. All of my relationships or lazily loaded. The object that the initial fill returns does not cause this problem. It is generated when accessing relationships off that graph object (but not in the midst of a getItem call). I have tried many code changes to work around this but none have worked (including using a unique ID in the fill parameters). The fact that the apps work fine on their own tell me that I am using (at least partially) the technology correctly. Does anyone have any insight into what might be going on?
[flexcoders] Re: layout / scrolling issues
I appreciate your posting as I was having the same (or a very similar) problem. I found a solution for my problems in this thread: http://tech.groups.yahoo.com/group/flexcoders/message/84056 By setting my HBox's minWidth=0 I got the scrollbars as I wanted. Putting the HBox inside of a canvas worked but there is no reason to drag around that extra baggage. Try it out. Cheers. --- In flexcoders@yahoogroups.com, Giles Roadnight [EMAIL PROTECTED] wrote: If anyone else has this issues I've foudn the solution to the first item. the problem was that a VBox set to height=100% would stretch it's container which would force scroll bars to pup up in unexpected places. The way to get round this is to put the VBox inside a canvas. If you set both to height=100% the canvas behaves and does not stretch it's parent, the VBox then fits within the canvas and the canvas scrolls the VBox Hopefully someone will find that useful.
[flexcoders] Re: routeMessageToService and routeMessageToClient
A comment was added to the live docs example: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=messaging_config_5.html#258500 that corrects this. MessageService msgService = (MessageService)service; Should be: MessageService msgService = (MessageService)getDestination().getService(); --- In flexcoders@yahoogroups.com, Tom Bray [EMAIL PROTECTED] wrote: I've made a little bit of progress on this front. As suggested by an Adobe engineer, I created a custom ServiceAdapter that overrides invoke() like so: import flex.messaging.messages.CommandMessage; import flex.messaging.messages.Message; import flex.messaging.services.MessageService; import flex.messaging.services.ServiceAdapter; public class SimpleCustomAdapter extends ServiceAdapter { @Override public Object invoke(Message message) { MessageService msgService = (MessageService)service; System.out.println( + message.getBody().toString() ); msgService.pushMessageToClients(message, true); return null; } Now, the alternate signature for pushMessageToClients accepts a Set of clientIDs as the first parameter. This is what you would use to send a message to a specific client. Now, the next question is how do I know which clients are subscribed to this destination? I think I need to manage subscriptions to the destination so I can keep track of the clientIDs, but the docs are vague about how to do that. Here's what my messaging-config.xml looks like: ... adapters ... adapter-definition id=custom class=test.SimpleCustomAdapter/ ... /adapters destination id=customDest adapter ref=custom / /destination ... -Tom On 7/21/06, m88e24 [EMAIL PROTECTED] wrote: The selector attribute of the Consumer class allows messages to be filtered based on information in the header of the message. The downside is that a message is always delivered to all clients which is inefficient and is also a potential security hazard. I just want to deliver a message to a single client from a server side Java class. Both methods, routeMessageToService and routeMessageToClient, are missing from the Flex Java API. The routeMessageToService obviously routes messages to all clients connect to the same destination. It maybe very likely that the routeMessageToClient will route the message to a single peer. But the methods needs a MessageClient which is also missing from the Java doc. With some googling I found a Java doc which contains a very terse definition of the MessageClient. But only very terse and of no use to someone who doesn't now the Flex internals. Is there any example or some more verbose documentation on how to use these classes. Much appreciate any help.
[flexcoders] LCDS out of range sequence and hibernate proxy errors
Has anyone seen the following error: [Flex] Attempt to subscribe to out of range sequence: 4 clientId: 4AE7. I'm getting a boatload of these (w/ different seq numbers and client IDs) when there are multiple browsers connected to my server and I start recycling the browsers. I'm using LCDS 2.5.1, one RTMP channel with many destinations, and the hibernate assembler. It acts like something isn't being cleaned up when a previous client disconnects. Often times after a handful of these come out I get the following error: 20:53:43,877 ERROR [LazyInitializationException] could not initialize proxy - the owning Session was closed org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyIniti\ alizer.java:60) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLa\ zyInitializer.java:111) at flex.data.assemblers.HibernatePropertyProxy.getHibernateProxyValue(Hiber\ natePropertyProxy.java:60) at flex.data.assemblers.HibernatePropertyProxy.getAlias(HibernatePropertyPr\ oxy.java:67) at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:533) at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:518) at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193) at flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:243\ ) at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:549) at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:518) at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193) at flex.messaging.io.amf.Amf3Output.writeObjectArray(Amf3Output.java:800) at flex.messaging.io.amf.Amf3Output.writeAMFArray(Amf3Output.java:431) at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:179) at flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:243\ ) at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:549) at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:518) at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193) at flex.messaging.io.amf.Amf0Output.writeObject(Amf0Output.java:181) at flex.messaging.io.tcchunk.TCCommand.getCommandResponse(TCCommand.java:42\ 0) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(Abstrac\ tRTMPServer.java:1013) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPCo\ nnection.java:435) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker\ .runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker\ .run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:619) I understand Hibernate lazy initialization problems but I'm not explicitly accessing a relationship that isn't loaded. Could these two errors be related with some kind of cleanup/termination situation? Any thoughts? Thanks.