SpringLayout completely wrong

I've built several SpringLayout GUI apps over the years, but suddenly I can't get the simplest configuration to work. I must be missing something basic, but whatever it is escapes me. For my test case, I just want to have two JPanels, each of them the full width of the contentPane. The bottom one should be a fixed height (100), anchored to the bottom of the contentPane, and the top one should be anchored to the top of the contentPane for its top edge and the top of the bottom panel for its bottom edge.
My code is given below. The panels are white and gray, so you can see where they end up. Nothing is as specified. The widths are wrong, the placement is wrong, and at least the height of the top panel is wrong. Can someone pelase tell me what I'm missing?
package net.midnightjava.test;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.Spring;
import javax.swing.SpringLayout;
import javax.swing.SwingUtilities;
public class SpringLayoutTest extends JDialog{
     public static void main(String[] args){
          new SpringLayoutTest();
     public SpringLayoutTest(){
          SwingUtilities.invokeLater(new Runnable(){
               public void run(){
                    createAndShowGUI();
     private void createAndShowGUI(){
          int width = 600;
          int height =500;
          Container mainPane = getContentPane();
          SpringLayout sl = new SpringLayout();
          SpringLayout.Constraints cons;
          JPanel topPanel = new JPanel();
          topPanel.setBackground(Color.WHITE);
          JLabel topLabel = new JLabel("This is the top panel");
          topPanel.add(topLabel);
          JPanel bottomPanel = new JPanel();
          bottomPanel.setBackground(Color.GRAY);
          JLabel bottomLabel = new JLabel("This is the bottom label");
          bottomPanel.add(bottomLabel);
          mainPane.setSize(new Dimension(width, height));
          mainPane.setLayout(sl);
          mainPane.add(topPanel);
          mainPane.add(bottomPanel);
          cons = new SpringLayout.Constraints();
          cons.setY(Spring.constant(5));
          sl.putConstraint(SpringLayout.EAST, topPanel, -5, SpringLayout.EAST,
                    mainPane);
          sl.putConstraint(SpringLayout.WEST, topPanel, 5, SpringLayout.WEST,
                    mainPane);
          sl.putConstraint(SpringLayout.SOUTH, topPanel, -5, SpringLayout.NORTH,
                    bottomPanel);
          sl.addLayoutComponent(topPanel, cons);
          cons = new SpringLayout.Constraints();
          sl.putConstraint(SpringLayout.EAST, bottomPanel, -5, SpringLayout.EAST,
                    mainPane);
          sl.putConstraint(SpringLayout.WEST, bottomPanel, 5, SpringLayout.WEST,
                    mainPane);
          sl.putConstraint(SpringLayout.SOUTH, bottomPanel, -5, SpringLayout.SOUTH,
                    mainPane);
          cons.setHeight(Spring.constant(100));
          sl.addLayoutComponent(bottomPanel, cons);
          setSize(new Dimension(width, height));
          setLocationRelativeTo(null);
          setVisible(true);
}

You mentioned the brittleness of my constructor, but I think you forgot to apply your solution.Huh? The code I posted doesn't even have an explicit constructor. From main, construction is completed before createAndShowGUI is called. And setVisible is in createAndShowGUI.
About order of sequencing setConstraints calls, I really don't know, but logically it shouldn't be a criterion. Before today, I hadn't even taken a look at the SpringLayout API. I'm not a developer, just a hobby programmer, and dive into questions that interest me. Yours did.
As far as your layout is concerned, I would rather handle it by setting the sizes of the bottom panel, but that's just me. Also, since the class doesn't add any functionality to JDialog, I would use aggregation rather than inheritance, and that's not just me, it's acceptedly better, as the class can then expose only required functionality and not unnecessarily expose the complexity of a JDialog.import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SpringLayout;
import javax.swing.SwingUtilities;
public class SpringLayoutTest2 {
   JDialog dialog;
   private void createAndShowGUI(){
      int width = 600;
      int height =500;
      JPanel topPanel = new JPanel();
      topPanel.setBackground(Color.WHITE);
      JLabel topLabel = new JLabel("This is the top panel");
      topPanel.add(topLabel);
      System.out.println(topPanel.getPreferredSize());
      JPanel bottomPanel = new JPanel();
      bottomPanel.setBackground(Color.GRAY);
      // freeze the height
      Dimension size = new Dimension(Integer.MAX_VALUE, 100);
      bottomPanel.setMaximumSize(size);
      bottomPanel.setPreferredSize(size);
      bottomPanel.setMinimumSize(size);
      JLabel bottomLabel = new JLabel("This is the bottom label");
      bottomPanel.add(bottomLabel);
      dialog = new JDialog();
      Container contentPane = dialog.getContentPane();
      SpringLayout layout = new SpringLayout();
      contentPane.setLayout(layout);
      contentPane.add(topPanel);
      contentPane.add(bottomPanel);
      // layout for topPanel
      layout.putConstraint(SpringLayout.WEST, topPanel,
            5, SpringLayout.WEST, contentPane);
      layout.putConstraint(SpringLayout.NORTH, topPanel,
            5, SpringLayout.NORTH, contentPane);
      layout.putConstraint(SpringLayout.EAST, contentPane,
            5, SpringLayout.EAST, topPanel);
      // layout for bottomPanel
      layout.putConstraint(SpringLayout.WEST, bottomPanel,
            0, SpringLayout.WEST, topPanel);
      layout.putConstraint(SpringLayout.NORTH, bottomPanel,
            5, SpringLayout.SOUTH, topPanel);
      layout.putConstraint(SpringLayout.EAST, topPanel,
            0, SpringLayout.EAST, bottomPanel);
      layout.putConstraint(SpringLayout.SOUTH, contentPane,
            5, SpringLayout.SOUTH, bottomPanel);
      dialog.setSize(new Dimension(width, height));
      dialog.setLocationRelativeTo(null);
      dialog.setModal(true);
      dialog.setVisible(true);
      System.exit(0);
   public static void main(String[] args){
      SwingUtilities.invokeLater(new Runnable() {
         public void run() {
            new SpringLayoutTest2().createAndShowGUI();
}db

Similar Messages

  • Exporting sequence from Premiere CC to Audition CC opens completely wrong clips in multitrack

    I export my sequence from PP and Audition opens 100% incorrect video and audio!  Nothing is the right clip, totally wrong files are being opened.  I have no clue at all what is going on.  Can anyone help?
    Footage is DV PAL.  Audio is single stereo audio file (made in Audition CC) on dialogue track and single stereo music track, both 48KHz 16bit. All audio is going into Audition at 0db with no effects (ie untampered).
    I've done plenty of other mixes with the same project in different sequences with no problem at all (starting in CS6 and now working in CC - it's a feature film project with many tracks and over an hour long).  The primary feature mixdown has been done and worked beautifully last week.  Now I'm working on a trailer which is only 3 minutes long, using the rendered movie as my primary source, so it should be quite simple.
    I have had a look at the xml (of which I only have the most basic understanding) and the document clearly references completely wrong files, so I think you are right and it's a PP issue rather than Audition, which just seems to be fed crap to start with!
    My specs are:
    Mac Pro 5,1 - 6 Core 3.33GHz
    48GB RAM
    GTX 680 Mac
    OSX 10.8.5
    Adobe CC - up-to-date
    playout via Focusrite Saffire Pro 24 (FW400)
    Thanks for any help!
    Dominic
    PS
    This is a copy of a thread I started in the AUdition forum but was advised to ask here instead.

    Not a direct reply to your question but...
    I have only exported video to Audition as a reference track- preferring to use the PP timeline for the master export.  I somehow feel it's less prone to image quality loss (codec dependent!)
    To that end, I add the imported Audition mix-down either as a single or multiple stems, depending upon the project requirements,  and place them in sync in the original timeline.

  • CSS Pages show up completely wrong Contribute

    I am trying out the 30 day trial of Contribute so I can edit
    the text of my website. My web developers built the site using CSS,
    which I understand can sometimes be problematic in Contribute. The
    regular pages are fine, but any page that links to the shopping
    cart shows up in edit mode totally wrong and with no editable text
    visible. This problem occurs on all the pages that show collections
    of product, but not on the pages that relate the company info. Here
    is a link to an example page that shows up completely wrong in
    edit.
    http://www.babychaleco.com/products-boys.php
    Do you know any way to fix this?

    I am trying out the 30 day trial of Contribute so I can edit
    the text of my website. My web developers built the site using CSS,
    which I understand can sometimes be problematic in Contribute. The
    regular pages are fine, but any page that links to the shopping
    cart shows up in edit mode totally wrong and with no editable text
    visible. This problem occurs on all the pages that show collections
    of product, but not on the pages that relate the company info. Here
    is a link to an example page that shows up completely wrong in
    edit.
    http://www.babychaleco.com/products-boys.php
    Do you know any way to fix this?

  • Font Metrics, Completely Wrong Values

    So what's the deal with font metrics?
    The values it gives are completely wrong.
    For example with a monospaced font i printed out every single
    character on screen (upper, lower, 0-9, symbols).
    The font metrics were:
    ascent: 17
    descent: 5
    height: 22
    leading: 0
    Im trying to find the correct ascent. The REAL ascent is only 10.
    The font metrics value is off by 70% and it usually is off by a lot for
    all the fonts ive tried. The descent is off by 2 which isnt bad i guess.
    Anyone know how to get the ACTUAL size?
    in this picture the ascent is high but in my experience it is much higher:
    http://www.devx.com/Java/Article/7932/1954?pf=true

    The Line and Font Metric units are pixels not points.
    That applet doesnt work.
    Any attempt to use the "patch" results in:
    Exception in thread "AWT-EventQueue-2" java.lang.NoSuchMethodError: gui.PatchFontMetrics.patch(Ljava/awt/FontMetrics;)Lgui/PatchFontMetrics;
         at test.FontInfo.describeFont(FontInfo.java:56)
         at test.FontInfo.handleEvent(FontInfo.java:77)

  • ITunes Match albums view completely wrong (only on iPad)

    Hi guys!
    So for quite some time now I am having a big problem with my iTunes Match:
    The albums view is completely f*cked up!
    ALL albums I have show up under EVERY letter (meaning: To reach "B" after "A" I already scrolled through _all_ my albums)
    Wrong songs show up in wrong albums
    Number of songs per album is completely wrong
    ... and other things
    This whole thing is really annoying as I have 3k songs in my iTunes Match lib.
    Important:
    Deactivating and then Re-activating iTunes Match does NOT help.
    ONLY occurs on my iPad 4! On Mac & Win and also on my iPhone 5 it is fine.
    I didn't have this problem on iOS 6.
    On another note (just my 2 cents):
    iTunes Match altogether is _very_ buggy and I am having a lot of small problems with it! :/ (one being Step 1 takes about 30mins each time on my Windows PC)
    Can anybody help?!
    Thanks! Cheers, P

    I tried that as well!
    Didn't change anything! :/
    I also tried deleteing these files on my iPad:    
    MediaLibrary.sqllitedb
    MediaLibrary.sqllitedb-shm
    MediaLibrary.sqllitedb-wal
    Then did a hard reboot! Also no change!
    What is weird that when I swtich on 'order by artists' (or whatever this optin is called in English) the ordering of the Albums (by artists - obviously) works proplery and the right songs show up in the right albums.
    Oh gosh I hate this iTunes Match thingy. Problems all over the place since release now.

  • ICal dates completely wrong

    I just noticed that iCal's dates on my MBP are completely wrong. For example, though it correctly states that today is December 30, it says that December 30 is a Friday instead of a Wednesday. It also says that January 2010 only has 28 days and that February 2010 has 31 days, also completely wrong. What can I do to fix this?

    I have the exact same problem. If I use cmd+t to go to the current date (1/13/2010) it goes to the correct calendar but the mini calendar on the bottom left is titled "December 2009" instead of "January 2010".
    I also have serious problems with recurring events. I set all my classes for the semester to end on the last day of school, but when I check the last day of school, it seems that they all end on different dates. Also, I cannot change them either. I try to reset the end dates, but even if I change them and hit done, they still revert back to their random dates. Help!

  • Something is completely wrong with the itunes ios7

    Something is completely wrong with the itunes on my phone after I downloaded ios7. I click on a song and it doesn't play. I close itunes, reopen it, and it starts playing a different song from the album shown in the photo. What's up?

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings and disables most add-ons (extensions and themes).
    ''(If you're using an added theme, switch to the Default theme.)''
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu by clicking on the '''Restart with Add-ons Disabled...''' menu item:<br>
    [[Image:FirefoxSafeMode|width=520]]<br><br>
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.
    Thank you.

  • Scandinavian currencies are completely wrong

    I'm currently trying the trail of numbers and noticed that the currencies for the scandinavian countries are completely wrong, which is very anoying seeing as I live in Norway. Numbers lists following our currencies as NKr (Norway), DKr (Denmark) and SKr (Sweden). This isn't the international method of displaying them. It should be NOK (Norway), SEK (Sweden) and DEK (Denmark). I don't understand how apple made this mistake when these are all international methods of displaying out currency.

    Hello
    The problem is not really a Numbers one.
    In fact it's at the system level that Apple uses a wrong list of currencies acronyms.
    It seems that they don't know that there is an ISO 4217 list.
    At this time, the only thing we can do is:
    go to "Provide Numbers Feedback" in the "Numbers" menu and explain them that it would be fine if Mac OS was complying the ISO 4217 rule.
    I wish that we will be numerous to do that.
    I don't remember it but there is a link to report this kind of things not only for a specific app but for every products.
    It would be fine if some one is able to pass it here so we will be able to report also thru this way.
    Yvan KOENIG (from FRANCE samedi 3 novembre 2007 17:06:57)

  • IPhone5 on Sprint completely wrong date

    I have the iPhone5 with Sprint, and every other day or so, when I open my calendar app, the date is completely wrong (often like 6 months off), even if I click on the "today" button.  The time seems to be correct.  Unfortunately, when the date is off, several of my other apps interact with it and it changes the date in the apps as well.  For example, I have a pregnancy app, and when the calendar sets itself to today as being in Sept of 2013, it says I am way overdue on the baby.  If I change the settings to manual date and time, it fixes it for awhile, even if I switch back to automatic, but it only helps for a day or so.  I have also tried the airplane mode and restarting my phone.  I have not reset it at this point because I haven't had a chance to completely re-setup my phone.  Suggestions?  Does anyone else know if Apple knows about this issue?  I have seen a lot of stuff regarding Verizon and the iPhones, but not as much with Sprint.

    I have this same exact problem too. I have consulted the xda developers here:
    http://forum.xda-developers.com/showthread.php?t=6​10026
    so far i have recived no input yet. i really dont want to do a hard reset either. 
    EDIT: 
    Here is another website i found addressing this issue:
    http://forum.ppcgeeks.com/showthread.php?p=1455811
    there is a temporary fix on that site!  its called "Ziggy 2016 Fix.cab"
    EDIT:
    I called and talked to palm, they say that the problem has been identified, and its a issue with the windows mobile operating system so, we just have to wait for a update from either palm or microsoft. until then, we can try to use the temporary fix above.
    Message Edited by vb3 on 01-02-2010 04:32 PM
    Message Edited by vb3 on 01-02-2010 04:45 PM

  • Bug: InDesign exports completely wrong images

    Hey,
    when I export my EPUB, InDesign inserts wrong images into the HTML.
    I have a multi-artboard Illustrator file that is placed in the document. Every chapter has an image in front of it, every image is an artboard in the .ai.
    When I export to EPUB, some artboards are correctly inserted, while one repeats multiple times in a few chapters completely randomly. It has appear only once, but InDesign inserts it many times. What is happening there?
    Best regards
    Andre

    Hi,
    Are you using Articles Panel for reading order? If yes, then I think same image must be present multiple times in your article though in InDesign document it must be appearing only once. If you are not using articles panel, let me know. Will try to figure out why this problem is happening.
    Regards,
    Pooja

  • Channel Guide completely wrong for Stanley Cup Hockey

    Just wanted to report the dismal job that Fios did managing both of the Stanley Cup Game 7's that were on tonight.  I set up my DVR to record the Washington Capitals Game which was shown as being on Channel 590.  Fortunately I turned on the TV to see that 590 was actually playing some history of cold war era hockey...the game was actually on 576 which was incorrectly listed as MLS Soccer.  This is NOT the first time I have seen this happen either.   I quickly switched to record 576 instead, but that was only a short program which stopped recording in the middle of the game...because I overlooked the fact that I would have needed to record the next 9 shows to actually get the whole game.  Really?  Someone can't update the guide with 24 hours notice?
    To add insult to injury I was also trying to watch the Bruins game 7 and was recording it as well.  When I came back to watch it, the "poker" recording that was actually the Bruins game was completely missing, meaning I did not get to see any of the overtime.  I have a witness who saw this entire fiasco unfold.  
    What a horrible TV experience for two big game 7's.  
    Oh yeah, and the Fios TV rates went up $10 this month.  Certainly NOT a happy customer.  

    What area are you in? Because it was listed correctly in our area on the guide last night.
    However, when a game is being broadcast nationally - and also on the local RSN, no matter what the sport - it will show up in the guide, even if it's being blacked out. The national broadcast is subject to local blackout nearly all the time when the local RSN is broadcasting the same game. This happens frequently with the Mets and Yankees. When they are on ESPN or MLB Network in a game that isn't an exclusive national broadcast, the game will still show up on the ESPN or MLB Network guide info for every provider - FiOS, DIrectv, Comcast, etc. Even though it's blacked out locally.
    Hope that made sense. 

  • My music on iTunes has gone completely wrong. Could anyone please help me?

    Hello everyone. I'll try and keep this as unconvoluted as possible so here goes...
    I have iTunes 10.4.1.10, although the problem started with the previous update. I was trying to sync music from a Top rated playlist to a new iPhone (a 3GS with up-to-date-software) when I noticed that some of the albums which I had previously has on had disappeared. All of  my albums are saved onto an external hard drive, but the album icons were not on the music library. I put the albums back on (and a few new ones) and a message came up saying that the albums/songs were already there and would I like to replace them; I clicked the 'yes' button. I went about giving the songs I wanted in my Top Rated with no problems and went to sync them as normal. This is where it goes wrong.
    iTunes goes through the syncing motions (Steps 1 and 2), reaches Step 3 where it syncs the songs, syncs about 40 of the songs (there are 770 in total) before reaching one of the songs which I had found missing and had put on again. iTunes crashes ( I think that describes it: the 'syncing bar' at the top stays frozen on the song, it will not shut down but everntually stops trying to syns and I can shut it down again; and when I look at the iPod on my iPhone it says cancelling sync and then that it is updating the library before going back to normal).
    This was done on the first attempts, now when I try it syncs one songs before the problem song before going wrong. A thing to note about the song before is that the song that ends up on my ipod isn't the one it said that it was syncing, and the songs do not appear to be added in any sort of order.
    After this I get a message that the song that caused this cannot be found: 'Attempting to copy to the disk "Charlie's iPhone" failed. An unknown error occurred (-69).' Sometimes this is followed by a similar message which says that the song in question cannot be found.
    When I put my hard drive into the computer it says that there may be a problem with some of the files on the hard drive and would I like to scan and fix them, but it does not specify whether those files are music files (there are photo files, Word files, all sorts on it). I haven't given it permission to do so yet, this has not caused problems with previous i-Pods -Phones or Tunes and I don't exactly see how this would affect it now anyway seeing as the files have been re-done (burned off of iTunes and stored on the hard drive directly), but this may help work out the problem.
    A few last things. There is are albums which I definately have NOT put onto iTunes or my hard drive which has appeared on my iTunes music selection and I highly doubt are in the house (Bob Acri's self-titled album containing just song 3 and Fine Music, Vol. 1 by Richard Stoltzman containing the second song), they may have been added onto the computer by another family member and just innocently found their way on iTunes and my hard drive, but they're not the sort of thing anyone in my family would listen to, so maybe that might help someone diagnose the problem too.
    Also, the same thing is happening with my laptop, which has the previous update to the one I mentioned above. This would suggets that its either the new updates fault or the hard drive's fault, I would suspect it would be the former as the laptop too did not have any issues like this, or indeed at all, before the two updates.
    Anyway, thank you for taking the time for reading through, and if anyone could offer any hints or tip or advice to get iTunes back to speed I would be very grateful.
    Thank you!

    Having a similar issue.  Everytime i restart itunes its like its the first time its run and wants to look for music.   Yes, please help!

  • XSLT mapping - output completely wrong

    Hello experts,
    I need to send an idoc to the receiver party, but they want the complete content in 1 field.
    So I use a graphical message mapping to map the fields and an XSL mapping to put the idoc structure into a specific field in the output structure.
    Also, in my operation mapping, both entries are indicated.
    My target structure should look like this:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <USM>
      <USMTYPE>ZBEPA_SCX_07</USMTYPE>
      <USMVERSION>ZBEPA_SCX_07</USMVERSION>
      <RUNOPTION>LS</RUNOPTION>
    - <MESSAGE>
    - <METADATAS>
    - <METADATA>
      <KEY>KEY</KEY>
      <VALUE>VALUE</VALUE>
      </METADATA>
      </METADATAS>
    - <ADDRESSES>
    - <ADDRESS>
      <ADDRESSTYPE>1</ADDRESSTYPE>
      <CHANNEL>2</CHANNEL>
      <ADDRESS>3</ADDRESS>
      </ADDRESS>
      </ADDRESSES>
      <SUBJECT>Onderwerp</SUBJECT>
      <TIMESTAMP>20090813113600</TIMESTAMP>
      <CONFIRMDELIVERY>True</CONFIRMDELIVERY>
    - <MESSAGECONTENT>
      <MESSAGETEXT>Tekst</MESSAGETEXT>
      <MESSAGETEXTCONTENTTYPE>Inhoud</MESSAGETEXTCONTENTTYPE>
      <MESSAGETEXTENCODING>Codering</MESSAGETEXTENCODING>
    - <FILES>
    - <FILE>
      <FILETYPE>XML</FILETYPE>
      <FILENAME>To Be Determined</FILENAME>
      <FILECONTENTTYPE>Plain</FILECONTENTTYPE>
      <FILECONTENTENCODING>NONE</FILECONTENTENCODING>
      <FILEREF>NA</FILEREF>
      <COMPRESSMETHOD>NONE</COMPRESSMETHOD>
      </FILE>
      </FILES>
      </MESSAGECONTENT>
    The MESSAGECONTENT field should content the idoc content with CDATA .... in front.
      </MESSAGE>
      </USM>
    This is my XSL mapping:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:stylesheet version="1.0" xmlns:ns0="http://www.w3.org/1999/XSL/Transform">
       <ns0:output method="xml" indent="yes" version="1.0"/>
       <ns0:template match="/">
          <USM>
             <ns0:element name="FILECONTENT">
                <ns0:text disable-output-escaping="yes">&lt;![CDATA[</ns0:text>
                <ns0:copy-of select="ZBEXX_STR_SCX_1P9005"/>
                <ns0:text disable-output-escaping="yes">]]</ns0:text>
                <ns0:text disable-output-escaping="yes">&gt;</ns0:text>
             </ns0:element>
          </USM>
       </ns0:template>
    </ns0:stylesheet>
    And this is my result XML:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <USM>
    - <FILECONTENT>
    - <![CDATA[
      ]]>
      </FILECONTENT>
      </USM>
    Please advice.
    Thanks a lot!
    Dimitri

    Aha... Let's go for XSL ... (I deleted the graphical message mapping step from the operation mapping step)
    This is my XSL mapping
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
       <xsl:output method="xml" indent="yes" version="1.0" encoding="UTF-8" cdata-section-elements="FILECONTENT"/>
       <xsl:template match="/">
          <USM xmlns="http://www.ordina.be/StructureToFieldTest">
             <USMTYPE>
                <xsl:value-of select="USMTYPE" disable-output-escaping="yes"/>
             </USMTYPE>
             <USMVERSION>
                <xsl:value-of select="USMVERSION" disable-output-escaping="yes"/>
             </USMVERSION>
             <RUNOPTION>
                <xsl:value-of select="RUNOPTION" disable-output-escaping="yes"/>
             </RUNOPTION>
             <MESSAGE>
                <METADATAS>
                   <METADATA>
                      <KEY>
                         <xsl:value-of select="MESSAGE/METADATAS/METADATA/KEY" disable-output-escaping="yes"/>
                      </KEY>
                      <VALUE>
                         <xsl:value-of select="MESSAGE/METADATAS/METADATA/VALUE" disable-output-escaping="yes"/>
                      </VALUE>
                   </METADATA>
                </METADATAS>
                <ADDRESSES>
                   <ADDRESS>
                      <ADDRESSTYPE>
                         <xsl:value-of select="MESSAGE/ADDRESSES/ADDRESS/ADDRESTYPE" disable-output-escaping="yes"/>
                      </ADDRESSTYPE>
                      <CHANNEL>
                         <xsl:value-of select="MESSAGE/ADDRESSES/ADDRESS/CHANNEL" disable-output-escaping="yes"/>
                      </CHANNEL>
                      <ADDRESS>
                         <xsl:value-of select="MESSAGE/ADDRESSES/ADDRESS/ADDRESS" disable-output-escaping="yes"/>
                      </ADDRESS>
                   </ADDRESS>
                </ADDRESSES>
                <SUBJECT>
                   <xsl:value-of select="MESSAGE/SUBJECT" disable-output-escaping="yes"/>
                </SUBJECT>
                <TIMESTAMP>
                   <xsl:value-of select="MESSAGE/TIMESTAMP" disable-output-escaping="yes"/>
                </TIMESTAMP>
                <CONFIRMDELIVERY>
                   <xsl:value-of select="MESSAGE/CONFIRMDELIVERY" disable-output-escaping="yes"/>
                </CONFIRMDELIVERY>
                <MESSAGECONTENT>
                   <MESSAGETEXT>
                      <xsl:value-of select="MESSAGE/MESSAGECONTENT/MESSAGETEXT" disable-output-escaping="yes"/>
                   </MESSAGETEXT>
                   <MESSAGETEXTCONTENTTYPE>
                      <xsl:value-of select="MESSAGE/MESSAGECONTENT/MESSAGECONTENTTYPE" disable-output-escaping="yes"/>
                   </MESSAGETEXTCONTENTTYPE>
                   <MESSAGETEXTENCODING>
                      <xsl:value-of select="MESSAGE/MESSAGECONTENT/MESSAGETEXTENCODING" disable-output-escaping="yes"/>
                   </MESSAGETEXTENCODING>
                   <FILES>
                      <FILE>
                         <FILETYPE>
                            <xsl:value-of select="MESSAGE/MESSAGECONTENT/FILES/FILE/FILETYPE" disable-output-escaping="yes"/>
                         </FILETYPE>
                         <FILENAME>
                            <xsl:value-of select="MESSAGE/MESSAGECONTENT/FILES/FILE/FILENAME" disable-output-escaping="yes"/>
                         </FILENAME>
                         <FILECONTENTTYPE>
                            <xsl:value-of select="MESSAGE/MESSAGECONTENT/FILES/FILE/FILECONTENTTYPE" disable-output-escaping="yes"/>
                         </FILECONTENTTYPE>
                         <FILECONTENTENCODING>
                            <xsl:value-of select="MESSAGE/MESSAGECONTENT/FILES/FILE/FILECONTENTENCODING" disable-output-escaping="yes"/>
                         </FILECONTENTENCODING>
                         <FILEREF>
                            <xsl:value-of select="MESSAGE/MESSAGECONTENT/FILES/FILE/FILEREF" disable-output-escaping="yes"/>
                         </FILEREF>
                         <COMPRESSMETHOD>
                            <xsl:value-of select="COMPRESSMETHOD" disable-output-escaping="yes"/>
                         </COMPRESSMETHOD>
                         <FILECONTENT>
                            <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
                            <xsl:copy-of select="*"/>
                            <xsl:text disable-output-escaping="yes">]]</xsl:text>
                            <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
                         </FILECONTENT>
                      </FILE>
                   </FILES>
                </MESSAGECONTENT>
             </MESSAGE>
          </USM>
       </xsl:template>
    </xsl:stylesheet>
    This is the result: as you can see, nothing is mapped. and the target structure is in and not the source structure
      <?xml version="1.0" encoding="UTF-8" ?>
    - <USM xmlns="http://www.ordina.be/StructureToFieldTest">
      <USMTYPE />
      <USMVERSION />
      <RUNOPTION />
    - <MESSAGE>
    - <METADATAS>
    - <METADATA>
      <KEY />
      <VALUE />
      </METADATA>
      </METADATAS>
    - <ADDRESSES>
    - <ADDRESS>
      <ADDRESSTYPE />
      <CHANNEL />
      <ADDRESS />
      </ADDRESS>
      </ADDRESSES>
      <SUBJECT />
      <TIMESTAMP />
      <CONFIRMDELIVERY />
    - <MESSAGECONTENT>
      <MESSAGETEXT />
      <MESSAGETEXTCONTENTTYPE />
      <MESSAGETEXTENCODING />
    - <FILES>
    - <FILE>
      <FILETYPE />
      <FILENAME />
      <FILECONTENTTYPE />
      <FILECONTENTENCODING />
      <FILEREF />
      <COMPRESSMETHOD />
    - <FILECONTENT>
    - <![CDATA[
    <ZBEPA_SCX_07>
    <IDOC BEGIN="1">
    <EDI_DC40 SEGMENT="1">
    <TABNAM>EDI_DC40</TABNAM>
    <MANDT>312</MANDT>
    <DOCNUM>0000000000008155</DOCNUM>
    <DOCREL>701</DOCREL>
    <STATUS>30</STATUS>
    <DIRECT>1</DIRECT>
    <OUTMOD>2</OUTMOD>
    <IDOCTYP>ZBEPA_SCX_07</IDOCTYP>
    <MESTYP>ZBEPA_SCX_07</MESTYP>
    <STDMES>ZBEPA_</STDMES>
    <SNDPOR>SAPSED</SNDPOR>
    <SNDPRT>LS</SNDPRT>
    <SNDPRN>SEDCLNT312</SNDPRN>
    <RCVPOR>SAPSXD001</RCVPOR>
    <RCVPRT>LS</RCVPRT>
    <RCVPRN>SXDCLNT001</RCVPRN>
    <CREDAT>20090831</CREDAT>
    <CRETIM>125942</CRETIM>
    <SERIAL>20090813113600</SERIAL>
    </EDI_DC40>
    <ZBEXX_STR_SCX_1P9005 SEGMENT="1">
    <FIRMA>NGA</FIRMA>
    <DEPARTMENT>01</DEPARTMENT>
    <CATEGORY>X</CATEGORY>
    <PERSON>IKKE</PERSON>
    <BEGDA>30072009</BEGDA>
    <NEXT_INCREASE_DATE>31072009</NEXT_INCREASE_DATE>
    </ZBEXX_STR_SCX_1P9005>
    </IDOC>
    </ZBEPA_SCX_07>
      ]]>
      </FILECONTENT>
      </FILE>
      </FILES>
      </MESSAGECONTENT>
      </MESSAGE>
      </USM>

  • Kyocera printer offset/margins completely wrong

    Hey there! I'm new to printing under Linux.
    I finally got CUPS to work, installed foomatic, etc. and found appropriate drivers (.ppd) for my Kyocera FS-1020D from a WinXP driver package. Everything seems to work correctly, the printer is detected under CUPS, I can see its settings too. However, when I print a document, it will overflow on the page. (as if it started printing at the bottom of the paper)
    I really can't see what I should do, I feel I'm missing something completely obvious. Do I have to somewhat calibrate or set the printer?
    Thanks in advance.

    I tried the printer on a Windows XP box. It had the same problem, therefore it comes from the printer itself. So can anyone help me out with this issue (not CUPS/Linux-related anymore) before I ditch that printer?

  • Downloaded files from Apple store are in completely wrong order

    I downloaded Bach's Goldberg variations from Apple store. It is a 30-track piece, and the order is completely garbled. Manually rearranging it is a tedious task with frequent mistakes. Any quick was to do this ??

    Thank you for the reply. I have actually done all these things. I am very specific with my tags, probably to the point of being anal about it. I'm in the habit of selecting all the songs of an album and setting the fields that should all match at the same time. This usually includes the album name, genre, album art, gapless (if applicable), and the number of tracks (the track "of" field), though not always the artist. Many of my albums are compilations, and these seem to have the problem more frequently.
    However, I do have an example of a single-artist album that this happened to, Pretty Hate Machine by Nine Inch Nails. Here's a screenshot showing how this appears in my Library:
    [IMG]http://www.pixentral.com/hosted/1hjNWXPl3ShqWiCOkMs1ysC1pYUJ0_thumb.jpg[/IM G]
    And here is a "get info" view of all the tracks on this album:
    [IMG]http://www.pixentral.com/hosted/1n9pGvMmVmD567V8qLhKw2UYwg77J51_thumb.jpg[/ IMG]
    The album that prompted the post this morning got me so frustrated that I unloaded my own MP3s from iTunes and re-ripped the discs with iTunes itself. I don't like doing this, but it seems to be the only way to make the tracks appear in order.
    I'll supply any other information you may want in relation to this problem, I'm very motivated to get this fixed.
    Thanks!

Maybe you are looking for

  • Is there a way to mirror your monitor to your tv using the apple composite cable instead to just stream your video in specific situations?

    Hello, i bought the composite video cable out for the ipad and i want to know if there is a way to mirror the ipad monitor instead to just transmit video in specific sittuations. The same to my iphone. I know that there is a way to do it in jailbreak

  • Grid + Popup

    Is it possible to open documents (.doc, .xls, .pdf etc) in a new window (popup) when selected from a flash grid. I can open the document in the same window but that then requires the user to refresh the first page when they go back to the first page.

  • Color Picker Reset

    I used to have the color picker tab in the toolbar on the right (above the adjustments and layers tabs, now I have a different color selection tool that has a color strip, with the RGB sliders above it. I want to reset it to the color picker that had

  • Newbie X11 Question

    Hi, Apologies in advance if this is in a FAQ somewhere (guidance appreciated.) I'm trying to use some X11 apps which don't seem to play nicely with the Apple X server (they work fine with Red Hat and AIX). In particular, windows are huge but about on

  • Filter base on CallerID to VM for only 1 User

    Hi CM4.0.2sr2a - Can I Filter base on CallerID to VM for only 1 User. Reason: This user gets constant sales calls from certain vendor that they recognize the callerID and don't want to answer their calls but rather have it go to VM