division_dp = Application.application.division_dp;

pass by reference is in force here.  


Douglas Knudsen
[email protected]



On Aug 17, 2010, at 3:45 PM, Eric DeCoff wrote:

> Typo,
>  
>  
> I'd add a watch to Application.application.division_dp and follow it thru the 
> application
> 
> 
> On Tue, Aug 17, 2010 at 3:44 PM, Eric DeCoff <[email protected]> wrote:
> Well Chris,
>  
> At a quick glance... Application.application.division_dp is probable the 
> culprit.
>  
> I'd at a watch to Application.application.division_dp and follow it thru the 
> application
>  
> It probable be changed without you thinking about it...
>  
> So you'll have to add a routine to capute its old value and restore it when 
> W2 closes
>  
>  
>  
>  
>  
> 
> 
>  
> On Tue, Aug 17, 2010 at 2:59 PM, Chris H <[email protected]> wrote:
> 
> My application built using Coldfusion, Flex and MySQL as the back end has the 
> issue of records disappearing after the windows are changed.
> 
> Step 1: A user logs in to the application, then goes to Window W1 where 
> records like departments A1, A2, A3 from Division A,  Division B records like 
>  departments B1, B2....departments G1, G2, G3, G4 and G5 from Division G are 
> displayed.
> 
> He has the option of editing records like departments A1 by clicking on the 
> record and a new window W2 opens which contains A1's information and window 
> W1 is closed. 
> 
> He can choose any department record to change like A1, G2 and so on to edit 
> from Window W1. 
> 
> Step 2: Say, he chooses department A1 which falls under Division A for 
> editing. 
> 
> Step 3: After he does the editing for department A1 and closes the editing 
> window W2, he goes back to window W1 where instead of viewing all departments 
> like A1, A2, A3 from Division A, B1,B2 from Division B, he can see only A1,A2 
> and A3 from Division A.
> 
> If in Step 2, had the user had chosen department G3 which falls under 
> Division G, after doing the editing when he would have closed Window W2 for 
> department G3, he would have come back to window W1, he can see only records 
> of departments G1, G2, G3.. G5 from Division G. 
> 
> In the code, when a user goes from Window W1 to Window W2, there is a 
> filtering based on division in Window W2. So, if someone chooses department 
> A1 from Division A to edit, in window W2 he can switch to editing record A2, 
> A3 instead of A1. This is done as it was asked by the business users of the 
> application. 
> 
> I cannot understand why the filtering done in Window W2 is being passed to 
> Window W1. 
> 
> We are using Remoting services to connect to Coldfusion. 
> 
> How can I stop the filtering being passed to Window W1? If I cannot stop it, 
> can I repopulate the records in Window W1 so that all departments from all 
> divisions are visible in Window W1 when a user comes to it after editing a 
> record?
> 
> Within Window W1 I have 
> 
> 
> In window W2 there is some code like below
> 
> private function doCloseWindow(eventObj:*):void{
>                 parentWindowOpener.TheWindow = null;
>                 //PopUpManager.removePopUp(this);
>                 
>                 if(parentWindowOpener._formOperationMode == 'update'){
>                     parentWindowOpener.openWindow(com.record_selection_win);
>                 }else{
>                     parentWindowOpener.openWindow(com.form_selector_win);
>                 }
>                 
>             }
> 
> There is also some code which is doing the filtering
> 
> private function initApp():void{
>                 division_dp = Application.application.division_dp;
>                 division_dp.filterFunction = doDivFilter;
>                 division_dp.refresh();
>                 
>                 unit_dp = Application.application.unit_dp;
>                 
>             }
>             
>         //Do Division filter    
>             private function doDivFilter(eventObj:Object):Boolean{
>                           return (eventObj.dept_type == division_type);
>                           // where division_type is a string "Division A", 
> "Division B"..
>                           // .."Division G"
> 
>             }
> 
> 
> In Window W1 I have
> 
> private function doCloseWindow(eventObj:*):void{
>                 parentWindowOpener.TheWindow = null;
>                 //PopUpManager.removePopUp(this);
>                 parentWindowOpener.openWindow(com.form_selector_win);
>             }
> 
> Any advice would be welcome.
> 
> Thanks
> 
> 
> ------------------------------------------------------------- 
> To unsubscribe from this list, simply email the list with unsubscribe in the 
> subject line 
> 
> For more info, see http://www.affug.com 
> Archive @ http://www.mail-archive.com/discussion%40affug.com/ 
> List hosted by FusionLink 
> -------------------------------------------------------------
> 
> 
> 
> -- 
> Eric R. DeCoff
> Changing the world,
> 1 line of code at a time
> 
> 
> 
> -- 
> Eric R. DeCoff
> Changing the world,
> 1 line of code at a time

Reply via email to