Updating Metadata with a sidecar.xml file...

... forces the app to be redownloaded again in ACV even if we have not made any modification in the articles.
Why modifying the sidecar.xml file creates this unnecessary and time consuming process ?

You use the web interface of xmlsidecar generator made by Johannes Henseler and the push the button there "generate". Copy paste that into a plain text file and then change tex extension from txt to xml. That's how you do a sidecar.xml the easy way.
Afterwards, yo've got to import "multiple files" (or "many files"... my DPS is a Spanish one) from Folio Builder.
If the folder are structured properly, folio builder will start swallowing the data of sidecar and uploading the articles.
Right now, while posting this, my pc is doing that with about one hundred articles. As happy and busy as a beaver in heat
Gustavo (Posting from Madrid)

Similar Messages

  • Update articles loaded with sidecar.xml file

    I've used a path-based sidecar.xml file to load a folio, which worked great. Now I've made fixes on the files and want to Update them, but I get an error message when I try. I also tried to "Relink" the files, which has worked in the past but now doesn't. I have alternate layouts for iPad and Retina versions, and the sidecar is set to select the Retina layout. Has the v32.1 update changed anything about this? Is there a workaround?
    Thanks, Beth

    I've used a path-based sidecar.xml file to load a folio, which worked great. Now I've made fixes on the files and want to Update them, but I get an error message when I try. I also tried to "Relink" the files, which has worked in the past but now doesn't. I have alternate layouts for iPad and Retina versions, and the sidecar is set to select the Retina layout. Has the v32.1 update changed anything about this? Is there a workaround?
    Thanks, Beth

  • [svn:bz-trunk] 15129: Update the sample jgroups-tcp. xml file with proper explanations of each property after reviewing the JGroups documentation .

    Revision: 15129
    Revision: 15129
    Author:   [email protected]
    Date:     2010-03-30 06:17:55 -0700 (Tue, 30 Mar 2010)
    Log Message:
    Update the sample jgroups-tcp.xml file with proper explanations of each property after reviewing the JGroups documentation. This is still work in progress.
    Modified Paths:
        blazeds/trunk/resources/clustering/jgroups-tcp.xml

    It seems you are asking in wrong forum. AFAIK, you are asking "how to add HTTP header to response generated by my own script". It depend on WWW server we are speaking of and language of script itself. If you will fail to found solution within documentation of the HTTP server and/or scripting language you are using, then the better place for your question is a forum related to such language and HTTP server.
    In meantime, you can try other solituin. The "Refresh: 0;..." header is required for correct function of SoftKey:Next which is displayed by default. But you can redefine the content of SoftKey area using your own key. Such configuration is part of DirectoryObject you sent to phone. See definition of SoftKey 3 in example bottom. It's not original SoftKey:Next that depend on Refresh header. It's my own custom soft-key named "Next" with exact URL defined as part of key definition (replace 'N' with number of next page). It doesn't depend on Refresh header in any way. You should consider such advice as "temporary workaround". You should discover how to send HTTP header 'Refresh'  from your script. Note, it's not possible to redefine one SoftKey only. If you wish to redefine a soft-key, then all soft-keys need's to be defined by you.
    ... followed by Title, Prompt,up to 32 ...
    Dial
    SoftKey:Dial
    1
    EditDial
    SoftKey:EditDial
    2
    Next
    https://an-url-to-your-server-and-script/test-Directory.asp?page=N
    3
    Cancel
    SoftKey:Cancel
    4
    Exit
    SoftKey:Exit
    5

  • How do I create a sidecar.xml file?

    Hello- I have used Johannes' very rad sidecar generator and adobe's instructions on how to upload the file, but can't seem to get it to work. I have a feeling it's because they both start with an assumption:
    "Use a text editor or an XML editor to create a sidecar.xml file..."
    "Write the lines into a sidecar.xml file"
    How do I create the original sidecar.xml file, in which to paste the metadata generated by Johannes' tool?
    http://projects.nordsueddesign.de/sidecarxml/#
    http://help.adobe.com/en_US/digitalpubsuite/using/WS67cb9e293e2f1f60606c7754128c7a9c00e-7f ff.html

    You use the web interface of xmlsidecar generator made by Johannes Henseler and the push the button there "generate". Copy paste that into a plain text file and then change tex extension from txt to xml. That's how you do a sidecar.xml the easy way.
    Afterwards, yo've got to import "multiple files" (or "many files"... my DPS is a Spanish one) from Folio Builder.
    If the folder are structured properly, folio builder will start swallowing the data of sidecar and uploading the articles.
    Right now, while posting this, my pc is doing that with about one hundred articles. As happy and busy as a beaver in heat
    Gustavo (Posting from Madrid)

  • Basic question, how to create rtf template with a given xml file

    Hello guys
    I am new to BI publisher and I am learning how to create rtf templates using given xml fiel definitions by following the bi publisher guide
    The steps I am following is:
    1, create template using template builders, which is downloaded into MS words.
    2, In the empty template, map the xml columns with template field using BI publisher tag
    3, upload the template to BI Publisher as a layout.
    That's all I can understand.
    My question is:
    1,in which above step do I import XML file into template builder (if not bi publisher), how to do so?
    2,After template is created, how to associate this template layout with existing reports in BI Publisher, or is it necessary at all?
    3,In the template content in MS Word template builder, what should I enter other than BI publisher tags for mapping XML field to desired template field
    Or, if my understand of this process is entirely wrong, what's the right process of creating rtf template with a given XML file definition
    Thanks

    If you have a BI Publisher desktop installed, have a look a the demos,.. should answer most of your basic questions.
    (Windows) Start->Programs->Oracle BI Publisher Desktop->Demos
    Invoice Demo - good one for those with E-Business Suite
    Report Demo - Sample using BI Publisher

  • Anybody know what's up with the menu.xml.files not being available for DW after installing on a new comp?

    Anybody know what's up with the menu.xml.files not being available for DW after installing on a new comp?

    Usually that error can be cleared up by renaming the personal config folder. Turn on your OS's hidden files and then go to...
    C: > Users > your username > AppData > Roaming > Dreamweaver (version) > your language > configuration
    Rename the configuration folder configuration-old and start DW up. That should create an entirely new configuration folder and correct the menu.xml file.

  • Problem with parsing large XML files chunked over HTTP

    I'm trying to isolate a bug that was introduced when upgrading the JRE in use from Java 7u51 to 7u71 without changing any code. The problem appears to be very similar to: Bug ID: JDK-8027359 XML parser returns incorrect parsing results.
    Further investigation showed that it was also introduced in the same versions (7u71) where that fix was applied. Unlike that bug though, my XML is marked as version 1.0. It also appears to be with only large XML files, on the order of 10MB or so.
    The closest I've been able to narrow it down to is the code is using JAXB to unmarshall a stream that the debugger tells me is a org.apache.http.com.EofSensorInputStream / org.apache.http.impl.io.ChunkedInputStream. The exception I get is not consistent, but typically appears to be from chunks being overwritten or shuffled, resulting in letters appearing in attributes that are actually numbers, or like the following where an attribute "testAttribute" gets partially overwritten by the end of a timestamp that was in a different section of the XML.
    javax.xml.bind.UnmarshalException
    - with linked exception:
    [javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,98748]
    Message: Attribute name "testAttribu00Z" associated with an element type "testElement" must be followed by the ' = ' character.]
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:421)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:357)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:334)
    Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,98748]
    Message: Attribute name "testAttribu00Z" associated with an element type "testElement" must be followed by the ' = ' character.
      at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:598)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:181)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:355)
      ... 6 more
    Here's some code that seems to reproduce it if you can connect to an XML server that returns a large chunked XML file:
      SchemeRegistry registry = new SchemeRegistry();
      registry.register(
                    new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
      HttpClient client = new DefaultHttpClient(new BasicClientConnectionManager(registry));
      String url = "http://someUrlReturningAlargeChunkedXML";
      HttpGet method = new HttpGet(url);
      HttpResponse response = client.execute(method);
      InputStream inputStream = response.getEntity().getContent();
      XMLStreamReader responseReader = factory.createXMLStreamReader(inputStream);
      JAXBElement<JaxBObjectOfResponse> wot = unmarshaller.unmarshal(responseReader, JaxBObjectOfResponse.class);
    If you connect using URL.openStream() to the same service there is no error. If I read bytes directly and write to a file, there is no error. The error only happens when I try to unmarshal it, and it's large, and I'm using Java 7u71 (or later). It can be consistently repeated with the jsp webapp that I'm using, but didn't show the error when I used the same code with a Wikipedia dump XML file.
    How can I unmarshal in a different way to avoid this problem? Or, how can I better isolate the bug so it can be posted to the appropriate bug system?

    Apparently, adding the Woodstox XML libraries avoids the bug. Is there anyone who can reproduce this on another system? Was there any changes to the Stax implementation between u67 and u71 that may have introduced a bug like this?
    Edit: When setting the logging level to DEBUG, I once saw the overwritten buffer being logged as if that was what was received (as in the testAttribu00Z example above). I can't repeat that anymore though, and very rarely it does parses with no exception (though it may have still been corrupted). Now the error seems to be consistently on one of the buffer boundaries, as in:
    17:08:09,705 DEBUG wire:63 - << "2000[\r][\n]"
    17:08:09,705 DEBUG wire:77 - << "trend>....OTHER XML...<trend hours=""
    17:08:09,705 DEBUG wire:77 - << "634.0972777777778" datetime="2013-05-21T00:43:48.350Z" t"
    17:08:09,705 DEBUG wire:63 - << "[\r][\n]"
    17:08:09,705 DEBUG wire:63 - << "2000[\r][\n]"
    17:08:09,705 DEBUG wire:77 - << "rend-mode="0">
    Exception in thread "main" java.lang.NumberFormatException: t34.0972777777778
      at com.sun.xml.internal.bind.DatatypeConverterImpl._parseDouble(DatatypeConverterImpl.java:213)
      at mypackage.Trend_JaxbXducedAccessor_hours.parse(TransducedAccessor_field_Double.java:48)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StructureLoader.startElement(StructureLoader.java:194)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:486)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:465)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:60)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:231)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:165)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:355)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:334)
    Or:
    17:19:12,563 DEBUG wire:63 - << "2000[\r][\n]"
    17:19:12,563 DEBUG wire:77 - << ...OTHER XML...<trend index="5"
    17:19:12,563 DEBUG wire:77 - << "" label="N"
    17:19:12,563 DEBUG wire:63 - << "[\r][\n]"
    Exception in thread "main" java.lang.NumberFormatException: Not a number: N
      at com.sun.xml.internal.bind.DatatypeConverterImpl._parseInt(DatatypeConverterImpl.java:106)
      at com.sun.xml.internal.bind.DatatypeConverterImpl._parseShort(DatatypeConverterImpl.java:118)

  • Using Java, How can I Update, Add, Delete nodes in XML Files.

    Hi,
    I want to store the student record (like Name, Age, school name, total mark etc.,) as nodes in the XMLfile. Also I should able to Update, Add, Delete any nodes (student record) in the XML file. How can I achieve this...using Java
    I am able to read the content of the xml file using xml-parser. But my problem is
    updating the xml file.
    pls suggest some solutions or links with " example source code"
    Thanks :-)

    There are 2 kinds of XML parsers : SAX and DOM. DOM seems to suit your need. You can use JAXP APIs to add, delete or change nodes or attributes.
    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/TOC.html provides contents that would satisfy most of the needs.
    To save a DOM modified XML file use java IO APIs to write to the same file from which it was read using a Document object ( doc.getNodeValue() ).

  • How to update Elements value inside existing xml file

    Hi Gurus,
    Am somehow new to java and working on xml with java, i have a scenario where i want to update the elements of my existing xml file, i know its possible as i have posted one code on this forum which updates the values of the arrtibutes of existing xml file. Ref :
    http://forum.java.sun.com/thread.jsp?forum=34&thread=186091&start=15&range=15&hilite=false&q=
    But am not able to use the same code to update the vlaues of the attribute.
    if i have this xml file :
    <?xml version="1.0"?>
    <RootElement>
    <Transaction>
    <Task9>
    <TaskID>Task9</TaskID>
    <Description>My Test Case</Description>
    <Time>12/12/2004</Time>
    </Task9>
    </Transaction>
    <Transaction>
    <Task2>
    <TaskID>Task2</TaskID>
    <Description>Testing my xml</Description>
    <Time>12/12/2004</Time>
    </Task2>
    </Transaction>
    </RootElemen>
    Now i want to update teh </Description> and </Time> field using the code that i have given above in the link.
    If any one can help me ill really appreciate.

    The value of an element is stored in a child node of that element. For example, let's say that "e" references the node <Description> then:
    e.getFirstChild().getNodeValue() => "My Test Case"

  • Updating EXIF date/time in XML files (Bridge CS4)

    Is there a way to re-read the EXIF date/time information from RAW camera files and update that existing information in the XML files?

    To my knowledge not with Bridge, maybe with a script.
    Basically the problem occurs while using multiple camera's that have not all the same correct date and time. To my experience the quickest way is to bite the bullet once and using the filters for date time for each dslr and apply labels to each dslr, then manual select the correct sequence and rename the whole bunch with a sequence number in front of all the filenames so you can use filename to sort the correct order.
    And after this of course check next time all date and time settings before starting a new job :-)

  • So is this Possible to update already existed Receiver Flat/XML File ?

    HI ,
    On Receiver File (FTP) Side ,So is this Possible to update already existed FLAT/XML File with some values using Receiver File Adapter??
    Like I have 3 Columns in a Flat File/XML File :-
    Name,  Deptid,  Expenses.
    NameA, 8000,   -
    Currently Blank -
    NameB, 1000,  -
    Currently Blank----
    Now I want to Update Existing Flat file from Receiver File Adapter
    After Execution of scenario, Fileon FTP server would be Updated like this
    Name,  Deptid,  Expenses.
    NameA, 8000,   18000
    NameB, 1000,   25000
    So is this Possible to update already existed FLAT/XML File with some values using Receiver File Adapter?

    I am dealing with similar type of scenario..
    If that way it is not possible , So please guide me what other workarounds can be done ..........???
    Does FTP Sender Support Synch Call... ???
    regards

  • Issue with reading a xml file from xsl

    Hi,
    When I am trying to read a xml file from xsl, I am getting unwanted output.
    Following is the XSL:
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
      <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
      <mapSources>
        <source type="XSD">
          <schema location="../xsd/B2BMarketProperties.xsd"/>
          <rootElement name="ReceipentIDType" namespace="http://www.example.org"/>
        </source>
      </mapSources>
      <mapTargets>
        <target type="XSD">
          <schema location="../xsd/B2BMarketProperties.xsd"/>
          <rootElement name="ReceipentIDType" namespace="http://www.example.org"/>
        </target>
      </mapTargets>
      <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.4.0(build 110106.1932.5682) AT [TUE DEC 03 16:06:03 EST 2013]. -->
    ?>
    <xsl:stylesheet version="1.0"
                    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
                    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
                    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
                    xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
                    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns:ns0="http://www.example.org"
                    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
                    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:med="http://schemas.oracle.com/mediator/xpath"
                    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
                    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
                    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
                    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                    xmlns:ora="http://schemas.oracle.com/xpath/extension"
                    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
                    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
                    exclude-result-prefixes="xsi xsl ns0 xsd bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref ora socket ldap">
      <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
      <xsl:variable name="ReceipentID" select="document('../xsd/B2BMarketProperties.xml')"/>
      <xsl:template match="/">
        <ns0:ReceipentIDType>
        <xsl:for-each select="$ReceipentID">
          <ns0:ReceipentID>
            <xsl:value-of select="$ReceipentID"/>
          </ns0:ReceipentID>
          </xsl:for-each>
        </ns0:ReceipentIDType>
      </xsl:template>
    </xsl:stylesheet>
    Following is the XML ( B2BMarketProperties.xml)
    <?xml version="1.0" encoding="UTF-8" ?>
    <ReceipentIDType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://www.example.org B2BMarketProperties.xsd"
                     xmlns="http://www.example.org">
      <ReceipentID>123</ReceipentID>
      <ReceipentID>345</ReceipentID>
    </ReceipentIDType>
    The output i am getting with this code is
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:ReceipentIDType xmlns:ns0="http://www.example.org">
        <ns0:ReceipentID>123345</ns0:ReceipentID>
    </ns0:ReceipentIDType>
    But, I need output in the following format
    <ns0:ReceipentIDType xmlns:ns0="http://www.example.org">
        <ns0:ReceipentID>123</ns0:ReceipentID>
         <ns0:ReceipentID>345</ns0:ReceipentID>
    </ns0:ReceipentIDType>
    Could you guys let me know what i am doing wrong. Any help would be appreciated.
    Thanks,

    This worked for me :
      <xsl:template match="/">
        <ns0:ReceipentIDType>
          <xsl:for-each select="document('B2BMarketProperties.xml')/*:ReceipentIDType/*:ReceipentID">
            <xsl:variable name="count" select="position()"/>
            <ns0:ReceipentID>
              <xsl:value-of select="document('B2BMarketProperties.xml')/*:ReceipentIDType/*:ReceipentID[$count]"/>
            </ns0:ReceipentID>
          </xsl:for-each>
        </ns0:ReceipentIDType>
      </xsl:template>

  • Help with displaying my xml file in my jtext area

    Hi i am trying to read the data from my xml file and display it once the user clicks on the list all button.
    below is the source code for my program can someone please tell me some code to this.
    package tractorgui;
    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.beans.XMLEncoder;
    import java.io.BufferedReader;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.FileReader;
    import java.beans.XMLDecoder;
    import javax.swing.*;
    import javax.swing.border.LineBorder;
    //import tractor.TextInputPrompt;
    import tractor.Tractor;
    * This code was edited or generated using CloudGarden's Jigloo
    * SWT/Swing GUI Builder, which is free for non-commercial
    * use. If Jigloo isbeing used commercially (ie, by a corporation,
    * company or business for any purpose whatever) then you
    * should purchase a license for each developer using Jigloo.
    * Please visit www.cloudgarden.com for details.
    * Use of Jigloo implies acceptance of these licensing terms.
    * A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
    * THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
    * LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
    public class NewSwingApp extends javax.swing.JFrame {
    //          //Set Look & Feel
    //          try {
    //               javax.swing.UIManager.setLookAndFeel("com.jgoodies.looks.plastic.Plastic3DLookAndFeel");
    //          } catch(Exception e) {
    //               e.printStackTrace();
              private static final long serialVersionUID = 1L;
         private JButton searchmanufacturer;
         private JButton jButton3;
         private JLabel companyname;
         private JPanel labelpannel;
         private JButton listall;
         private JPanel MenuButtons;
         private JButton archivetractor;
         private JTextArea outputscreen;
         private JButton exhibittractor;
         private JButton deletetractor;
         private JButton addtractor;
         private JButton listallexbited;
         private Tractor [ ] tractors;
         private JScrollPane jScrollPane2;
         private JScrollPane jScrollPane1;
    private int numberOfTractors;
         * Auto-generated main method to display this JFrame
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        NewSwingApp inst = new NewSwingApp();
                        inst.setLocationRelativeTo(null);
                        inst.setVisible(true);
         public NewSwingApp() {
              super();
              initGUI();
         private void initGUI() {
              try {
                   BorderLayout thisLayout = new BorderLayout();
                   getContentPane().setLayout(thisLayout);
                   this.setPreferredSize(new java.awt.Dimension(750, 700));
                        labelpannel = new JPanel();
                        BorderLayout labelpannelLayout = new BorderLayout();
                        getContentPane().add(labelpannel, BorderLayout.NORTH);
                        labelpannel.setLayout(labelpannelLayout);
                        jButton3 = new JButton();
                        getContentPane().add(getExitsystem(), BorderLayout.SOUTH);
                        jButton3.setText("Exit System");
                        jButton3.setPreferredSize(new java.awt.Dimension(609, 57));
                        jButton3.setBackground(new java.awt.Color(0,255,255));
                        jButton3.setForeground(new java.awt.Color(0,0,0));
                        jButton3.setFont(new java.awt.Font("Arial",1,24));
                        jButton3.addActionListener(new ActionListener() {
                             public void actionPerformed(ActionEvent evt) {
                                            System.exit(0);
                        MenuButtons = new JPanel();
                        getContentPane().add(MenuButtons, BorderLayout.WEST);
                        GridLayout MenuButtonsLayout = new GridLayout(7, 1);
                        MenuButtonsLayout.setColumns(1);
                        MenuButtonsLayout.setRows(7);
                        MenuButtonsLayout.setHgap(5);
                        MenuButtonsLayout.setVgap(5);
                        MenuButtons.setLayout(MenuButtonsLayout);
                        MenuButtons.setPreferredSize(new java.awt.Dimension(223, 267));
                             listall = new JButton();
                             MenuButtons.add(getListall());
                             listall.setText("List All");
                             listall.setBackground(new java.awt.Color(0,255,255));
                             listall.setForeground(new java.awt.Color(0,0,0));
                             listall.setBorder(new LineBorder(new java.awt.Color(0,0,0), 1, false));
                             listall.setFont(new java.awt.Font("Arial",2,14));
                             listall.addActionListener(new ActionListener() {
                                  /* (non-Javadoc)
                                  * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
                                  public void actionPerformed(ActionEvent evt) {
                                       String XMLFile = "tractor.xml-courseworkasignment/src";
                                       //** Prints the contents of my XML file
                                       try {
                                       String s;
                                       BufferedReader in = new BufferedReader( new FileReader(XMLFile)
                                       outputscreen.setText("File successfully opened");
                                       try {
                                       while ( (s=in.readLine()) !=null)
                                       outputscreen.append(s);
                                       catch(Exception e) {
                                            outputscreen.append("Error reading line: " + e.getMessage());
                                       outputscreen.append("End of Document");
                                       catch(FileNotFoundException e) {
                                            outputscreen.append("Error in opening file: " + e.getMessage());
                             listallexbited = new JButton();
                             MenuButtons.add(getListallexbited());
                             listallexbited.setText("List All Tractors On Exhibition ");
                             listallexbited.setPreferredSize(new java.awt.Dimension(157, 57));
                             listallexbited.setBackground(new java.awt.Color(0,255,255));
                             listallexbited.setForeground(new java.awt.Color(64,0,0));
                             listallexbited.addActionListener(new ActionListener() {
                                  public void actionPerformed(ActionEvent evt) {
                                       outputscreen.repaint();
                                       String XMLFile = "C:tractor.xml";
                                  // Print contents of XML file
                                  try {
                                  String s;
                                  BufferedReader in = new BufferedReader( new FileReader(XMLFile)
                                  outputscreen.setText("File successfully opened");
                                  try {
                                  while ( (s=in.readLine()) !=null)
                                  outputscreen.append(s);
                                  catch(Exception e) {
                                       outputscreen.append("Error reading line: " + e.getMessage());
                                  outputscreen.append("End of Document");
                                  catch(FileNotFoundException e) {
                                       outputscreen.append("Error in opening file: " + e.getMessage());
                             addtractor = new JButton();
                             MenuButtons.add(getAddtractor());
                             addtractor.setText("Add Tractor ");
                             addtractor.setBackground(new java.awt.Color(0,255,255));
                             addtractor.setForeground(new java.awt.Color(64,0,0));
                             addtractor.addActionListener(new ActionListener() {
                                  public void actionPerformed(ActionEvent evt) {
                                       String manufacturer =JOptionPane.showInputDialog(getComponent(0), "Enter Manufacturer of Tractor");
                                       String shp = (JOptionPane.showInputDialog(getComponent(0), "Enter Horse Power of Tractor"));
                                       int hp =Integer.parseInt(shp);
                                       int sisRare =Integer.parseInt(JOptionPane.showInputDialog(getComponent(0), "Enter If the Tractor is rare (1=Yes/2=No)"));
                                       boolean isRare;
                                       if (sisRare== 1) {
                                       isRare =true;     
                                       }else
                                            isRare =false;
                                       String yom= JOptionPane.showInputDialog(getComponent(0), "Enter Year of Manufacture");
                                       int yearOfManufacture =Integer.parseInt(yom);
                                       String yis =JOptionPane.showInputDialog(getComponent(0), "Enter Number of years the Tractor has been in service");
                                       int yearsInService =Integer.parseInt(yis);
                                       String svalue = JOptionPane.showInputDialog(getComponent(0), "Enter Tractor's Value (?Pounds)");
                                       double value = Double.parseDouble(svalue);
                                       String lastWorkPlace =JOptionPane.showInputDialog(getComponent(0), "Enter Last Workplace");
                                            if(NewSwingApp.addTractor(new Tractor(manufacturer, hp, isRare, yearOfManufacture, yearsInService, value, lastWorkPlace, false)))
                                       JOptionPane.showMessageDialog((getComponent(0)), "Tractor Added");
                                       else
                                            JOptionPane.showMessageDialog(getComponent(0), "Could not Add Tractor");
                             deletetractor = new JButton();
                             MenuButtons.add(getDeletetractor());
                             deletetractor.setText("Delete Tractor ");
                             deletetractor.setBackground(new java.awt.Color(0,255,255));
                             deletetractor.setForeground(new java.awt.Color(64,0,0));
                             deletetractor.addActionListener(new ActionListener() {
                                  public void actionPerformed(ActionEvent evt) {
                                       System.out.println("deletetractor.actionPerformed, event="+evt);
                                       JOptionPane.showInputDialog(getComponent(0), "Enter Tractor ID");
                             exhibittractor = new JButton();
                             MenuButtons.add(getExhibittractor());
                             exhibittractor.setText("Exhibit Tractor");
                             exhibittractor.setBackground(new java.awt.Color(0,255,255));
                             exhibittractor.setForeground(new java.awt.Color(0,0,0));
                             exhibittractor.addActionListener(new ActionListener() {
                                  public void actionPerformed(ActionEvent evt) {
                                       System.out.println("exhibittractor.actionPerformed, event="+evt);
                                       JOptionPane.showInputDialog(getComponent(0), "Enter Tractor I.D");
                             archivetractor = new JButton();
                             MenuButtons.add(getArchivetractor());
                             archivetractor.setText("Archive Tractor");
                             archivetractor.setBackground(new java.awt.Color(0,255,255));
                             archivetractor.setForeground(new java.awt.Color(0,0,0));
                             archivetractor.addActionListener(new ActionListener() {
                                  public void actionPerformed(ActionEvent evt) {
                                       System.out.println("archivetractor.actionPerformed, event="+evt);
                                       JOptionPane.showInputDialog(getComponent(0), "Enter Tractor I.D");
                             searchmanufacturer = new JButton();
                             MenuButtons.add(searchmanufacturer);
                             searchmanufacturer.setText("Search Manufacturer");
                             searchmanufacturer.setPreferredSize(new java.awt.Dimension(159, 21));
                             searchmanufacturer.setBackground(new java.awt.Color(0,255,255));
                             searchmanufacturer.setForeground(new java.awt.Color(64,0,0));
                             searchmanufacturer.addActionListener(new ActionListener() {
                                  public void actionPerformed(ActionEvent evt) {
                                       System.out.println("searchmanufacturer.actionPerformed, event="+evt);
                                       JOptionPane.showInputDialog(getComponent(0), "Enter Manufacturer Name");
                        outputscreen = new JTextArea();
                        getContentPane().add(outputscreen, BorderLayout.CENTER);
                        outputscreen
                                  .setText("");
                        outputscreen.setBorder(BorderFactory.createTitledBorder(""));
                        outputscreen.setWrapStyleWord(true);
                        outputscreen.setEditable(false);
                        outputscreen.setEnabled(true);
                        outputscreen.setBackground(new java.awt.Color(255, 255, 255));
                        outputscreen.setForeground(new java.awt.Color(64, 0, 0));
                        companyname = new JLabel();
                        getContentPane().add(companyname, BorderLayout.NORTH);
                        companyname.setText(" Wolvesville Tractor Museum");
                        companyname.setPreferredSize(new java.awt.Dimension(609, 85));
                        companyname.setBackground(new java.awt.Color(255,255,0));
                        companyname.setFont(new java.awt.Font("Arial",1,28));
                        companyname.setForeground(new java.awt.Color(0,0,0));
                        companyname.setBorder(BorderFactory.createTitledBorder(""));
                        companyname.setOpaque(true);
                   this.setSize(750, 750);
              } catch (Exception e) {
                   e.printStackTrace();
         protected static boolean addTractor(Tractor tractor) {
                   if (tractor.getManufacturer()==null) return false; else
                   if (tractor.getHp()<50||tractor.getHp()>1100) return false; else
                   if (tractor.getIsRare()==false) return false; else
                   if (tractor.getYearsInService()<1||tractor.getYearsInService()>200) return false; else
                   if (tractor.getYearOfManufacture()<1800||tractor.getYearOfManufacture()>2008) return false; else
                   if (tractor.getValue()<100||tractor.getValue()>1500) return false; else
                   if (tractor.getLastWorkPlace()==null) return false; else
              return true;
         public JPanel getMenuButtons() {
              return MenuButtons;
         public JButton getListall() {
              return listall;
         public JLabel getCompanyname() {
              return companyname;
         public JButton getExitsystem() {
              return jButton3;
         public JButton getSearchmanufacturer() {
              return searchmanufacturer;
         public JButton getListallexbited() {
              return listallexbited;
         public JButton getAddtractor() {
              return addtractor;
         public JButton getDeletetractor() {
              return deletetractor;
         public JButton getExhibittractor() {
              return exhibittractor;
         public JButton getArchivetractor() {
              return archivetractor;
         public JTextArea getOutputscreenx() {
              return outputscreen;
    public void savetractors () {
         try {
              XMLEncoder encoder = new XMLEncoder(new FileOutputStream("tractor.xml"));
              encoder.writeObject(tractors);
              encoder.close();
         } catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
    public void loadtractors () {
    try {
              XMLDecoder decoder = new XMLDecoder(new FileInputStream("tractor.xml"));
              tractors = (Tractor[]) decoder.readObject();
              decoder.close();
              for (int i=0; i<tractors.length;i++) {
                   if (tractors!=null)numberOfTractors =i;
              numberOfTractors++;
         } catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              tractors=new Tractor[25];
              numberOfTractors=0;

    here's an example:
    http://jdj.sys-con.com/read/37550.htm
    you need to have a class Tractor with all those properties and then use readObject.Somehow you need to tell the Encoder/Decoder what Tractor means..
    hope this helps!!

  • Issue with faces-config.xml file

    Hi,
    I'm working on a project which needs more no. of JSF Pages and JSF Navigations,
    But when i trying to creat pages more than 25 pages,the process becoming too slow,does this
    effects the Application performance?Can any one suggest me why it happens and what are the
    limitations for creating the JSF pages.
    Does their any alternative to solve this Issue,I'm thing to create more faces-config.xml files as the
    Jsf pages increases,does this solves?
    Please suggest me.
    Thank you,
    Bandaru,

    Hi Bandaru,
    Are you trying to use the visual diagram option of faces-config? Coz i encountered difficulties when using it with many pages (more than 40) and the faces-config.oxd_faces was no longer able to support the diagram. "Solution" was to use only the overview and the sources of the faces-config. I don't know exactly but my problems were caused by the faces-config.oxd_faces and i don't think it affects performances for the application.
    For information, that was on a Jdev 10.1.3.0.4
    Regards,
    Tif

  • Prepopulating PDF Fillable Forms with data from XML files

    How can I get a PDF fillable form to open pre-populated with data from an XML file automatically? I've been using Adobe Standard 9.0 and am willing to upgrade in a modest fashion if necessary. I am aware of the Navigation method > Forms > Manage Form Data > Import Data. This works fine, however, my users are not smart enough to do tis much clicking and selecting. Is there an automated way to have this XML data merged into the PDF file on the fly. These files will reside on an internal local area network and will be operated on local PC's that will probably have Acrobat Reader ONLY. I have been told that the only way to accomplish this is through Java Scripting. I would prefer to do this the 'old fashioned' way of command line switches, but that does not appear to be an option. Does anyone have a sample Javascript that would accomplish what I am trying to achieve. Any help would be greatly appreciated.

    Hi Sharon
    The easiest way is:
    - Open your PDF form within Acrobat
    - From the File menu, import the XML form data into the form
    - From the File menu, use Save As... to save the file with a new name.
    The new PDF will be identical to the original one, but will have the data embedded in it. Voila.
    If you want the same form to pre-populate with different XML files depending on the circumstances, or if you're generating the XML on the fly, then things get more complicated. (And more expensive.) As your consultant said, LiveCycle Forms is one option, but it is expensive (actually even more than 10K). There are other options, including Cold Fusion, custom servlets, etc.
    Howard
    http://www.avoka.com

Maybe you are looking for