[flexcoders] itemRenderer not provided with newValue
I have a problem with the synchronisation of a DataGrid and the itemRenderer, using a itemEditor is used? Here's my (simplified) case: I have a datagrid showing StatusVO objects. A statusVO consists of a status_code and a status_description. The datagrid shows the status_description while the status_code is the dataField. I use a ComboBox itemRenderer to select the status from a list: mx:DataGrid id=dgStatus dataProvider={myStatusData} editable=true mx:columns mx:DataGridColumn headerText=Status dataField=status_code itemEditor=StatusItemEditor editorDataField=newStatusCode labelFunction=displayStatusDescription /mx:DataGridColumn /mx:columns /mx:DataGrid The questionable behaviour is introduced when adding labelFunction=displayStatusDescription. Before adding the labelFunction the behavior is correct: 1) User clicks row 2) ComboBox is displayed 3) User selects value from ComboBox 4) Datagrid shows selected status_code. When adding the labelFunction, the DataGrid does no longer shows the status_description which was selected by the user. When debugging the labelFunction, I see the item property contains the original item and not the item the user selected. The labelFunction is for testing purposes defined in the same mxml document as the DataGrid: private function displayStatusDescription(item:Object, column:DataGridColumn):String { var myStatus : String = String(item[status_description]); return myStatus; } Since the DataGrid shows the correct newStatusCode without using a labelFunction, I expect my itemEditor to work correct. I also expect the DataGrid to provide the labelFunction with the updated value. Is there something extra I have to do to provide the labelFunction with the item based on newStatusCode instead of the original one? Best regards, Sieto
[flexcoders] Re: Pagination using Flex Data Management Service
Jeff, Thanks for your reply. I assume that by paging from client to server you mean that the client gets results fragment by fragment, based on the visible data. For example, if my datagrid shows 8 rows and my paging is set to 5 rows, the datagrid will only get the first two packages of data. In this example 10 rows. When scrolling down by one row at a time, the client retrieves the next package as soon as we reach the 11th row. Correct? Given the current FSD implementation and your suggestion to implement server-side pagination using a fill parameter, the implementation using FDS will probably the same as the implementation you would code for RemoteObjects. Why not use RemoteObjects instaed of FDS? Best regards, Sieto --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: When you have one large ArrayCollection on the client which you want to load a page at a time, FDS currently only supports paging from client to server. The fill method currently must return all items from the database. This is something we'd like to address in a future release. To implement a page at a time ArrayCollection, you can simply pass in the page index as a fill parameter and then code it just to return the number of items asked for. One trick folks sometimes use is to return one more item than they display so that you can tell when you have hit the end of the list. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sid_flex Sent: Thursday, March 08, 2007 9:51 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Pagination using Flex Data Management Service Hello, Pagination using Flex FDS should be simple. Nevertheless i'ts hard finding examples of succesfull implementations using pagination with Flex Data Management Service. Configuring the destination is eaasy. For example: destination id=product adapter ref=java-dao / properties sourceflex.testdrive.store.ProductAssembler/source scopeapplication/scope metadata identity property=productId! / /metadata network session-timeout11/session-timeout paging enabled=true pageSize=5 / throttle-inbound policy=ERROR max-frequency=500/ throttle-outbound policy=REPLACE max-frequency=500/ /network /properties ! nbsp; /destination But what's the ! intended way to navigate through the pages returned? (Or is pagination only intended for optimised network trafic and will the result of ds.fill() always return the full result of the fill() method?) I'm looking for the best next page, previous page, last page, first page solution using FDS. Thanks in advance for your reply. Best regards, Sieto
[flexcoders] Pagination using Flex Data Management Service
Hello, Pagination using Flex FDS should be simple. Nevertheless i'ts hard finding examples of succesfull implementations using pagination with Flex Data Management Service. Configuring the destination is eaasy. For example: destination id=product adapter ref=java-dao / properties sourceflex.testdrive.store.ProductAssembler/source scopeapplication/scope metadata identity property=productId/ /metadata network session-timeout11/session-timeout paging enabled=true pageSize=5 / throttle-inbound policy=ERROR max-frequency=500/ throttle-outbound policy=REPLACE max-frequency=500/ /network /properties /destination But what's the intended way to navigate through the pages returned? (Or is pagination only intended for optimised network trafic and will the result of ds.fill() always return the full result of the fill() method?) I'm looking for the best next page, previous page, last page, first page solution using FDS. Thanks in advance for your reply. Best regards, Sieto