Observer event fires two times

Hi!
I am wondering why an observer fires two times the same
notification type. I have created a simple example and the message
box appears two times:
var dsAll = new Spry.Data.XMLDataSet("all.xml",
"/root/item[@TitleSectionTitle='Germany']", { sortOnLoad:
"@orderLevel", sortOrderOnLoad: "ascending" });
var allRelevantSitesData_observer = new Object;
allRelevantSitesData_observer.onPostLoad = function(dataSet,
data){
alert("uniqueCall " + dataSet.getDataWasLoaded());
dsAll.addObserver(allRelevantSitesData_observer);
function test(land){
dsAll.setXPath("/root/item[@TitleSectionTitle='"+land+"']");
dsAll.loadData();
//on click two message boxes will appear
<a href="javascript:test('Australia')">change filter:
Australia</a>
<a href="javascript:test('Austria')">change filter:
Austria</a>
I am looking forward to a short reply.
Regards
libelle2000

Hi !
On Srpy 1.4 version the 1:n relation is not supported, but we
have two new solutions for this already posted on preview section.
http://labs.adobe.com/technologies/spry/preview/samples/data_region/NestedXMLDataSample.ht ml
Instead of creating one master xml file that points to other
details xml files, you can have a single xml and create there the
1:n relation there. In this way your request is solved using a
single xml file.
Please follow the link I gave you above and see the examples
from there.
Diana

Similar Messages

  • Et_ITEM_PRESSED event  firing two times

    Hi ,
    I have a added a button to one of the windows and use the
    et_ITEM_PRESSED in the ItemEvent to do something. My problem is whenever I click the button the event fires two times. I thought it was my code but the sample code in the CatchingEvents project does the same.
    Does anyone know any wayaround it?
    appologise if this question has been asked before (I assumed so but could not find any matches for my search)
    Regards,
    Indika

    Almost all the item event in SBO executes two times before and after SBO events handler works. If you dont catch one of the events SBO will execute two events in one time. To avoide that you should cacth the events before "OR" after the SBO Events Handler Works.
    For Example:
    <i><b>Before Action:</b></i>
    If pVal.ItemUID = "1" And pVal.EventType = et_ITEM_PRESSED Then
    If Len(oEditText.String) <> 0 Then
    If IsNumeric(oEditText.String) Then
    If Len(oEditText.String) <> 15 Then
    If pVal.Before_Action = True Then
    BubbleEvent = False
    SBOApplication.SetStatusBarMessage "Federal ID Must be 15 Character", bmt_Short
    oTmpForm.Items("41").Click  ....
    <i><b>Action Success:</b></i>If pVal.Action_Success = True Then
    Set oItem = oTmpForm.Items("8")
    Set oEditText = oItem.Specific
    sDocNum = CLng(oEditText.String)
    Set oItem = oTmpForm.Items("29")
    Set oEditText = oItem.Specific
    sJumlah = oEditText.String
    If sJumlah = "" Then
    BubbleEvent = False
    That's all. Hopefully helps.
    Cheers,
    Hamdi

  • ItemEditEnd hell - event fires gazillion times

    Well I was making great progress with my first major flex app when I hit a wall. The last element I put in place was to enable user to edit one column in a datagrid. Before I send the changes back to a web service I thought I would confirm that it is firing correctly and passing correct values. To my surprise the event fires over and over again. I believe its something to do with the use of the accordian and multiple canvases. Sorry but this is happening on both flex 3 and 4 platforms (its worse in 4 for some reason). I have not had a chance to scale down the project and simply it so apologies if the code is lenghty.
    Any ideas how to solve this?
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   creationPolicy= "all">
        <fx:Declarations>
                <mx:WebService
                id="nwCL2"
                wsdl="http://finance-web/BannerWebServices/BannerService.asmx?WSDL">
                <mx:operation name="FetchRequestAsTableToArray"
                              resultFormat="object"
                              showBusyCursor="true"
                              result="resultHandler(event)"
                              fault="onFault(event)">
                    <mx:request>
                        <IncRecItems>{IncRecItems}</IncRecItems>
                        <PmyGUID>{myGUID}</PmyGUID>
                        <AgeItems>{AgeItems}</AgeItems>
                    </mx:request>
                </mx:operation>
            </mx:WebService>
            <mx:WebService
                id="nwCL3"
                wsdl="http://finance-web/BannerWebServices/BannerService.asmx?WSDL">
                <mx:operation name="FetchDirectPOAsTableToArray"
                              resultFormat="object"
                              showBusyCursor="true"
                              result="resultHandler3(event)"
                              fault="onFault(event)">
                    <mx:request>
                        <IncRecItems>{IncRecItems}</IncRecItems>
                        <AgeItems>{AgeItems2}</AgeItems>
                        <PmyGUID>{myGUID}</PmyGUID>
                    </mx:request>
                </mx:operation>
            </mx:WebService>
            <mx:WebService
                id="nwCL4"
                wsdl="http://finance-web/BannerWebServices/BannerService.asmx?WSDL">
                <mx:operation name="FetchDirectPODELAsTableToArray"
                              resultFormat="object"
                              showBusyCursor="true"
                              result="resultHandler4(event)"
                              fault="onFault(event)">
                    <mx:request>
                        <PmyGUID>{myGUID}</PmyGUID>
                    </mx:request>
                </mx:operation>
            </mx:WebService>
            <mx:WebService
                id="nwCL5"
                wsdl="http://finance-web/BannerWebServices/BannerService.asmx?WSDL">
                <mx:operation name="SendMailMessage"
                              resultFormat="object"
                              showBusyCursor="true"
                              result="resultHandler5(event)"
                              fault="onFault(event)">
                    <mx:request>
                        <PmyGUID>{myGUID}</PmyGUID>
                        <from>
                            {from}
                        </from>
                        <recepient>
                            {recepient}
                        </recepient>
                        <bcc>
                            {bcc}
                        </bcc>
                        <cc>
                            {cc}
                        </cc>
                        <subject>
                            {subject}
                        </subject>
                        <body>
                            {myEmailBody}
                        </body>
                        <CallProc>
                            {CallProc}
                        </CallProc>
                    </mx:request>
                </mx:operation>
            </mx:WebService>
            <mx:WebService
                id="nwCL6"
                wsdl="http://finance-web/BannerWebServices/BannerService.asmx?WSDL">
                <mx:operation name="InsRecordFYPOAUD"
                              resultFormat="object"
                              showBusyCursor="true"
                              result="resultHandler6(event)"
                              fault="onFault(event)">
                    <mx:request>
                        <PmyGUID>{myGUID}</PmyGUID>
                        <myuserID>{myuserID}</myuserID>
                        <DocCode>{DocCode}</DocCode>
                    </mx:request>
                </mx:operation>
                <mx:operation name="DelRecordFYPOAUD"
                              resultFormat="object"
                              showBusyCursor="true"
                              result="resultHandler6(event)"
                              fault="onFault(event)">
                    <mx:request>
                        <PmyGUID>{myGUID}</PmyGUID>
                        <DocCode>{DocCode}</DocCode>
                    </mx:request>
                </mx:operation>
                <mx:operation name="FetchUserID"
                              resultFormat="object"
                              showBusyCursor="true"
                              result="resultHandler7(event)"
                              fault="onFault(event)">
                    <mx:request>
                        <PmyGUID>{myGUID}</PmyGUID>
                    </mx:request>
                </mx:operation>
                <mx:operation name="InsGUIDAudit"
                              resultFormat="object"
                              showBusyCursor="true"
                              result="resultHandler8(event)"
                              fault="onFault(event)">
                    <mx:request>
                        <PmyGUID>{myGUID}</PmyGUID>
                    </mx:request>
                </mx:operation>
            </mx:WebService>
            </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                import mx.collections.IViewCursor;
                import mx.controls.Alert;
                import mx.controls.ToolTip;
                import mx.controls.dataGridClasses.DataGridColumn;
                import mx.controls.dataGridClasses.DataGridItemRenderer;
                import mx.core.mx_internal;
                import mx.events.DataGridEvent;
                import mx.events.ListEvent;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                //added after upgrading to flex 4
                import mx.core.FlexGlobals;
                import mx.controls.RichTextEditor
                //import flash.events.Event;
                [Bindable] public var IncRecItems:String;
                [Bindable] public var myGUID:String;
                [Bindable] public var myData:ArrayCollection;
                [Bindable]public var serverData:ArrayCollection; 
                [Bindable]public var serverData3:ArrayCollection;
                [Bindable]public var serverData4:ArrayCollection;
                [Bindable]public var serverData5:ArrayCollection;    
                [Bindable] public var IncRecItems3:String;
                [Bindable] public var from:String;
                [Bindable] public var recepient:String;
                [Bindable] public var bcc:String;
                [Bindable] public var cc:String;
                [Bindable] public var subject:String;
                [Bindable] public var body:String;
                [Bindable] public var CallProc:String;
                [Bindable] public var myEmailBody:String;
                [Bindable] public var myuserID:String;
                [Bindable] public var DocCode:String;
                [Bindable] public var AgeItems:String;
                [Bindable] public var AgeItems2:String;
                [Bindable] public var DocItem:Number;
                [Bindable] public var DocText:String;
                //this adds event listener for mouse over event so I can display descriptive text about various columns values
                //POFromRequest.addEventListener(ListEvent.ITEM_ROLL_OVER, declarePosition);
                //USE ROLLOVER VERSUS MOUSEOVER EVENT AS THE LATTER CAUSES BLINKING
                private function createToolTip(event:ListEvent):void {
                //var col:DataGridColumn = POFromRequest.columns[event.columnIndex];
                //var newValue:String = ArrayCollection(POFromRequest.dataProvider).getItemAt(event.rowIndex)[col.dataField];
                //Alert.show("You are hovering over:" +newValue);
                if (event.columnIndex==13)
                var str:String =  "P-Y=Paid and Completed" + "\r"  + "O-Y=Open and Completed" + "\r"  + "O-R=Open and Unmatched" ;
                //this code works and will fetch active mouse over datagrid values!           
                var col:DataGridColumn = POFromRequest.columns[event.columnIndex];
                var newValue:String = ArrayCollection(POFromRequest.dataProvider).getItemAt(event.rowIndex)[col.dataField];
                //Alert.show("You are hovering over:" +newValue);
                else if (event.columnIndex==21||event.columnIndex==22)
                var col21:DataGridColumn = POFromRequest.columns[21];
                var col22:DataGridColumn = POFromRequest.columns[22];
                var Value21:Number = ArrayCollection(POFromRequest.dataProvider).getItemAt(event.rowIndex)[col21.dataField];
                var Value22:Number = ArrayCollection(POFromRequest.dataProvider).getItemAt(event.rowIndex)[col22.dataField];
                //21=Bal not Rec(BNR);22=Bal not Inv(BNI)
                //evaluate BNR/BNI and give approp message which represents
                //action required by end user (ie they don't have to think!)
                var str:String
                if (Value21>0 && Value22<=0)
                str = "Case1:All invoices sent to AP but we are missing a receiving. Please contact receiving.";
                else if(Value21>0 && Value22>0)
                str = "Case2:We are missing invoices and receiving. Please contact both departments ASAP.";
                else if(Value21<=0 && Value22>0)
                str = "Case3:All receiving completed but we are missing invoices. Please contact AP and forward any invoices to them ASAP.";
                else if(Value21==0 && Value22==0)
                str = "Case4:All documents received. No action required. You can hide these items by clicking/turning off the box:Include Balance of 0 Items? ";
                //var str:String = Value21.toString()+Value22.toString()
                else
                //var str:String = "Row :"  +event.rowIndex + "Column : " +event.columnIndex;
                POFromRequest.toolTip = str;
                private function deleteToolTip(obj:Object):void {
                POFromRequest.toolTip = null;
                //start mouse over code for directPO datagrid
                private function createToolTip2(event:ListEvent):void {
                //var col:DataGridColumn = DirectPOGrid.columns[event.columnIndex];
                //var newValue:String = ArrayCollection(DirectPOGrid.dataProvider).getItemAt(event.rowIndex)[col.dataField];
                //Alert.show("You are hovering over:" +newValue);
                if (event.columnIndex==1)
                var str:String =  "If you know for sure that this item is not yours then highlight item by left clicking, then hit the delete button below. Hold the ctrl key to select multiple items." ;               
                if (event.columnIndex==12)
                var str:String =  "P-Y=Paid and Completed" + "\r"  + "O-Y=Open and Completed" + "\r"  + "O-R=Open and Unmatched" ;
                //this code works and will fetch active mouse over datagrid values!           
                var col:DataGridColumn = DirectPOGrid.columns[event.columnIndex];
                var newValue:String = ArrayCollection(DirectPOGrid.dataProvider).getItemAt(event.rowIndex)[col.dataField];
                //Alert.show("You are hovering over:" +newValue);
                else if (event.columnIndex==20||event.columnIndex==21)
                var col20:DataGridColumn = DirectPOGrid.columns[20];
                var col21:DataGridColumn = DirectPOGrid.columns[21];
                var Value20:Number = ArrayCollection(DirectPOGrid.dataProvider).getItemAt(event.rowIndex)[col20.dataField];
                var Value21:Number = ArrayCollection(DirectPOGrid.dataProvider).getItemAt(event.rowIndex)[col21.dataField];
                //21=Bal not Rec(BNR);22=Bal not Inv(BNI)
                //evaluate BNR/BNI and give approp message which represents
                //action required by end user (ie they don't have to think!)
                var str:String
                if (Value20>0 && Value21<=0)
                str = "Case1:All invoices sent to AP but we are missing a receiving. Please contact receiving.";
                else if(Value20>0 && Value21>0)
                str = "Case2:We are missing invoices and receiving. Please contact both departments ASAP.";
                else if(Value20<=0 && Value21>0)
                str = "Case3:All receiving completed but we are missing invoices. Please contact AP and forward any invoices to them ASAP.";
                else if(Value20==0 && Value21==0)
                str = "Case4:All documents received. No action required. You can hide these items by clicking/turning off the box:Include Balance of 0 Items? ";
                //var str:String = Value21.toString()+Value22.toString()
                else
                //var str:String = "Row :"  +event.rowIndex + "Column : " +event.columnIndex;
                DirectPOGrid.toolTip = str;
                private function deleteToolTip2(obj:Object):void {
                DirectPOGrid.toolTip = null;
                //end tool tip code
                private function GetData():void
                //IncRecItems = "Y"
                //IncRecItems = "Y"
                //myGUID = "d5ef405a-d64a-489f-8583-38dd087de502"
                //var MyurlParams:Dictionary = new Dictionary();
                //MyurlParams = getUrlParamaters();
                //myGUID = MyurlParams['myGUID'];
                nwCL2.FetchRequestAsTableToArray.send();
                private function GetData3():void
                //IncRecItems = "Y"
                //IncRecItems = "Y"
                //myGUID = "d5ef405a-d64a-489f-8583-38dd087de502"
                var MyurlParams:Dictionary = new Dictionary();
                MyurlParams = getUrlParamaters();
                myGUID = MyurlParams['myGUID'];
                nwCL3.FetchDirectPOAsTableToArray.send();
                NotifyDel();
                private function GetData4():void
                //IncRecItems = "Y"
                //IncRecItems = "Y"
                //myGUID = "d5ef405a-d64a-489f-8583-38dd087de502"
                var MyurlParams:Dictionary = new Dictionary();
                MyurlParams = getUrlParamaters();
                myGUID = MyurlParams['myGUID'];
                nwCL4.FetchDirectPODELAsTableToArray.send();
                NotifyStatus();
                public function resultHandler(event:ResultEvent):void {
                serverData = new ArrayCollection(event.result.source);
                //             Alert.show("getdata fired");
                public function resultHandler3(event:ResultEvent):void {
                serverData3 = new ArrayCollection(event.result.source);
                //             Alert.show("getdata fired");
                public function resultHandler4(event:ResultEvent):void {
                serverData4 = new ArrayCollection(event.result.source);
                //             Alert.show("getdata fired");
                public function resultHandler5(event:ResultEvent):void {
                var FunctionResult:String=event.result.toString();
                var Response:String;
                if(FunctionResult != "Success")
                Alert.show("A problem has occurred. " + FunctionResult);
                else
                Alert.show("The email was sent successfully.");
                //             Alert.show("getdata fired");
                public function resultHandler6(event:ResultEvent):void {
                var FunctionResult:String=event.result.toString();
                var Response:String;
                if(FunctionResult != "Success")
                Alert.show("A problem has occurred. " + FunctionResult);
                else
                Alert.show("Item moved.");
                //refresh both datagrids for deleted/ins records
                //need to call diff proc which does the same but does not show the initial message box
                ReloadTables()
                public function resultHandler7(event:ResultEvent):void {
                var FunctionResult:String=event.result.toString();
                if(FunctionResult == "Invalid GUID")
                Alert.show("A problem has occurred. " + FunctionResult);
                else
                myuserID = FunctionResult;
                myGlobVar.globMyUserID = FunctionResult;
                public function resultHandler8(event:ResultEvent):void {
                //we don't really care about handling this event
                var FunctionResult:String=event.result.toString();
                if(FunctionResult == "Invalid GUID")
                Alert.show("A problem has occurred. " + FunctionResult);
                else
                //myuserID = FunctionResult;
                private function initApp():void
                //code for grabing guid passed from .net ldap authentication page
                //this file is located on finance-web box along with guid database.
                //the web service is also located on finance-web
                //and flex source code is on box fin-selement3 but is saved to U and published to finance-web
                //(this is because flex is installed on fin-selement3 only
                //GurfeedTbl = nwCL.FetchFTVACCTAsTable();
                flash.system.Security.allowDomain("*");flash.system.Security.allowInsecureDomain("*");
                //siteData.send();
                //trace("Hello from Flex Debugging!");
                //Alert.show("Init app fired");
                //first get focus of email tab (if we don't then a bug exists;error on object creation)
                //I have tried various techniques for some reason I can't load back to base 0
                //ac.selectedIndex = 3;
                //Alert.show("Please remember to audit documents on all tabssss!");
                //ac.selectedIndex = 1;
                Alert.show("HardCoded GUID in place. Remove after testing")
                myGUID = "c25ef14a-bff4-4e07-bfa5-f9c0725c3fd0";
                //need to set initial value
                AgeItems = "N";
                AgeItems2 = "N";
                myBody.text = "Body";
                //myGUID = "d5ef405a-d64a-489f-8583-38dd087de502"
                //var MyurlParams:Dictionary = new Dictionary();
                //MyurlParams = getUrlParamaters();
                //myGUID = MyurlParams['myGUID'];
                //Alert.show("HardCoded GUID in place. Remove after testing")
                //myGUID = "c25ef14a-bff4-4e07-bfa5-f9c0725c3fd0";
                //insert audit trail record
                nwCL6.InsGUIDAudit.send();
                nwCL6.FetchUserID.send(); //for some reason when this was located inside the proc it was called from it would not
                //set the global variable until after it was required resulting in null error
                //myGlobVar.globMyUserID = myUserID ;
                //Alert.show
                private function checkBoxZero_change(evt:Event):void {
                if(checkBoxZero.selected == true) IncRecItems = "Y" else IncRecItems ="N";
                //Alert.show(IncRecItems.toString())
                GetData() ;
                private function checkBoxAge_change(evt:Event):void {
                //if(checkBoxAge.selected == true) AgeItems = "Y" else AgeItems ="N";
                if(checkBoxAge.selected == true) AgeItems = "N" else AgeItems ="Y";
                GetData() ;
                private function checkBoxAge2_change(evt:Event):void {
                //if(checkBoxAge.selected == true) AgeItems = "Y" else AgeItems ="N";
                if(checkBoxAge2.selected == true) AgeItems2 = "N" else AgeItems2 ="Y";
                GetData3() ;
                private function checkBoxZero3_change(evt:Event):void {
                if(checkBoxZero3.selected == true) IncRecItems3 = "Y" else IncRecItems3 ="N";
                //Alert.show(IncRecItems.toString())
                GetData3() ;
                private function onFault(event:FaultEvent):void {
                Alert.show(event.fault.toString());
                private function RemoveItems():void {
                var selectedItems:Array = DirectPOGrid.selectedItems;
                var listItem:Object;
                if (selectedItems.length < 1)
                Alert.show("You did not highlight any items. Highlight items by left clicking the mouse. To select multiple items, hold the ctrl key down while left clicking.");
                //nwCL6.FetchUserID.send();
                for (var i:int = 0; i < selectedItems.length; i++)
                listItem = selectedItems[i];
                //DirectPOGrid.removeItem(listItem);
                //TargetList.addItem(listItem);
                //var newValue:String = ArrayCollection("selectedItems").getItemAt(i)["PO"];
                var newValue:String = listItem["PO"].toString()
                //Alert.show(newValue);
                DocCode = listItem["PO"].toString()
                //call proc to set userid was not working here as it was getting fired after so I moved it to initapp
                //nwCL6.FetchUserID.send();
                myuserID = myGlobVar.globMyUserID;
                //myUserID = 'testuser';
                nwCL6.InsRecordFYPOAUD.send();
                //Alert.show("doc:"+DocCode+" guid:"+myGUID+"user:"+myGlobVar.globMyUserID);
                //Alert.show(selectedItems[i][PO].toString());
                private function RemoveItems4():void {
                var selectedItems:Array = DirectPOGridNotMine.selectedItems;
                var listItem:Object;
                if (selectedItems.length < 1)
                Alert.show("You did not highlight any items. Highlight items by left clicking the mouse. To select multiple items, hold the ctrl key down while left clicking.");
                for (var i:int = 0; i < selectedItems.length; i++)
                listItem = selectedItems[i];
                //DirectPOGrid.removeItem(listItem);
                //TargetList.addItem(listItem);
                //var newValue:String = ArrayCollection("selectedItems").getItemAt(i)["PO"];
                var newValue:String = listItem["PO"].toString()
                //Alert.show(newValue);
                //Alert.show(selectedItems[i][PO].toString());
                DocCode = listItem["PO"].toString()
                //myGUID = "d5ef405a-d64a-489f-8583-38dd087de502"
                nwCL6.DelRecordFYPOAUD.send();
                private function NotifyDel():void {
                Alert.show("These PO's were not created from requests and we are only guessing that they might belong to you. If you don't want to see specific PO's then you can remove them. This is done by highlighting items (left clicking on row), then clicking the delete button below. Hold the ctrl key to select multiple items.") ;   
                private function NotifyStatus():void {
                Alert.show("These PO's were not created from requests and are displayed here because you have marked them as not belonging to you. If you have accidentally deleted these and they really belong to you then hit the delete button below to reactivate them.") ;   
                private function POSendEmailAP():void {
                var selectedItems:Array = POFromRequest.selectedItems;
                var listItem:Object;
                var newValue:String;
                var ValEmailTO:String = "[email protected],[email protected]";
                var myString:String;
                var txtBody:String;
                var num:int;
                if (selectedItems.length < 1)
                Alert.show("You did not highlight any items. Highlight items by left clicking the mouse. To select multiple items, hold the ctrl key down while left clicking.");
                // emailTO.text = ValEmailTO ;
                txtBody = myBody.text.toString()
                for (var i:int = 0; i < selectedItems.length; i++)
                listItem = selectedItems[i];
                //DirectPOGrid.removeItem(listItem);
                //TargetList.addItem(listItem);
                //var newValue:String = ArrayCollection("selectedItems").getItemAt(i)["PO"];
                newValue = listItem["PO"].toString();
                //Alert.show(newValue);
                emailTO.text = ValEmailTO;
                if (emailSUBJECT.text.toString()=="subject")
                emailSUBJECT.text = newValue ;   
                else
                if (emailSUBJECT.text.indexOf(newValue,0)<0)//this ensures that we only show distinct PO values
                emailSUBJECT.text = emailSUBJECT.text.toString()+"/"+newValue ;   
                //code for email body
                if (txtBody=="Body")
                txtBody = "Dear AP/Receiving:" + "\r" + "\r" + "Please note that I have received the following items directly from the vendor(s): " + "\r" + "\r" + listItem["PO"].toString() + " POItem:" + listItem["POItem"].toString() + " " + listItem["CMDDESC"].toString()  + " " + "QTYRCVD:" + listItem["BALNOTRECD"].toString() + " ";
                else
                txtBody = txtBody + "\r" + listItem["PO"].toString() + " POItem:" + listItem["POItem"].toString() + " " + listItem["CMDDESC"].toString()  + " " + "QTYRCVD:" + listItem["BALNOTRECD"].toString() + " ";   
                myBody.text = txtBody;
                //public variable for sending body text to email service in correct format
                //body = txtBody;
                Alert.show("Items copied to email tab.");
                POFromRequest.selectedIndex=-1;
                private function POSendEmailAPDirectStuff():void {
                var selectedItems:Array = DirectPOGrid.selectedItems;
                var listItem:Object;
                var newValue:String;
                var ValEmailTO:String = "[email protected],[email protected]";
                var myString:String;
                var txtBody:String;
                if (selectedItems.length < 1)
                Alert.show("You did not highlight any items. Highlight items by left clicking the mouse. To select multiple items, hold the ctrl key down while left clicking.");
                // emailTO.text = ValEmailTO ;
                txtBody = myBody.text.toString()
                for (var i:int = 0; i < selectedItems.length; i++)
                listItem = selectedItems[i];
                //DirectPOGrid.removeItem(listItem);
                //TargetList.addItem(listItem);
                //var newValue:String = ArrayCollection("selectedItems").getItemAt(i)["PO"];
                newValue = listItem["PO"].toString();
                //Alert.show(newValue);
                emailTO.text = ValEmailTO;
                if (emailSUBJECT.text.toString()=="subject")
                emailSUBJECT.text = newValue ;   
                else
                if (emailSUBJECT.text.indexOf(newValue,0)<0)//this ensures that we only show distinct PO values
                emailSUBJECT.text = emailSUBJECT.text.toString()+"/"+newValue ;   
                //code for email body
                if (txtBody=="Body")
                txtBody = "Dear AP/Receiving:" + "\r" + "\r" + "Please note that I have received the following items directly from the vendor(s): " + "\r" + "\r" + listItem["PO"].toString() + " POItem:" + listItem["POItem"].toString() + " " + listItem["CMDDESC"].toString()  + " " + "QTYRCVD:" + listItem["BALNOTRECD"].toString() + " ";
                else
                txtBody = txtBody + "\r" + listItem["PO"].toString() + " POItem:" + listItem["POItem"].toString() + " " + listItem["CMDDESC"].toString()  + " " + "QTYRCVD:" + listItem["BALNOTRECD"].toString() + " ";   
                myBody.text = txtBody;
                Alert.show("Items copied to email tab.");
                DirectPOGrid.selectedIndex=-1;
                private function ClearEmail():void {
                myBody.text = "Body";
                emailSUBJECT.text = "Subject";
                private function SEmail():void {
                //hardcode until we fetch via guid
                //Alert.show("Insert code to fetch username from guid. For now its hard coded.");
                CallProc = "FLEX"; //This notifies web service so it parses out \r to <p>
                //from = "[email protected]"
                var MyurlParams:Dictionary = new Dictionary();
                MyurlParams = getUrlParamaters();
                myGUID = MyurlParams['myGUID'];
                //myGUID = "c25ef14a-bff4-4e07-bfa5-f9c0725c3fd0";
                //from = myuserID+"@aus.edu";
                from = myGlobVar.globMyUserID+"@aus.edu";
                recepient =  emailTO.text.toString();
                cc = emailCC.text.toString();
                bcc = "[email protected]"
                subject = emailSUBJECT.text.toString();   
                //var stuffToReplace:RegExp = /\r\n|\n\r/g;
                //the key to this function is the /g means global and means to replace ALL instances of search variable!!!
                var stuffToReplace:RegExp = /\r/g;
                //myEmailBody = myEmailBody.replace("\r","*123");
                myEmailBody = myBody.text.replace(stuffToReplace,"*123*");
                //myEmailBody = myBody.text.replace("\r","*\r").toString();
                //myEmailBody = myBody.text ;
                //myEmailBody.replace("\r","*\r");
                //myGUID = "d5ef405a-d64a-489f-8583-38dd087de502"
                nwCL5.SendMailMessage.send();
                private function ReloadTables():void
                //myGUID = "d5ef405a-d64a-489f-8583-38dd087de502"
                nwCL4.FetchDirectPODELAsTableToArray.send();
                nwCL3.FetchDirectPOAsTableToArray.send();    
                private function getUrlParamaters():Dictionary
                var urlParams:Dictionary = new Dictionary();
                if (ExternalInterface.available)
                var fullUrl:String = ExternalInterface.call('eval', 'document.location.href');
                var paramStr:String = fullUrl.split('?')[1];
                if (paramStr != null)
                var params:Array = paramStr.split('&');
                for (var i:int=0; i < params.length; i++)
                var kv:Array = params[i].split('=');
                urlParams[kv[0]] = kv[1];
                else
                    urlParams = FlexGlobals.topLevelApplication.parameters;
                //urlParams = Application.application.parameters;
                    //urlParams = sparks.components.application.parameters;
                return urlParams;
                private function RefData(event:DataGridEvent):void {
                    var dataGrid:DataGrid = event.target as DataGrid;
                    var dsColumnIndex:Number = event.columnIndex;
                    var col:DataGridColumn = dataGrid.columns[dsColumnIndex];
                    var colPO:DataGridColumn = dataGrid.columns[1];
                    var colPOItem:DataGridColumn = dataGrid.columns[5];
                    var colNotes:DataGridColumn = dataGrid.columns[23];
                    var newValue:String = dataGrid.itemEditorInstance[col.editorDataField];
                    var newValue2:String = dataGrid.itemEditorInstance[colNotes.editorDataField];   
                    var dbval:String;
                    var dbvalLen:Number;
                    DocCode = ArrayCollection(POFromRequest.dataProvider).getItemAt(event.rowIndex)[colPO.dataField];
                    DocItem = ArrayCollection(POFromRequest.dataProvider).getItemAt(event.rowIndex)[colPOItem.dataField ];
                    dbval = ArrayCollection(POFromRequest.dataProvider).getItemAt(event.rowIndex)[col.dataField];
                    if (dbval.length != null)
                    dbvalLen = dbval.length;
                    else
                    dbvalLen = 0;
                    //Alert.show("key=" +myGlobVar.KeyPress)
                    if (newValue2.substr(0,3)!='P00') //this is silly code that is necessary until I sort the whole problem of audit note Dec 2010
                        //When the user hits the tab key the cursor goes to the next line and for some reason assigns PO field value to notes field value
                        //this line of code ignores in that case       
                        //if (dbval==null && newValue2!=null && newValue2!='')
                        //if (newValue2!=null || newValue2!='')
                        //if (newValue2!=null || dbvalLen>=1)
                        Alert.show("grid value" +DocCode+":"+DocItem+"Notes:"+newValue+"colNotes:"+newValue2+"dbvnotes:"+dbval);                
                    //nwCL6.UpdateFYPOAUD.send();
                    //tempCnt
                    //if datagrid edit is true then this will fire       
                    //all the code below is checking if value from datagrid has changed
                    //as compared to value stored in source data so we don't need this in this project
                    //var dsFieldName:String = event.dataField;
                    //var author:VOAuthor = event.itemRenderer.data as VOAuthor;
                    //if (newValue == author[dsFieldName])
                    //    return;
                    //get the new value for the first name or last name
                    //author[dsFieldName] = newValue;
                    //myRemote.saveData(author);
            ]]>
        </fx:Script>
        <mx:Panel title="Auditing of Purchase Order Delivery and Invoicing Status by User:" height="100%" width="100%"
                  creationComplete="initApp()" paddingTop="5" paddingBottom="5" paddingLeft="5" paddingRight="5" fontSize="15" horizontalAlign="left" color="#701193">
            <mx:Accordion id="ac"
                          width="100%"
                          height="100%"
                          selectedIndex="0"
                          historyManagementEnabled="false"  >
                <mx:Canvas width="100%" height="400"  label="Detailed Data for which a PO was issued from a Request" id="POfromReq" backgroundColor="#D2E9DA" color="#A60831">
                    <mx:Button click="GetData()" label="Press to load Data" width="305"></mx:Button>
                    <mx:FormItem label="HeaderWordWrap:" x="335">
                        <mx:CheckBox id="checkBox" selected="true" />
                    </mx:FormItem>
                    <mx:FormItem label="Include Balance of 0 Items?:" x="550">
                        <mx:CheckBox id="checkBoxZero" selected="false" change="checkBoxZero_change(event);"  />
                    </mx:FormItem>
                    <mx:FormItem label="Only Show Items > 30 Days?:" x="850">
                        <mx:CheckBox id="checkBoxAge" selected="true" change="checkBoxAge_change(event);"  />
                    </mx:FormItem>
                    <mx:DataGrid id="POFromRequest"  allowMultipleSelection="true" doubleClickEnabled="true" editable="True" horizontalScrollPolicy="auto" width="3500" height="300" dataProvider="{serverData}" y="36" itemRollOut="deleteToolTip(event)" itemRollOver="createToolTip(event)" itemEditEnd="RefData(event)">
                        <mx:columns>
                            <fx:Array>
                                <mx:DataGridColumn headerText="UserName"  editable="false" dataField="SOURCEREQUESTUSERID" width="100"/>
                                <mx:DataGridColumn headerText="PO" dataField="PO" width="100"/>
                                <mx:DataGridColumn headerText="Vendor" dataField="VENDOR" width="270"/>
                                <mx:DataGridColumn headerText="Po Date" dataField="PO_Date" width="120"/>
                                <mx:DataGridColumn headerText="Ordered QTY (A)" headerWordWrap="{checkBox.selected}" dataField="Ord_Qty" width="120" />
                                <mx:DataGridColumn headerText="PO Item" dataField="POItem" width="100" />
                                <mx:DataGridColumn headerText="Commodity Description" dataField="CMDDESC" width="300"/>
                                <mx:DataGridColumn headerText="PO Unit Price" dataField="POUNITPRICE" width="120"/>
                                <mx:DataGridColumn headerText="Org code" dataField="ACTGORG" width="100"/>
                                <mx:DataGridColumn headerText="Receiving Document" dataField="RECEIVE_DOC_NUM" headerWordWrap="{checkBox.selected}" width="120"/>
                                <mx:DataGridColumn headerText="Received Qty (B)" dataField="RECQTY" width="150"/>
                                <mx:DataGridColumn headerText="Inv Document #" dataField="INVCODE" width="150"/>
                                <mx:DataGridColumn headerText="Vendor Invoice #" dataField="VENDINV" width="150"/>
                                <mx:DataGridColumn headerText="Invoice Status" dataField="INVSTATUS" width="150"/>
                                <mx:DataGridColumn headerText="Invoice Due Date" dataField="DUEDATE" width="150"/>
                                <mx:DataGridColumn headerText="Invoice Date" dataField="VENDORINVDATE" width="120"/>
                                <mx:DataGridColumn headerText="Fund" dataField="FUNDCODE" width="80"/>
                                <mx:DataGridColumn headerText="Account" dataField="ACCT" width="80"/>
                                <mx:DataGridColumn headerText="Org" dataField="ORG" width="80"/>
                                <mx:DataGridColumn headerText="Prg" dataField="PROG" width="80"/>
                                <mx:DataGridColumn headerText="Net Invoiced (C)" headerWordWrap="{checkBox.selected}" dataField="NETINVD" width="130"/>
                                <mx:DataGridColumn headerText="Balance not Received (A-B)" headerWordWrap="{checkBox.selected}" dataField="BALNOTRECD" width="175"/>
                                <mx:DataGridColumn headerText="Balance not Invoiced (B-C)" headerWordWrap="{checkBox.selected}" dataField="BALNOTINVD" width="175"/>
                                <mx:DataGridColumn headerText="Notes" headerWordWrap="{checkBox.selected}" dataField="NOTES" width="300"/>
                            </fx:Array>
                        </mx:columns>
                    </mx:DataGrid>
                    <mx:List id="square"  visible="false" x="298" y="266"></mx:List>
                    <mx:Button click="POSendEmailAP()" label="Press to copy selected items to body of email template" width="478" y="344"></mx:Button>
                </mx:Canvas>
                <mx:Canvas width="100%" height="400"  label="Direct PO Details: PO not created from request" id="DirectPO" backgroundColor="#D2E9DA" color="#A60831">
                    <mx:Button click="GetData3()" label="Press to load Data" width="305"></mx:Button>
                    <mx:FormItem label="HeaderWordWrap:" x="335">
                        <mx:CheckBox id="checkBox3" selected="true" />
                    </mx:FormItem>
                    <mx:FormItem label="Include Balance of 0 Items?:" x="550">
                        <mx:CheckBox id="checkBoxZero3" selected="false" change="checkBoxZero3_change(event);"  />
                    </mx:FormItem>
                    <mx:FormItem label="Only Show Items > 30 Days?:" x="850">
                        <mx:CheckBox id="checkBoxAge2" selected="true" change="checkBoxAge2_change(event);"  />
                    </mx:FormItem>
                    <mx:DataGrid id="DirectPOGrid"  allowMultipleSelection="true" horizontalScrollPolicy="auto" width="3500" height="300" dataProvider="{serverData3}" y="36" itemRollOut="deleteToolTip2(event)" itemRollOver="createToolTip2(event)" itemEditEnd="RefData(event)">
                        <mx:columns>
                            <fx:Array>
                                <mx:DataGridColumn  headerText="PossibleUserName" dataField="PossibleSourceUserid" width="160"/>
                                <mx:DataGridColumn headerText="PO" dataField="PO" width="100"/>
                                <mx:DataGridColumn headerText="Vendor" dataField="VENDOR" width="270"/>
                                <mx:DataGridColumn headerText="Po Date" dataField="PO_Date" width="120"/>
                                <mx:DataGridColumn headerText="Ordered QTY (A)" headerWordWrap="{checkBox3.selected}" dataField="Ord_Qty" width="120" />
                                <mx:DataGridColumn headerText="PO Item" dataField="POItem" width="100" />
                                <mx:DataGridColumn headerText="Commodity Description" dataField="CMDDESC" width="300"/>
                                <mx:DataGridColumn headerText="PO Unit Price" dataField="POUNITPRICE" width="120"/>
                                <mx:DataGridColumn headerText="Org code" dataField="ACTGORG" width="100"/>
                                <mx:DataGridColumn headerText="Received Qty (B)" dataField="RECQTY" width="150"/>
                                <mx:DataGridColumn headerText="Inv Document #" dataField="INVCODE" width="150"/>
                                <mx:DataGridColumn headerText="Vendor Invoice #" dataField="VENDINV" width="150"/>
                                <mx:DataGridColumn headerText="Invoice Status" dataField="INVSTATUS" width="150"/>
                                <mx:DataGridColumn headerText="Invoice Due Date" dataField="DUEDATE" width="150"/>
                                <mx:DataGridColumn headerText="Invoice Date" dataField="VENDORINVDATE" width="120"/>
                                <mx:DataGridColumn headerText="Fund" dataField="FUNDCODE" width="80"/>
                                <mx:DataGridColumn headerText="Account" dataField="ACCT" width="80"/>
                                <mx:DataGridColumn headerText="Org" dataField="ORG

    Thanks...I was using Alert instead of trace to make sure events were firing along with correct parameter values before calling web service. I never thought in a million years that would be causing the problem. However, when user hits return it drops the focus to the next row which causes a second itemEditEnd to fire (so it still doesn't work smoothly). At any rate, I approached it another way by wiring up a pop up box.

  • Alerts for events showing two time zones? Alerts happening at odd times.

    I just set a new event for later today using the calender app. I set two alerts, one for 30 mins before, and one for 15 minutes before. It is currently TWO hours until the appointment, but my phone just gave me the alert saying "*event name* in 30 minues (6:30, 5:30 ADT)"
    Why is my phone suddently telling me when my events are happening in ADT? (That means Atlantic Daylight Time... I think!) And why is it giving me the alert 2 hours before, rather than the set 30 mins?
    Message was edited by: Sarah CMac

    It just happened again! I wrote down exactly what it said.
    the current time is 5:00
    the message said:
    " Table Viewers
    Today at 5:30pm (6:30pm ADT)"
    The event is set to happen at 6:30.
    What the heck is going on??
    (Table Viewers: I am selling a table set. People are coming to view it)

  • Why Can't iCal Handle an Event in Two Time Zones?

    If I'm entering, say, a plane trip I'm taking that takes off in one time zone and lands in another, I can't enter this properly in iCal. Interestingly, if I'm entering this event in my iPhone's version of iCal, it works. That version of iCal has the option for separate time zones on the event's beginning and end. But not on the OSX version of iCal.
    It would be great if Apple would fix this. It's an annoying problem. Especially for those of us who travel a lot, it's important to enter items in LOCAL time so when we land our iCal is displaying our events correctly.
    This problem has at least one fascinating bug, which is that the trip I'm taking this week from China to the U.S. will not display on my iCal on my desktop at all, because the plane takes off on Friday at 5:00 p.m. (in Shanghai) and lands on Friday at 4:05 p.m. (in Chicago). The flight itself is, of course, 12 hours long, but iCal can't seem to figure out how to display a flight that lands before it takes off, if you're just tracking it in a single time zone.
    I know there are workarounds for this, but don't make me do the calculations... Since the iPhone version of iCal can handle this, the desktop version should, too.

    I don't know why iMovie is not allowing you to delete parts of clips but there is a workaround.  You can split your clips using Quicktime Player then drag and drop the resulting files into your event.
    For information this is the only way of deleting parts of clips in iMovie 10.
    I'm not sure about the other points
    Geoff.

  • How to create an event in two different time zones?

    Hello,
    I am traveling a lot and I would like to be able to enter the flight details in iCal - whether on my iPhone, iCloud, i... whatever. The problem is that I cannot manage to enter these details without calculating the time difference. Example:
    I am flying on Saturday from Frankfurt to Japan. My flight takes off at 19:00h local German time and arrives in Tokyo at 13:00h local time (in Japan)
    I can either specify the time zone for Germany or for Tokyo, but is there a way to enter the event from 19:00h German time to 13:00h Tokyo time?
    Thank you very much for your time.
    Larry

    Hi Alex,
    this applies only when the event takes place in one time zone, but in my case I start the event on one time zone and ends in a different time zone. As it is known, the airlines show always the local times on the ticket. Which means that I start my travel at 19:00h German time (UTC +2) and end it at 13:00h Tokyo time (UTC +9). When I create the event I can choose From Date/Time... To Date/Time and below I have Time zone. Ideally I should have two time zones, one for the start and another for the end.
    Since this situation only applies to travelling (I can't think of another case right now), I believe that Apple didn't take this into consideration.
    Any other thoughts/ideas? Other than manually calculating the difference, of course.

  • CFL Event Fires more than ONE Time

    Hi,
    Does anybody in here experienced that when an add-on form is created with a  CFL in the matrix, and you closed the form, and then opens the same form again ( by clicking a menu and without exiting the application), the CFL event fires equal to the times you closed the form?
    for example i closed the form 3 times, and then when i debug the application, it fires the CFL event also 3 times..
    It seems its some kind of creepy bug..
    Thanks...
    BTW im using SAP B1 2007 A (8.00.175) SP:00 PL:30

    Hello Robert,
    Does it work fine in the previous or latest version? if yes, there may be a bug in the patch, you may need to update to latest version.
    How ever these is a workaround:
    Have a CFL counter (lCounter) to count the times of CFL event fired at the beginning of Event handler.
    if (lCounter > 3)
         Exit Sub
    Kind Regards
    -Yatsea

  • One Click - two times the same event?

    Hello guys, i have a little problem...
    When I click on my button it seems to be that the event handler method is run two times. I cant understand why - its happening at all buttons. can anyone help me?
    GUI.java
    public void actionPerformed(ActionEvent event) {
    transmit();                  // transmit the textfields
    p.translate();               // translate it to xml
    html = p.newHTML();          // translate the xml to html
    status.setText("<html>"+html);  // set the translatet html in the preview panel
    taHtml.setText(html);  // set the translatet html in the text area     
    The problem is that it appears two times in both, the area and the label.
    Here is the other code, if it helps.
    public String newHTML() {
              String tmp = xMLToHTMLParser.translate(xml);
              return tmp;
    public String translate(String delivered) {
                   xml = delivered;
                   html += "<b>";
                   try {
                   html += xml.substring(xml.indexOf("<Headline>")+10, xml.indexOf("</Headline>"));
                   catch(Exception e) {}  // When nothing is in the Headline do nothing.
    html += "</p>\n \n";
                   return html;
              }Thnak you so much for you help!
    Toby

    Ok, here is the transmit():
        /** Transmits the content of the Textfields to the Parser */
        private void transmit() {
             String Logoname = phases[phaseChoices.getSelectedIndex()];
             p.setLogoURL("http://www.destinations2discover.com/images/icons/"+Logoname);  // All icons are already saved on the Server
             p.setHeadline(tfHeadline.getText());
             // It's very tricky to get the correct dates in :)
             // First Step: transfer the correct Items, for next Step see Parser.java
             if( !tfAdditional.getText().equalsIgnoreCase("" )) {
                  try {
                       p.setDateline(tfAdditional.getText());
                  catch(Exception e) {
                  p.setDateline ("T Y P E C A S T   E R R O R   IN   D A T E L I N E   A D D I T I O N A L");
             /*else*/ if(( (!tfStartDay.getText().equalsIgnoreCase("")) &&  (!tfStartMonth.getText().equalsIgnoreCase("")) &&  (!tfStartYear.getText().equalsIgnoreCase("" )) && (!tfEndDay.getText().equalsIgnoreCase("")) &&  (!tfEndMonth.getText().equalsIgnoreCase("")) &&  (!tfEndYear.getText().equalsIgnoreCase("")) )) {
                  try {
                  p.setDateline ( Integer.parseInt(tfStartDay.getText()), Integer.parseInt(tfStartMonth.getText()), Integer.parseInt(tfStartYear.getText()), Integer.parseInt(tfEndDay.getText()), Integer.parseInt(tfEndMonth.getText()), Integer.parseInt(tfEndYear.getText()) );
              catch(Exception e) {
                   p.setDateline ("T Y P E C A S T   E R R O R   IN   D A T E L I N E   S T A R T  /  E N D");
             else if(((!tfStartDay.getText().equalsIgnoreCase("")) &&  (!tfStartMonth.getText().equalsIgnoreCase("")) &&  (!tfStartYear.getText().equalsIgnoreCase("" )) ) ){
                  try {
                       p.setDateline ( Integer.parseInt(tfStartDay.getText()), Integer.parseInt(tfStartMonth.getText()), Integer.parseInt(tfStartYear.getText()) );
              catch(Exception e) {
                   p.setDateline ("T Y P E C A S T   E R R O R   IN   D A T E L I N E   S T A R T");
    //-->FIX::  Add Annual Event Checkbox      if(!btnAnnual.getText().equalsIgnoreCase("StartDay"))
             if(!tfImageURL.getText().equalsIgnoreCase("")) {
                  p.setImageURL(tfImageURL.getText());
             if(!tfText.getText().equalsIgnoreCase("")) {
                  //p.setText(tfText.getText());
                  p.setText(taTxt.getText());
             if(!tfHyperlink.getText().equalsIgnoreCase("")) {
                  p.setHyperlinkURL(tfHyperlink.getText());
        }And here is the whole actionPerformed - just to make sure i have the listener not twice.
    public void actionPerformed(ActionEvent event) {
            if ("comboBoxChanged".equals(event.getActionCommand())) {
                //Update the icon to display the new phase.
                phaseIconLabel.setIcon(images[phaseChoices.getSelectedIndex()]);
            // Set the article ID from the radio buttons
            else if (event.getSource() == rbFOM) {
                p.setID(1);
            else if (event.getSource() == rbInsider){
                 p.setID(2);
            else if (event.getSource() == rbMustSee){
                 p.setID(3);
            else if (event.getSource() == rbMustDo){
                 p.setID(4);
            else if (event.getSource() == rbMustExperience){
                 p.setID(5);
            else if (event.getSource() == rbActivity){
                 p.setID(6);
            else if (event.getSource() == sendContent) {
                 transmit();                  // transmit the textfields
                 p.translate();               // translate it to xml
                 html = p.newHTML();          // translate the xml to html
                 status.setText("<html>"+html);  // set the translatet html in the preview panel
                 taHtml.setText(html);  // set the translatet html in the text area     
                 // write in html in line.html and xml in line.xml file
                 try  {
                 FileOutputStream fos = new FileOutputStream( "line.html" );
                fos.write( html.getBytes() );
                fos.close();
                catch ( Exception e ) { System.out.println(e); }
                xml = p.getXML();
                try  {
                 FileOutputStream fos2 = new FileOutputStream( "line.xml" );
                fos2.write( xml.getBytes() );
                fos2.close();
                catch ( Exception e ) { System.out.println(e); }
                show = true;     // workaround
            else if (event.getSource() == addContent) {
                 transmit();                  // transmit the textfields
                 p.translate();               // translate it to xml
                 html = p.newHTML();          // translate the xml to html
                 status.setText("<html>"+html);  // set the translatet html in the preview panel
                 taHtml.setText(html);  // set the translatet html in the text area     
                 // write in html in line.html and xml in line.xml file
                 try  {
                 FileOutputStream fos = new FileOutputStream( "line.html" );
                fos.write( html.getBytes() );
                fos.close();
                catch ( Exception e ) { System.out.println(e); }
                xml = p.getXML();
                try  {
                 FileOutputStream fos2 = new FileOutputStream( "line.xml" );
                fos2.write( xml.getBytes() );
                fos2.close();
                catch ( Exception e ) { System.out.println(e); }
                show = true;
            else if (event.getSource() == showInIE) {
                 if(show) {   // workaround
                 try  {
                      File fd= new File("");
                    path = fd.getAbsolutePath();
                    path = "C:\\Program Files\\Internet Explorer\\iexplore.exe "  + path +  "\\line.html";
                    System.out.println(path);  // debug
                      //     Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\iexplore.exe \"C:\\Dokumente und Einstellungen\\intern\\Eigene Dateien\\code kopie\\text2XML\\text2Destination\\line.html\"");
                      Runtime.getRuntime().exec(path);
                 catch ( Exception e ) { System.out.println(e); }
                 show = false;   // workaround
                 showInIE.disable();
                 else if(show = false) {  // workaround
                      show = true;   // workaround
            }This problem is not only at the Button with "sendContent" it is also with "addContent' and "showInIE".
    Thank you two.

  • MouseExit event fires exit event also,code executes 2 times

    Hi All,
    I have put some code to validate account number user has just entered in exit event of account number field which is in a repeater grid in Form guide.
    I notice that if I tab out it executes the code 2 times, if I use mouse to enter into the field don't change anything and then click on next field it executes again (2 times). looks like exit event is fired on mouse exit also, but I don't want that.
    I am perplexed that exit event is firing 2 times and don't know the reason for it.
    Please help to identify why code fires 2 times and how to avoid mouse exit firing exit event as well
    I hope I am not asking crazy thing here.
    Thanks
    Manoj

    Hi Steve,
    1) Are reseting on the cell or field? Is there data binding on the cell or field? Is there a calculation on the cell or field?
      There is data binding on this field. Well this item is in a subform and exists as a repeating subform record element. So I don't
      know what to call it. I am including my form and data content so that you can see it.
    2)
         How can I do that, that is set a invalid message with red color etc?
         No. That is why I stated you can either set focus or change the field colour but not both, without customizing the Form Guide.
         Okay what I meant was not show a message with Alert or hostmessage call then set focus works but also set the invalid message dynamically
          via  some property so that it show the red color message as we did when we set the validation pattern.
    3) exit event - I am attaching my form and data file for you to see. I have a schema attached to the form but can't send you that. Data file is included.
    4) Is there a link where we can learn more about customizing or if you have enough samples for customization. I did see the standard adobe doc about it and that helped me a lot, but was wondering if you did anything or others in your team  as prototypes through which we cam learn more.
    5) The form 401db.xdp is converted to .xml so that i can attach to the email. Please rename again to xdp.
    I can't thank you enough for looking into this. God bless you!
    Regards
    Manoj
    PS. Happy day for me to get your attention.

  • I need to have two time zones on the same iCal appointment

    I work accross four time zones, two of which do not observe Daylight Saving Time (DST). This means that when I'm booking my flights on iCal, it would be usefull to have two time zones in the same iCal appointment (Outlook, for instance, allows this). What I currently do is to choose one of the time zones as the iCal appointment and then I "translate" the other time to the one I'm using on iCal.
    This is quite a challenge, though:
    if I'm taking a flight from Luanda (WAT = GMT+1, no DST) to London (GMT with DST) I would like to book it on iCal exactly like it shows on the ticket , 21:00 (WAT) to 06:00 (GMT).
    Using the "translated approach", from May to October, this means 21:00 (GMT) to 06:00 (GMT).
    Using the same approach, from November to April it means from 20:00 (GMT) to 06:00 (GMT).
    If I include Jo'burg (CAT = GMT+2, no DST) and Frankfurt (GMT+1 with DST), booking flights in your calendar becomes quite a challenge!
    Does anyone know if this feature is planned for any future versions of iCal?

    Hi,
    This is not possible in iCal. The nearest thing would be to create two events, one for take off and one for landing.
    Also, this is a user to user forum. By posting here you are not guaranteed someone from Apple will read it. If you'd like Apple to know about your suggestion I reccommend you send them feedback.
    Best wishes
    John M

  • I am trying to use the trial creative cloud software on a PC windows 8.1 - I've downloaded and removed Photoshop CC 2014 two times - every time I open the file it says there is a problem and it shuts down and closes. I can open indesign and maybe other ap

    I am trying to use the trial creative cloud software on a PC windows 8.1 - I've downloaded and removed Photoshop CC 2014 two times - every time I open the file it says there is a problem and it shuts down and closes. I can open indesign and maybe other apps but photoshop no. Any ideas?

    I don't think I can access the crash report? Excuse the ignorant questions I'm about to make am a relative tech novice.
    Soo - as mentioned every time I open photoshop it crashes - it just says there's an error and the program will shut down and if there's a solution windows will notify me. Then nothing...
    I've tried to look in photoshop files for the detailed crash report & the system event viewer but cannot find a file with those names. I've also looked in the windows files for files with those names but cannot find them either - so I don't know where to look.
    Any guidance would be great.

  • Found iCal events in Time Machine.  Now Lion only allowing me to import one event at a time.

    Upgrade my macbook pro over the weekend to Snow Leopard and then Lion.   I lost all my the majority of my iCal events.   Went to Apple store and they said that was rare and not sure how to restore my last back up from Time Machine on an external drive.   I've been spending hours trying to go through a bunch of threads on different MAC formums.  
    So I finally found my iCal events in Time Machine.   When I try to import these events, I am only allowed to highlight/import one event at a time.   This will take me forever to import years of missing data.   I basically have been using my iCal to journal for my 3 small daughters - first tooth, hair cut, etc.   So I am desperate to get these events back so I can get them printed and SAFE.
    Does anyone have any suggestions on how to import my ics files?   The Apple Store Genius had me tryng to import the corestorage.ics files.   2 or 3 of those files showed they were trying to be imported for over 4 hours.   I finally Forced Quit iCal.   I've tried this several times and same result. 
    The corestorage files were under user/library/application support/ical/sources
    I now located the calendar events user/library/calendars/ then a bunch of coded files leading to the events.  These events appear to be the ones I am looking for as I can read some of the files.   I have several years I want to import back into my working iCal.  
    Please help if you know how!!!
    Thank you,
    Very Upset Mama of 3 little girls

    Thomas - You are awesome - THANK YOU!  
    I did exactly what you said (CAN"T believe an Apple Genius did not know this) and I think all of my events got restored.  
    However, it duplicated all of the calendars - I have 6 (one for each family member plus an extra called home that we all have to do).   Not sure if I did something wrong, but do you have any ideas?  
    Also, the time setting must be wrong b/c I have events from 2008 showing up in 2012 - same day and time as the old sessoin - just out dated.    Do I need to manually change all of this?   Should I delete the Calendars folder again and try again?  
    Also, I read some where about deleting a iCal cache file.   Do I need to do this?
    I TRULY appreciate you taking the time to help people in this forum.   I have spent hours the past two days trying to figure this out.   Plus, now I need to figure out about upgrading my Office for Mac b/c I didn't realize I lost Office 2004 when upgrading to Lion.   
    Thank you for your time and support!
    Lori

  • Only firefox executing mysql query two times. but other browser works perfect why?

    i am a web developer. and i am facing a problem only with firefox. every time i use MySQL query in my php code fire fox execute it two times. but same query is working fine on other browsers.

    Yes, the problem is seen without extensions and also in safe mode.
    But, I am starting to think that firefox is running low on memeory or CPU.
    Without extensions the possibility of failing is 1 in 3.
    I am still unable to explain why closing the browser or aborting the request can cause the stuck request to immediately reach the server.
    Is there a way to collect Firefox logs and post it here ?

  • "3.x Analyzer Server" EVENT taking more Time when Executing Query

    Hi All,
    When I am Executing the Query Through RSRT   taking more time. When I have checked the statistics
    and observed that "3.x Analyzer Server" EVENT taking more Time .
    What I have to do , How I will reduce this 3.x Analyzer Server EVENT time.
    Please Suggest me.
    Thanks,
    Kiran Manyam

    Hello,
    Chk this on query performance:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ce7fb368-0601-0010-64ba-fadc985a1f94
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4c0ab590-0201-0010-bd9a-8332d8b4f09c
    Query Performance
    Reg,
    Dhanya

  • Query performance analysis in RSRT --- event text 'Wait Time, User'  means?

    Hi All,
    I am running some queries in RSRT in 'execute + debug' mode.
    selecting 'statistics data for query' option.
    Statistics says that most of the time is taken by the event 'Wait Time, User' (event text).
    handler type is OLAP or DFLT depending on the query.
    This is taking around 90% of the query run time.
    Can any one tell me what it means ? Where is it actualy taking time?
    What does it mean by :
    Event text --> 'waiting time, User'
    Handler type DFLT
    Handler type OLAP.
    A sample record of the statistics:
    4A2Z2CFA1GLIRPIK9O2Z18GK1     4A2Z2SN22IFE3AKOL50W9DQZ5     BEX3     2     ZS233BIWDEV     11.06.2008  19:29:08          DFLT               2     1     Wait Time, User     98.467887     0     1
    Thanks in advance.
    rgds,
    Raghu.
    Edited by: Raghu tej harish reddy on Jun 11, 2008 4:19 PM

    Thank you for your immediate response.
    But i won't think it is the time taken to enter the values in the variable screen because of two reasons:
    1.There are some events starting before these events(i can say by seeing the starting time of the events)
    2.For some queries this time is around 3 minutes; and i hardly take 30 seconds to enter the variable values.
    Thanks,
    Raghu

Maybe you are looking for

  • Can't transfer music to ipod on new computer

    I just bought a new powerbook G4 and I downloaded some music from itunes. After plugging in my ipod (which shows up fine in itunes) it wont' let me transfer music to my ipod. Is there a way to transfer the music without doing the "automatic update" b

  • How many instruction keys can we declare at the vendor bank details section?

    I understand that if the vendor is being shared across company codes, the instruction key will be available to the relevant companies. If company A's instruction key is different from company B's instruction key, how do we accomodate both companies'

  • Lumia 720 update

    i am not getting nokia glance screen after amber update.why this is happening?

  • Change the background color in a button

    I want to change the background color in a button that have a text(It not have an icon). DO you know how to do it?

  • Screen layout of sales document

    hi all., Is it possible to make Screen layout of sales document (Particular field as required,optional & display) Regards., Lakshmanan