![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
I have data coming into flex via a remote AMFPHP object. The data is basically
an array containing generic objects [0] date, entry, grade, class, type, db_ID, language etc... [1] date, entry, grade, class, type, db_ID, language etc... ... I want the user to be able to edit individual entries, mark them for update, delete or insert and then synch with the DB. The problem: The user must be able to class the data according to: =DATE 1 .....=GRADE 1 .........=CLASS 1 .............=TYPE 1 .................ENTRY 1 .................ENTRY 2 .............=TYPE 2 .................ENTRY 1 .................ENTRY 2 .........=CLASS 2 .............=TYPE 1 .................ENTRY 1 .................ENTRY 2 .............=TYPE 2 .................ENTRY 1 .................ENTRY 2 And so on. Obviously the control the lends itself to this is the AdvancedDataGrid?? However, editing seems tricky since there doesn't seem to be an easy way to ADD / Delete entries from the dataprovider. (Keep in mind the source array is first filtered for the correct dates, then grouped to form the hierarchy). Right now: ADDING to the DP works, however the entry can't be selected once it's inserted. Right now: DELETING to the DP might work, but I can't find a way to insert a delete button beside each entry. So, finally, my question is: Is there a better control that lends itself to this problem? I've thought of using various comboboxes to allow the user to pick the day, class, subject, type and then run the filterfunction. However, I can't find a way to traverse my source data to get a list of the possible values to put into the combo boxes. Thanks for anyhelp. |
| Sponsored Links |
|
|||
|
May be best to return the data as XML, then you can easily put it in ComboBoxes or ADG. The data format always makes life easy or hard.
|
|
|||
|
Try here:
http://weblogs.macromedia.com/paulw/...tion_pa_3.html His example here: http://weblogs.macromedia.com/paulw/...presentationmo del/demo/PresentationModel.html I have use comboboxes before but this should be a good starting place. |
|
|||
|
"MacGyverMan" <webforumsuser@macromedia.com> wrote in message news:geb33g$14j$1@forums.macromedia.com... >I have data coming into flex via a remote AMFPHP object. The data is >basically > an array containing generic objects > [0] > date, entry, grade, class, type, db_ID, language etc... > [1] > date, entry, grade, class, type, db_ID, language etc... > ... > > I want the user to be able to edit individual entries, mark them for > update, > delete or insert and then synch with the DB. > > The problem: > The user must be able to class the data according to: > =DATE 1 > .....=GRADE 1 > .........=CLASS 1 > .............=TYPE 1 > .................ENTRY 1 > .................ENTRY 2 > .............=TYPE 2 > .................ENTRY 1 > .................ENTRY 2 > .........=CLASS 2 > .............=TYPE 1 > .................ENTRY 1 > .................ENTRY 2 > .............=TYPE 2 > .................ENTRY 1 > .................ENTRY 2 > > And so on. > > Obviously the control the lends itself to this is the AdvancedDataGrid?? > However, editing seems tricky since there doesn't seem to be an easy way > to ADD > / Delete entries from the dataprovider. (Keep in mind the source array is > first > filtered for the correct dates, then grouped to form the hierarchy). > > Right now: ADDING to the DP works, however the entry can't be selected > once > it's inserted. Have you issued an itemUpdated() on the collection where the item is? > Right now: DELETING to the DP might work, but I can't find a way to insert > a > delete button beside each entry. Just add a property to each object "toDelete" or something, and make an additional column to hold it. Or you could do something like this: http://blog.flexmonkeypatches.com/20...togglebuttons/ > So, finally, my question is: > Is there a better control that lends itself to this problem? I've thought > of > using various comboboxes to allow the user to pick the day, class, > subject, > type and then run the filterfunction. However, I can't find a way to > traverse > my source data to get a list of the possible values to put into the combo > boxes. Recursion is a PIA. You might want to look at this component for an idea of an approach http://www.quietlyscheming.com/blog/...alk-component/ |
|
|||
|
Thanks for the help guys.
So am I really better to use XML? I assumed a binary format would be much more efficient...however I can't stand/understand how flex handles bindings and multidimentional arrays. I wish it were as simple as PHP multimentional hash-arrays. Thanks for the suggestion to use itemUpdated, however it doesn't seem to change anything. I don't think it's an issue of the arraycollection not knowing of the changes since the changes should not affect the item's display...I suspect it has something to do with the ADG's itemRenderers not beeing generated properly due to the addition of an extra item. |
|
|||
|
"MacGyverMan" <webforumsuser@macromedia.com> wrote in message news:gedmtj$pcg$1@forums.macromedia.com... > Thanks for the help guys. > > So am I really better to use XML? I assumed a binary format would be much > more > efficient...however I can't stand/understand how flex handles bindings and > multidimentional arrays. I wish it were as simple as PHP multimentional > hash-arrays. > > Thanks for the suggestion to use itemUpdated, however it doesn't seem to > change anything. I don't think it's an issue of the arraycollection not > knowing > of the changes since the changes should not affect the item's display...I > suspect it has something to do with the ADG's itemRenderers not beeing > generated properly due to the addition of an extra item. Is it possible that's a problem in your itemRenderer code? |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise
|