Problem writing XML after opening dialog

I'm using ScriptUI to create and update XML in a document (using Document.XMLElements methods).
Before opening a Window with ScriptUI, I can read and write XML without problem.
But after opening a Window containing some ScriptUI resources, I can only read the existing XML BUT NOT WRITE IT!
My writing method is called from a button event :
var myXMLRootNode = /* instanciated */
myWindow.okButton = /* instanciated */
myWindow.okButton.onClick = function() { myXMLRootNode.xmlElements.add(myTag, object) };
myWindow.show();
It looks like the onClick callback works OK for reading (I can recover all existing values without problem) but not for writing.
Any idea ?

Hey!
Well, the thing is that you have to close dialog first before writing to document.
myWindow.okButton.onClick = function(){myWindow.close(1);};
var myWin = myWindow.show();
if(myWin == true){
    myXMLRootNode.xmlElements.add(myTag, object);
Hope it helps!
tomaxxi
http://indisnip.wordpress.com/

Similar Messages

  • Problem catching events after opening system form

    Hi
    In my addon i open a system form from a user form. after closing the system form , my user form does not cause any event to be handled by my addon. in other words pressing on the forms button items does not cause any event to accure. in order for the form to work i need to close the form and reopen it from the menu. question is how can i know what is causing the form to stop responding and how can i fix it?
    appreciate the help
    Yoav

    Hi Yoav,
    It looks like when the system, form closes you remove a filter for your user form or your remove the listener for your user form.
    Regards
    Ad

  • Problem writing xml do disk ORA-29285

    I have an issue when I write larger xml files. I get ORA-29285 when i flush it to disk.
    The strange thing is that the code works when I use this code:
    xmlText clob := xml.extract('/*').getClobVal(); But It is very slow.
    instead of this:
    xmlText clob := xml.getClobVal();
    Anyone know the reason why the first statement works?
    The code I use when it works:
    procedure writeToFile (xml xmltype, filename varchar2)
    is
    fHandle utl_file.File_Type;
    xmlText clob := xml.extract('/*').getClobVal();
    /*xmlText clob := xml.getClobVal();*/
    xmlTextSize binary_integer := dbms_lob.getLength(xmlText)+1;
    offset binary_integer := 1;
    buffer varchar2(32767);
    linesize binary_integer := 32767;
    byteCount binary_integer;
    directory_name constant varchar2 (80) := 'RDFEXPORT';
    begin
    fhandle := utl_file.fopen(directory_name, filename,'w', linesize);
    while (offset < xmlTextSize) loop
    if (xmlTextSize - offset > linesize) then
    byteCount := linesize;
    else
    byteCount := xmlTextSize - offset;
    end if;
    dbms_lob.read(xmlText, byteCount, offset, buffer);
    offset := offset + byteCount;
    utl_file.put(fHandle, buffer);
    utl_file.fflush(fHandle);
    end loop;
    utl_file.new_line(fHandle);
    utl_file.fclose(fHandle);
    dbms_lob.FREETEMPORARY(xmlText);
    end writeToFile;

    Great thank you!
    So Is there a way to add a new line when you have functions like this?
    (It is rdf/xml I'm creating if someone wonders)
    function medDraSoc return xmltype is
    socXml xmltype;
    begin
    select
    xmlagg
    xmlelement
    ("isim:SOC",
    xmlattributes ('#SOC' || soc.soc_code as "rdf:about"),
    xmlforest
    soc.soc_code as "isim:termCode",
    soc.soc_costart_sym as "isim:costart",
    soc.soc_harts_code as "isim:hartsCode",
    soc.soc_icd10_code as "isim:icd10Code",
    soc.soc_icd9_code as "isim:icd9Code",
    soc.soc_icd9cm_code as "isim:icd9cmCode",
    soc.soc_jart_code as "isim:jartCode",
    soc.soc_name as "protons:mainLabel",
    soc.soc_whoart_code as "isim:whoartCode")
    ) xml
    into socXml
    from exp_meddra_soc soc;
    return socXml;
    end medDraSoc;

  • Problem writing XML content through JspWriter

    Hi,
    I am trying to send some XML content to browser. I have a perfectly generated XML, which if I write using ServletOutpurStream in a Java Servlet, works flawlessly, and I see the XML on the browser. But, if I use the same piece of code in a JSP, and write to "out", I see some junk data, without any XML tags. I did set response.contentType to "text/xml" in both the cases. I even tried the contentType attribute of "page" directive. But no luck.
    Could anybody please tell me what's wrong!!
    Thanks a lot in advance.
    Sumanta.

    It is working fine for me. I am running Tomcat 3.2.1 on NT.
    Try this small test jsp,
    <%@ page language="java" %>
    <%
    response.setContentType("text/xml");
    out.print("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
    out.print("<web-app><servlet><servlet-name>default</servlet-name>"+
                   "<servlet-class>org.apache.tomcat.servlets.DefaultServlet</servlet-class>"+
                   "</servlet></web-app>");
    %>Sudha

  • Problem writing xml file using DOM

    Hi,
    I am trying to write a xml file using DOM. I am using xalan 2.5, xerces 1.4.4, jdk 1.3.1 in JRun 3 on windows.
    The code where I get exception :
                   TransformerFactory tFactory = TransformerFactory.newInstance();
                   Transformer transformer = tFactory.newTransformer();
                   transformer.transform(new DOMSource(doc), new StreamResult("pr.xml"));
    I get the runtime error as follows:
    javax.servlet.ServletException: null
    java.lang.NoSuchMethodError
         at org.apache.xml.utils.DOM2Helper.getNamespaceOfNodeDOM2Helper.java:342)
         at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:387)
         at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:202)
         at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:343)
    Thinking it is because of classpath, I placed xalan 2.5, xerces 1.4.4 jar files in jrun admin lib directory and in server lib directory as well. Still getting the same error.
    Any suggestion?
    Thanks in advance

    xalan is included in JRun 4. However JRun 3 does not.
    However I tried with the same code in JRun3 in different system. The error is completely different. I understand this is because of different version of files. trying to solve ;)
    Here my new exception
    javax.servlet.ServletException: org/w3c/dom/ranges/DocumentRange
    java.lang.NoClassDefFoundError: org/w3c/dom/ranges/DocumentRange
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:493)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:493)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
         at org.apache.xerces.jaxp.DocumentBuilderImpl.(Unknown Source)
         at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
         at com.cybell.appl.deliveryorder.cmd.CreateXMLDOFile.createFile(CreateXMLDOFile.java:73)
         at com.cybell.appl.deliveryorder.cmd.CreateXMLDOFile.execute(CreateXMLDOFile.java:36)
         at com.cybell.appl.framework.cmd.BaseCommand.start(BaseCommand.java:50)
         at com.cybell.appl.framework.control.BaseController.service(BaseController.java:38)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
         at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1013)
         at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:925)
         at allaire.jrun.servlet.JRunNamedDispatcher.forward(../servlet/JRunNamedDispatcher.java:34)
         at allaire.jrun.servlet.Invoker.service(../servlet/Invoker.java:84)
         at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1013)
         at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:925)
         at allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDispatcher.java:88)
         at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1131)
         at allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:330)
         at allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:107)
         at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
         at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)

  • "encoding = UTF-8" missing while writing XML file using file Adapter

    Hi,
    We are facing an unique problem writing xml file using file adapter. The file is coming without the encoding part in the header of xml. An excerpt of the file that is getting generated:
    <?xml version="1.0" ?>
    <customerSet>
    <user>
    <externalID>51017</externalID>
    <userInfo>
    <employeeID>51017</employeeID>
    <employeeType>Contractor</employeeType>
    <userName/>
    <firstName>Gail</firstName>
    <lastName>Mikasa</lastName>
    <email>[email protected]</email>
    <costCenter>8506</costCenter>
    <departmentCode/>
    <departmentName>1200 Corp IT Exec 8506</departmentName>
    <businessUnit>1200</businessUnit>
    <jobTitle>HR Analyst 4</jobTitle>
    <managerID>49541</managerID>
    <division>290</division>
    <companyName>HQ-Milpitas, US</companyName>
    <workphone>
    <number/>
    </workphone>
    <mobilePhone>
    <number/>
    </customerSet>
    </user>
    So if you see the header the "encoding=UTF-8" is missing after "version-1.0".
    Do we need to configure any properties in File Adapter?? Or is it the standard way of rendering by the adapter.
    Please advice.
    Thanks in advance!!!

    System.out.println(nodeList.item(0).getFirstChild().getNodeValue());

  • SQL Server Management Studio File Open dialog is very slow to change directories

    I am running Microsoft SQL Server Management Studio    10.0.2531.0 on Windows 7 Professional.
    I have an intermittent problem with the File Open dialog. Sometimes it works reasonably well, but often it takes a very long time (a few minutes) to change directory. While it is doing whatever it is doing, the dialog and all of SSMS becomes unresponsive
    - I can't even cancel the dialog. It sometimes changes the cursor to an hourglass and sometimes not.
    I do not have this problem with any other application.
    I can open File Open one time and have this delay for every single directory change or if I open the Look In dropdown then, after closing it I can open it again and it will work with normal delays.
    It is slow more often than it is normal.
    It makes accessing files very impractical.

    Hi,
    10.0.2531.0 is SQL Server 2008 Service Pack 1 (release April 2009)
    No guarantee this will fix your issue, but may be worth testing the latest Service Pack 3 (released October 2011) to see if that helps
    http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27594

  • Can't paste into Dreamweaver CC 2014.1 after opening any browser on Windows 7 system...

    I couldn't paste anything in Design or Code view after updating to Dreamweaver CC 2014.1 this week on my Windows 7 system. I discovered that if I rebooted my computer and opened Dreamweaver without opening any browsers (have tried Chrome, Firefox, IE, Safari, and Opera), then I could paste in both Design and Code views. After I opened ANY browser, however, I could no longer paste in Dreamweaver and couldn't paste in Dreamweaver again unless I rebooted and didn't open any browsers. At first I thought it was a problem with Chrome (a common culprit) and uninstalled all of my extensions, but Chrome clearly was not the culprit this time. All five of my browsers (with tedious system reboots in-between) triggered the same inability to paste into Dreamweaver. I had not installed the update on my Windows 7 laptop yet, and I found that that still was working just fine, so I uninstalled the 2014.1 update from my desktop system and reinstalled the previous version. That eliminated the problem, but I'd sure like to be able to keep my Adobe software updated without experiencing these deal-breaking issues.

    Thanks, Preran. After uninstalling the 2014.1 update and reinstalling the previous version, I now installed the 2014.1 update again. Instead of jumping straight into restoring the preferences, I decided to test it out as-is, and it worked! No problems with pasting after opening any of my five browsers. I wonder what may have gone wrong the first time...or what was corrected during the uninstall/reinstall process. In any case, it is working again now and I am grateful. Thanks!

  • File open dialog doesn't appear after a period of time in latest version of Illustrator CC 2014

    Hi All,
    Is anyone else having a problem doing a File > Open after using Illustrator for a while? I select File > Open and nothing happens after I've used Illustrator for a while. Doesn't seem to be any pattern to it, the File Open dialog just doesn't appear so I have to shut down and re-open Illustrator.
    Thanks,
    Ben

    Hi Sumit,
    I've tried as suggested and reset preferences a few times as outlined on the help page you referenced, but I still have the same issue. If I open one file, within what seems to be a random amount of "open file" or "place" commands, the file open dialog is not invoked and I have to shut down Illustrator and re-open it. Then I can do a open or place once or twice before I'm locked out again.  Maybe a re-install of the app?
    Thanks,
    Ben

  • Problems with codepage after refreshing data from XML

    Hello,
    I've created a dashboard with XML connection.
    XML file with new data is created via macro in INPUT.xls Excel file. This INPUT.xls file was created through exporting spreadsheet from Xcelsius and then adding a macro to it, so text data should be this same codepade. Generated XML through macro have no errors and Flash file gets numeric data with no problems.
    But there is other problem with text's codepage. After reload there are some unidentified symbols in place of polish alphabet letters.
    What should I do to make it right? Is this a problem with codepage or something else?
    [Dashboard Before Refresh|http://lh4.ggpht.com/_Q8NK6X6PPLg/TGkLwo3sxZI/AAAAAAAAA_g/mkBiDdM4Gi4/s640/before_refresh.JPG]
    [Dashboard After Refresh|http://lh4.ggpht.com/_Q8NK6X6PPLg/TGkLwSx9fHI/AAAAAAAAA_c/3UeM2Gd3HvA/s640/after_refresh.JPG]
    If you have any idea hot to fix it, please let me know.
    Best regards,
    Bart Dlug

    Hello,
    I have header in my XML as follows:
    <?xml version="1.0" encoding="Windows-1250"?>
    Only then my XML file is displayed correctly in Internet Explorer preview. When I chagne it to UTF-8 I get some errors.
    [XML with windows-1250 codepage|http://lh3.ggpht.com/_Q8NK6X6PPLg/TGkUakDHjlI/AAAAAAAAA_o/lLlJFMcSaFQ/s800/codepage1250.JPG]
    [The same XML with UTF-8|http://lh5.ggpht.com/_Q8NK6X6PPLg/TGkUa8k4vyI/AAAAAAAAA_s/tdcZNqu7-i0/s800/codepage-UTF8.JPG]
    Error message means: Invalid character was found in text content. Error during processing resourcse file:///
    As I wrote before, my data is generated via macro in Excel, so I supose my data in this file has windows default codepage. Am I right?
    Do you think that I problem is XML file?
    Best regards,
    BD

  • Can some body give me an advice, my cursor can not be controlled after I shut it down, and open again. But this problem goes away after I closed and opened the lid

    Can some body give me an advice, my cursor can not be controlled (using pad) after I shut it down, and open again. But this problem goes away after I close and open the lid.

    Boot from your OS installer disk and run Repair Disk from Disk Utility.

  • Opening files with Illustrator and photoshop doesn't work, i have to drag the files from finder in to the program. This problem appears after opening 4 a 5 files.

    Opening files with Illustrator and photoshop doesn't work, i have to drag the files from finder in to the program.
    This problem appears after opening 4 a 5 files, rebooting helps another 4 a 5 times and appears again.

    I'd recommend reposting in the Boot Camp forum, that is where the Boot Camp and Windows gurus hang out.
    Good luck.

  • Acrobat and Reader XI freeze 3 secs after opening (force close needed). Win 8.1. Restart usually removes problem, sometimes repair.

    Please help.
    Running Adobe Acrobat and reader XI ( latest versions). PC is Lenovo ThinkPad 440 S. Don't think I've got any plug-ins that are affecting this, but Dragon NaturallySpeaking is installed on PC, and I know this sometimes causes problems with some programs.
    I can uninstall and reinstall either of the programs, and sometimes after a day or a week the problem returns. Restarting the computer will usually cause it to disappear for awhile and then it returns. The freeze is always the same, about three seconds after opening a document, it freezes and I have to close the program and restart the computer if I want the program to work again. I've tried switching off the security settings as suggested a number of websites, and this sometimes seems to help, but the problem nevertheless returns. I've got Acrobat on trial, and would like to buy, but I'm not going to do so and as this problem can be solved.
    I've tried installing the programs multiple times, both clean install and repair and this doesn't stop the problem from happening, and it's happened over the two latest updates to the programme with no success. Out of interest, I've also noticed it doesn't always save my preferences between opening the program (e.g. page view preferences).
    Many thanks for any input,
    Jason Anderson

    Hi Jason,
    I would recommend you to do a selected startup and then enable the programs one by one to isolate which program might be causing this.
    Please refer the KB: Restart Windows in a modified mode | Windows 7, Vista for selective startup of Windows.
    Regards,
    Anoop

  • Variable Open dialog problem!!

    Hello, I have this problem: I created a query with a filter on 0CALDAY.Il filter is a value range between a custom variable that has a default value 01.01.2007 and a variable standard 0DAT, which returns the current day.
    The problem is that when i call the variable open dialog during query execution, I see only the variable 0DAT.
    Could you help me, please!!Thank's a lot.
    Sincerely yours
    Andrea Maraviglia

    Hi,
    so you want to have a popup that filters 0CALDAY from 1.1.2007 until today. If this popup opens then these values should be preselected, right?
    To achieve this you have to write some code in the variable exit for i_step = 1. In this step variable values will be filled efore popup appears and values will be shown in the popup.
    Your custom variable seems to be defined  filled by customer exit and does not appear on the variable screen.
    Regards,
    Juergen

  • Photoshop elements 12.1: closes down right after opening the program, what can be the problem?

    Hi!
    I have just purchased Photoshop elements 12, and updated it to 12.1.
    Installation and updating went well, but now the program closes down right after opening it.
    What can be the problem?
    Thanks!

    Hi kalle-veikka,
    If an organizer is not launching then try the steps mentioned in the given link :- https://forums.adobe.com/thread/1475087
    If the issue is with editor then share the log file, locate the log path from given link :- http://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=0CDcQF jAC&url=http%3A%2F%2Fhelpx.ado…
    Sarika

Maybe you are looking for

  • Indesign CS6 Printing Issues

    Having looked at the forums and found Adobe support less than helpful I am hopping that the comunite will be able to help me out on these frustrating issues. We are having a number of issues while trying to print from InDesign CS6 to our OKI C830 pri

  • How to fix rebate accrual accounts not clearing when rebate paid?

    Automatic clearing of the rebate accrual accounts fails. The credits are created by the rebate accrual functionality. When the rebate payment is made, it should clear against the accrued items. It does not. This might be due to missing account assign

  • Problem with Global settings panels

    Using Flash player v10,1,53,64. with IE7 and Safari 5. I am trying to turn off the auto update notification as I work in an infant school and the pop-up notifications confuse the children. Flash objects are working fine and the http://www.adobe.com/s

  • Ipad keeps saying passcode is incorrect after upgrade to ios6

    Just purchased new iPad, after upgrading to ios6 it will not accept my passcode?  Any tips?

  • Configuration Element

    Dear all, In transaction SOLAR02, I was trying to setup configuration folder. My understanding is that we set this area in order to generate IMG project for satellite system (my satellite system is ECC 6). I chose Configuration Element ERP 6.0, and t