House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / ColdFusion Talk (CF-Talk)

sort algorithm

Author:
Richard White
11/06/2006 12:32 PM

hi, i was just wondering if there was a sort procedure that i could apply to the following scenario: I have a session array structure as follows: session.project.milestones[milstonePosition].name session.project.milestones[milstonePosition].dateOfCompletion session.project.milestones[milstonePosition].tasks[taskPosition].name session.project.milestones[milstonePosition].tasks[taskPosition].value session.project.milestones[milstonePosition].tasks[taskPosition].dateOfCompletion Therefore a project could have numerous milestones and each milestone has numerous tasks. On 1 interface the user can re-order, add, or delete the milestones, and on another interface the user can re-order, add or delete a milestones tasks. The problem i am having at the moment is figuring out how to correctly reorder the milestones so that the tasks are still be assocaited with the milestone. I have figured out that i just need to re-order the [milestonePosition] and then the milestone will keep all of the tasks and values associated to it. I can probably come up with a sort procedure but just wanted to make sure that i am doing everything to best practise. Also, i was thinking that of course all the ordering, adding and deleting needs to be done on the server so i have got a save button on the client. However, if someone adds a milestone, reorders some of them, and deletes others it it is going to be so hard for me to find out what ones they have deleted, added, re-ordered etc... so would just like some of your thoughts on this and maybe the best way i should be going with this. I will really appreciate any help or advice thanks


Search cf-talk

April 18, 2014

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30       

Designer, Developer and mobile workflow conference