LC handing in Imports

Hi Friends
How the LC handled in Imports in MM process. What are all the settings are ther for the same in MM. Please expleing
Rgds
Madhavan

Hi,
Generally in case of Imports, landing charges should not be created as a separate condition type since it is just for calculation purpose of the Import Duties.
Just add a Condition type as Assessable Value in Import Pricing by taking a copy of RA01 as ZASS and mark it as "Statistical". This should be calculated on the CIF Base Price of Import.
For e.g.
If CIF Base Price = 1000 USD
Assessable value = 101% = 1010 USD (If landing charges is 1%)
And then Import duties will get calculated on this.

Similar Messages

  • Importing problem with coolpix s610

    does anyone know why i cant import using some digital camers? i have a nikon coolpix s610, and sony cybershot dsc-t30

    does anyone know why i cant import using some digital camers? i have a nikon coolpix s610, and sony cybershot dsc-t30
    Not all movie clips are created the same since there are many possible compression formats. iMovie '08 will only import files it can edit. iMovie HD, on the other hand, will import any movie for which it can convert the video data (with or without audio). You CyberShot, for instance, stores its files as MPEG VX (multiplexed MPEG-1) files. These files are "playback" only as far as QT is concerned. iMovie '08 will not import them at all unless converted and iMovie HD will only import the video content unless the file is converted to a QT compatible compression format to retain the audio. The Nikon S610 stores its video clips in an AVI container. This container is generic in that many different audio and video compression format combinations may be stored in it with some being iMovie '08 compatible and others not. So the basic answer to your question as to why some digital camera videos can be imported and others can't simply depends on the compression formats used by the camera in question.

  • Help with overlaying a different "skin" on a hand

    Hi,
    I've seen images such as a camera body where a different "skin" was applied, such as snake skin but all the contours, shading etc of the camera were preserved.  What I would like to do is add a latex exam glove to a hand that is already in an image (doing a surgical procedure on a fish).  The image is for teaching purposes and the gloved hand is important.  Because of the nature of the procedure and limited access to the fish, it would be a lot of trouble to recreate the image.  Could someone please point me to a tutorial or instructions that would accomplish this?  I don't know how difficult it would be to make it look realistic.  I've used photoshop for a few years, but for basic post-proccesing of digital images, not artistic changes.
    Thanks for any help or suggestions.

    Image map is what you are looking for.

  • Is it possible to use MDIS to import to hierarchy tables?

    Hello everybody!
    Tell me, please,is it possible to import records into hierarchy tables using MDIS?
    The imported XML-file looks like this:
    <data>
    <row>
      <NAME>Some Name</NAME>
      <DATA_UPD>01.27.2006</DATA_UPD>
      <HIER>03000000000\03408000000\03408553000</HIER>
    </row>
    <row>
    </row>
    </data>
    The field HIER in my XML-file contains delimited values to build hierarchy. I tried to import, but MDIS blocks the port with Value Exception.
    P.S. I set MDIS Unmapped Value Handling option to "Add" to automatically add missing values to hierarchy table.
    Thanks,
    Vika

    Hi!
    Jasbir, Dilmit, thanks for your answers!
    But while configuring mapping of fields of my XML-file to hierarchy table fields in Import Manager I found an option "Set MDIS Unmapped Value Handling" which can be set to Ignore (default), Add, Map or Fail. If I set this option to Add, it offers to "Add Target Node for Unmapped Values in MDIS Mode". So, I expect that selecting some node shows MDIS to which node it should add all new unmapped values.
    The imported XML-file structure looks like this:
    <data>
    <row>
    <NAME>Some Name</NAME>
    <DATA_UPD>01.27.2006</DATA_UPD>
    <HIER>03000000000\03408000000\03408553000</HIER>
    </row>
    <row>
    </row>
    </data>
    1. I splited HIER field into hierarchy using "Split into Hierarchy" command.
    2. Then mapped HIER<Split Hierarchy> field to CODE field of my resulting hierarchy table.
    3. Then for CODE field I set "MDIS Unmapped Value Handling" option to Add and chose the node to which add unmapped values.
    4. Then I tuned matching fields.
    5. Saved the map.
    6. Configured port (of type Automatic).
    7. Added XML-file to the port.
    The result of import (using MDIS) into hierarchy table is that the CODE field is filled with hierarchical values, but all other fields are empty. And MDIS blocks the port with Value Exception.
    So, I embarrassed by this: on the one hand, MDIS imports some values and even builds the hierarchy correctly, but from the other hand, the import doesn't  finish.
    Can anyone explain this to me?
    Thanks in advance,
    Vika

  • Sharing / Importing iMovie 8 project in iMovie 11

    I've shared an iMovie 8 project file *.rcproject with a colleague.  It is a template we duplicate over and over where we just swap out the radio show audio track.  My colleague uses iMovie 11.
    When she downloaded the *.rcproject file to her User/Movie/iMovie Projects folder it didn't show up as a project when she opened iMovie.  So, she tried to use the IMPORT feature ( file | import | import iMovie HD) but the file was greyed out.
    Is there a way to share the actual project file from 8 to 11 w/out converting it to a movie?  The project has dozens of storyboard pieces, like graphics, background music, and text overlays we'd like the ability to move around and edit, as well as exit slides that we like to swap out from time to time.  So keeping it in its original project format will be essential to streamlining this transition from me to her.
    Thanks.

    I swear I saw on this board a while back instructions on how to open an iMovie 8 project in iMovie 6.
    iMovie '08 projects are stored as a "text" file describing how the physical movie would be created from the resource files and how effects are to be applied. iMovie HD, on the other hand, only imports physical media files. You can, of course, export your iMovie '08 project to your hard drive as DV or AIC and import that file to either iMovie HD or GarageBand for audio editing (or share it to the Media Browser for audio editing in GarageBand).

  • No data from device?

    i'm working on a huge project in which i have to use many different videos, vhs, video8, dv and more. i use several devices to digitalize the analog stuff, f.e. a canopus advc 300 and a sony dcr-trv460e.
    i've done this quite often, but now i have a problem i've never had before.
    when i try to import footage from the sony dcr-trv 460e - connected via firewire -  fcpx says "no data from device". i can watch the video in the preview, i can control the handycam (start, stop, pause), but fcpx won't import the footage, not a second, when i click on "import".
    i'm able to import the footage in quicktime, even in imovie, but not in fcpx.
    what's weird is, that i tried to import videos i already imported with fcpx some time ago, it worked then, but not now, very strange.
    has apple made some changes in fcpx that make it impossible to import the old stuff? any idea how i could solve my problem?
    2nd best would be to import the footage with imovie and then import the files in fcpx.
    3rd best to import with quicktime…

    Wolfgang Matzl wrote:
    canopus works fine, as well as all other devices.
    i have tons of tapes and tried a few, none worked.
    i tried to capture on both my new imac and my mbpro, no way.
    but now i'm sure there is something wrong with the sony handycam, i tried to import with my old final cut studio, and it's not possible, also. fc pro says: waiting for timecode.
    so i'm confused now. does the sony dcr-trv not send a timecode? maybe, and this will explain the troubles. but on the other hand i imported successfully some footage with exact this device.
    maybe i used the canopus then to correct the timebase, i can't remember how i did it. but this would mean i have to accept loss of quality, since i have to connect the sony with s-vhs with the canopus and convert it.
    right now i'm importing a tape with imovie and will have a look how the result is, but as far as i remember, the audio has to be re-rendered when importing in fcpx…
    My finger is pointing to a Timecode issue.
    Is timecode enabled in the camera?
    Is it continuous on the tape?
    Al

  • Read only part of a document with Stax

    Hi,
    I have some huge documents (~5GB) and I use Stax to read them.
    My problem: I want to load only a part of the document.
    I know the location that I should put the inputStream, so I skip half of the file.
    Then I push data using xmlReader.hasNext(). After the first iteration though, I get the exception ->
    javax.xml.stream.XMLStreamException: ParseError at [row,col]:[34,4]
    Message: The markup in the document following the root element must be well-formed.
    The original xml is like that:
    <root>
    <element id=1>
    </element>
    <element id=2>
    </element>
    <element id=3>
    </element>
    </root>And I pass to the xmlStreamReader
    <element id=2>
    </element>
    <element id=3>
    </element>So, I know why I get it. Because I include in the input stream only a part.
    When it tries to read the element with id=3 , it says not well formed document.
    which on one hand is correct, but on the other hand not important for me.
    any possible solutions? How to disable the check of xmlstream reader or I don't what.
    no, I cannot wrap a part of a 5Gb file to something else...That's not the point. It will be to slow...
    That why I want to skip so much data in first place, to make it quick.
    The problem is so annoying and a little bit stupid.
    A solution would be to write my own parser, instead of using the XMLStreamReader, but then again, this is stupid, dirty, and duplicate of efforts...
    -------part of the code--------
    FileInputStream inputStream = new FileInputStream(filename);
    inputStream.skip(skipBytes);
    xmlReader = xmlif.createXMLStreamReader(filename, inputStream);
            while (xmlReader.hasNext() && parsingComplete == false) {
                xmlReader.next();
                if (xmlReader.isStartElement()) {
                    parseStartElement(xmlReader);
                    continue;
            }Thanks for the help and any opinions.
    Andreas

    Following the tip about creating a new input stream, I've create a class that extends the FileInputStream, and now it works.
    Extending just the InputStream was really slow. (remember the documents are huge "string" files)
    The code:
    XMLInputFactory xmlif = XMLInputFactory.newInstance();
    xmlif.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE);
    RootElementAppenderFileInputStream skippedInputStream = new RootElementAppenderFileInputStream(file, skipBytes);
    xmlReader = xmlif.createXMLStreamReader(file.getAbsolutePath(), skippedInputStream);
    while (xmlReader.hasNext() && parsingComplete == false) {
        xmlReader.next();
        if (xmlReader.isStartElement()) {
            parseStartElement(xmlReader);
    public class RootElementAppenderFileInputStream extends FileInputStream {
        private ByteArrayInputStream rootElemStreamStart;
        private boolean readingRoot = true;
        public RootElementAppenderFileInputStream(File file, long skipBytes) throws FileNotFoundException, IOException {
            super(file);
            this.rootElemStreamStart = new ByteArrayInputStream("<O>".getBytes());
            this.skip(skipBytes);
        public int read() throws IOException {
            if (readingRoot) {
                int result = rootElemStreamStart.read();
                if (result == -1) {
                    readingRoot = false;
                } else {
                    return result;
            return super.read();
    }

  • ITunes 12.1.0.71 broke "Keep iTunes Media folder organized" option

    After upgrading to iTunes 12.1.0.71 (64 bit) on my PC, iTunes is no longer organizing my iTunes media folder.
    Example:
    I drop a video into "automatically add to iTunes" folder
    Video appears as a Home Video in iTunes as expected
    I go into "get info" > Options for the video and set the Media Kind to "Movie"
    Video now appears in the Movie lists, however(!)
    iTunes does NOT move the file out of iTunes/Home Videos into iTunes/Movies on my hard drive like it used to
    So now I have Movies piling up in the "Home Video" folder instead of getting auto-sorted correctly. The "Keep iTunes Media folder organized" option I have enabled in preferences is, obviously, not working.
    This is happening for "TV Shows" as well. In addition, I can no longer set disc (season) and track (episode) numbers for TV Shows so that they're renamed with the season/episode numbers in front of the episode name. There used to be a work-around where I would shift-click "Get Info" to get into the old style pane / control panel, but this no longer works. I can't figure out how to rename files from within iTunes to force the issue. If I rename the files by hand before importing into iTunes, iTunes erases the disc/track numbers off the front of the filenames.
    Does anyone know what's wrong? Why are my videos not auto-sorting into the correct folder / sub-folder hierarchy on my hard drive? Why is everything piling up in my "Home Video" folder even though iTunes has been told that they are NOT home videos? Help!

    iTunes 12.0 had an issue with not moving video files around after tag/media kind changes. That seems unchanged. A workaround is to uncheck the Keep organized option, click OK, then set it active again.
    The iTunes 12.1 version of Get Info appears, at first glance, to include all of the properties that were only available in the old school get info dialog in the previous version. Also gone are the Add Field button for optionally enabled fields, and the autocomplete on space bug. The old dialog doesn't seem to be available from any keyboard combination, although I quite possibly haven't tried everything.
    tt2

  • I can capture with iMovie 6, but not with FCP 6.0 ('no data from device')

    I didn't have any problem with FCP 5, but am getting nowhere with FCP 6 using the same settings (I think). FCP seems to see the camcorder, but can't control it and, even if I manually start the camera, reports 'no data from device' when I do a 'Capture Now'. Device control isn't critical, but I'd sure like to find out why it doesn't see the data stream from the camera (Sony HDR-HC7 / FW400). I must be missing a setting some place, but sure can't find it. On the other hand, I have full device control and zero dropout capture with iMovie (exact same hardware configuration). Any ideas?

    Wolfgang Matzl wrote:
    canopus works fine, as well as all other devices.
    i have tons of tapes and tried a few, none worked.
    i tried to capture on both my new imac and my mbpro, no way.
    but now i'm sure there is something wrong with the sony handycam, i tried to import with my old final cut studio, and it's not possible, also. fc pro says: waiting for timecode.
    so i'm confused now. does the sony dcr-trv not send a timecode? maybe, and this will explain the troubles. but on the other hand i imported successfully some footage with exact this device.
    maybe i used the canopus then to correct the timebase, i can't remember how i did it. but this would mean i have to accept loss of quality, since i have to connect the sony with s-vhs with the canopus and convert it.
    right now i'm importing a tape with imovie and will have a look how the result is, but as far as i remember, the audio has to be re-rendered when importing in fcpx…
    My finger is pointing to a Timecode issue.
    Is timecode enabled in the camera?
    Is it continuous on the tape?
    Al

  • I tried "Upgrading" 10.6.8 Server to 10.8 Server. And failed.

    No question here, just a report for others to read.
    So far I have always succesfully upgraded OS X Server. I started with 10.3 server and (except the PPC to x86) I always 'upgraded' not 'migrated'. But this time, my simple server (AFP (with PHD), DNS, Firewall (ipfw), Mail with virtual domains, Web with realms) was too much for the upgrade process. Things I ran into:
    The upgrade process found out of date information (e.g. network settings that had been deleted from System Preferences) which it promoted to reality again.
    Mount points (AFP) upgraded properly
    DNS was upgraded properly. Funny thing, DNS even ran after the 10.6.8 Server had been upgraded to 10.8 Client.
    Upgrading postfix did not work. I got a strange mix of settings in /etc/postfix nd /Library/Server/Mail/Config/postfix which I was able to merge. But I never got amavisd and clamav to work. The refused to launch and I could not find the reason.
    I never got around to migrating web, Firewall, testing PHD.
    So I returned to my backup and am now back to 10.6.8 Server. Next attempt: building a clean 10.8 Server, rebuilding DNS and AFP by hand and importing Users, Groups, Machines, Machine Groups via Workspace Manager (which luckily still exists), adding Firewall (ipfw). I dread Web because I have a couple of virtual domains, webdav Realms and such.

    You might give a shout out on the OS X Server forum.

  • Display JTree in browser using JSP

    i have a program that converts xml file in to tree structure(using Swing). When i run this using eclipse then it is working. Swing is an extension of applet , right. I want to embed this in an HTML page(JSP). so that i can display the tree structure. Its gives class not foung error.
    It is not posiible to embed it. I think if it extends an Applet then it will display. But i don't know how to convert that. It gives error if i convert.
    pls help
    CODE:
    package TreeGen;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import java.io.IOException;
    import org.w3c.dom.Document;
    // Basic GUI components
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    // GUI components for right-hand side
    import javax.swing.JSplitPane;
    import javax.swing.JEditorPane;
    // GUI support classes
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowAdapter;
    // For creating borders
    import javax.swing.border.EmptyBorder;
    import javax.swing.border.BevelBorder;
    import javax.swing.border.CompoundBorder;
    // For creating a TreeModel
    import javax.swing.tree.*;
    import javax.swing.event.*;
    import java.util.*;
    public class TreeGen extends JPanel
         static Document document;
         boolean compress = false;
         static final int windowHeight = 660;
         static final int leftWidth = 300;
         static final int rightWidth = 640;
         static final int windowWidth = leftWidth + rightWidth;
         public TreeGen()
         EmptyBorder eb = new EmptyBorder(5,5,5,5);
         BevelBorder bb = new BevelBorder(BevelBorder.LOWERED);
         CompoundBorder cb = new CompoundBorder(eb,bb);
         this.setBorder(new CompoundBorder(cb,eb));
         JTree tree = new JTree(new DomToTreeModelAdapter());
         JScrollPane treeView = new JScrollPane(tree);
         treeView.setPreferredSize(
              new Dimension( leftWidth, windowHeight ));
         final
         JEditorPane htmlPane = new JEditorPane("text/html","");
         htmlPane.setEditable(true);
         JScrollPane htmlView = new JScrollPane(htmlPane);
         htmlView.setPreferredSize(
              new Dimension( rightWidth, windowHeight ));
         tree.addTreeSelectionListener(
              new TreeSelectionListener()
              public void valueChanged(TreeSelectionEvent e)
                   TreePath p = e.getNewLeadSelectionPath();
                   if (p != null)
                   AdapterNode adpNode =
                        (AdapterNode) p.getLastPathComponent();
                   htmlPane.setText(adpNode.content());
         JSplitPane splitPane =
              new JSplitPane( JSplitPane.HORIZONTAL_SPLIT,
                                  treeView,
                                  htmlView );
         splitPane.setContinuousLayout( false );
         splitPane.setDividerLocation( leftWidth );
         splitPane.setDividerSize(1);
         splitPane.setPreferredSize(
                   new Dimension( windowWidth + 10, windowHeight+10 ));
         this.setLayout(new BorderLayout());
         this.add("Center", splitPane );
         //return menuBar;
         } // constructor
         public static void main(String argv[])
              DocumentBuilderFactory factory =
                   DocumentBuilderFactory.newInstance();
              try {
              DocumentBuilder builder = factory.newDocumentBuilder();
              document = builder.parse("C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/parser1/sample.xml");
                   makeFrame();
              } catch (SAXException sxe){
                   System.out.println("ERROR");
              Exception x = sxe;
              if (sxe.getException() != null)
                   x = sxe.getException();
              x.printStackTrace();
              } catch (ParserConfigurationException pce) {
                   pce.printStackTrace();
              } catch (IOException ioe) {
              ioe.printStackTrace();
         } // main
         public static void makeFrame()
              JFrame frame = new JFrame("DOM Echo");
              frame.addWindowListener(
              new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {System.exit(0);}
              final TreeGen echoPanel =
              new TreeGen();
              frame.getContentPane().add("Center", echoPanel );
              frame.pack();
              Dimension screenSize =
              Toolkit.getDefaultToolkit().getScreenSize();
              int w = windowWidth + 10;
              int h = windowHeight + 10;
              frame.setSize(w, h);
              frame.setVisible(true);
         } // makeFrame
         static final String[] typeName = {
              "none",
              "Element",
              "Attr",
              "Text",
              "CDATA",
              "EntityRef",
              "Entity",
              "ProcInstr",
              "Comment",
              "Document",
              "DocType",
              "DocFragment",
              "Notation",
         static final int ELEMENT_TYPE = 1;
         static final int ATTR_TYPE = 2;
         static final int TEXT_TYPE = 3;
         static final int CDATA_TYPE = 4;
         static final int ENTITYREF_TYPE = 5;
         static final int ENTITY_TYPE = 6;
         static final int PROCINSTR_TYPE = 7;
         static final int COMMENT_TYPE = 8;
         static final int DOCUMENT_TYPE = 9;
         static final int DOCTYPE_TYPE = 10;
         static final int DOCFRAG_TYPE = 11;
         static final int NOTATION_TYPE = 12;
    static String[] treeElementNames = {
              "slideshow",
              "slide",
              "title", // For slideshow #1
              "slide-title", // For slideshow #10
              "item",
         boolean treeElement(String elementName) {
         for (int i=0; i<treeElementNames.length; i++) {
              //System.out.println(treeElementNames);
              if ( elementName.equals(treeElementNames[i]) )
              return true;
         return false;
         public class AdapterNode
         org.w3c.dom.Node domNode;
         public AdapterNode(org.w3c.dom.Node node)
              domNode = node;
         public String toString()
              String s = typeName[domNode.getNodeType()];
              String nodeName = domNode.getNodeName();
              if (! nodeName.startsWith("#"))
              s += ": " + nodeName;
              if (compress)
              String t = content().trim();
              int x = t.indexOf("\n");
              if (x >= 0) t = t.substring(0, x);
              s += " " + t;
              return s;
              if (domNode.getNodeValue() != null)
              if (s.startsWith("ProcInstr"))
                   s += ", ";
              else
                   s += ": ";
              // Trim the value to get rid of NL's at the front
              String t = domNode.getNodeValue().trim();
              int x = t.indexOf("\n");
              if (x >= 0) t = t.substring(0, x);
              s += t;
              return s;
         public String content()
              String s = "";
              org.w3c.dom.NodeList nodeList = domNode.getChildNodes();
              for (int i=0; i<nodeList.getLength(); i++)
              org.w3c.dom.Node node = nodeList.item(i);
              int type = node.getNodeType();
              //System.out.println(type);
              AdapterNode adpNode = new AdapterNode(node); //inefficient, but works
              if (type == ELEMENT_TYPE)
                   if ( treeElement(node.getNodeName()) ) continue;
                   s += "<" + node.getNodeName() + ">";
                   s += adpNode.content();
                   s += "</" + node.getNodeName() + ">";
              else if (type == TEXT_TYPE)
                   s += node.getNodeValue();
              else if (type == ENTITYREF_TYPE)
                   s += adpNode.content();
              else if (type == CDATA_TYPE)
                   StringBuffer sb = new StringBuffer( node.getNodeValue() );
                   for (int j=0; j<sb.length(); j++)
                   if (sb.charAt(j) == '<')
                        sb.setCharAt(j, '&');
                        sb.insert(j+1, "lt;");
                        j += 3;
                   else if (sb.charAt(j) == '&')
                        sb.setCharAt(j, '&');
                        sb.insert(j+1, "amp;");
                        j += 4;
                   s += "<pre>" + sb + "\n</pre>";
              return s;
         public int index(AdapterNode child)
              int count = childCount();
              for (int i=0; i<count; i++)
              AdapterNode n = this.child(i);
              if (child.domNode == n.domNode) return i;
              return -1; // Should never get here.
         public AdapterNode child(int searchIndex)
              org.w3c.dom.Node node =
                   domNode.getChildNodes().item(searchIndex);
              if (compress)
              int elementNodeIndex = 0;
              for (int i=0; i<domNode.getChildNodes().getLength(); i++)
                   node = domNode.getChildNodes().item(i);
                   if (node.getNodeType() == ELEMENT_TYPE
                   && treeElement( node.getNodeName() )
                   && elementNodeIndex++ == searchIndex)
                   break;
              return new AdapterNode(node);
         public int childCount()
              if (!compress)
              return domNode.getChildNodes().getLength();
              int count = 0;
              for (int i=0; i<domNode.getChildNodes().getLength(); i++)
              org.w3c.dom.Node node = domNode.getChildNodes().item(i);
              if (node.getNodeType() == ELEMENT_TYPE
              && treeElement( node.getNodeName() ))
                   ++count;
              return count;
         public class DomToTreeModelAdapter
         implements javax.swing.tree.TreeModel
         public Object getRoot()
              return new AdapterNode(document);
         public boolean isLeaf(Object aNode)
              AdapterNode node = (AdapterNode) aNode;
              if (node.childCount() > 0) return false;
              return true;
         public int getChildCount(Object parent)
              AdapterNode node = (AdapterNode) parent;
              return node.childCount();
         public Object getChild(Object parent, int index)
              AdapterNode node = (AdapterNode) parent;
              return node.child(index);
         public int getIndexOfChild(Object parent, Object child)
              AdapterNode node = (AdapterNode) parent;
              return node.index((AdapterNode) child);
         public void valueForPathChanged(TreePath path, Object newValue)
         private Vector listenerList = new Vector();
         public void addTreeModelListener(TreeModelListener listener)
              if ( listener != null
              && ! listenerList.contains( listener ) )
              listenerList.addElement( listener );
         public void removeTreeModelListener(TreeModelListener listener)
              if ( listener != null )
              listenerList.removeElement( listener );
         public void fireTreeNodesChanged( TreeModelEvent e )
              Enumeration listeners = listenerList.elements();
              while ( listeners.hasMoreElements() )
              TreeModelListener listener =
                   (TreeModelListener) listeners.nextElement();
              listener.treeNodesChanged( e );
         public void fireTreeNodesInserted( TreeModelEvent e )
              Enumeration listeners = listenerList.elements();
              while ( listeners.hasMoreElements() )
              TreeModelListener listener =
                   (TreeModelListener) listeners.nextElement();
              listener.treeNodesInserted( e );
         public void fireTreeNodesRemoved( TreeModelEvent e )
              Enumeration listeners = listenerList.elements();
              while ( listeners.hasMoreElements() )
              TreeModelListener listener =
                   (TreeModelListener) listeners.nextElement();
              listener.treeNodesRemoved( e );
         public void fireTreeStructureChanged( TreeModelEvent e )
              Enumeration listeners = listenerList.elements();
              while ( listeners.hasMoreElements() )
              TreeModelListener listener =
                   (TreeModelListener) listeners.nextElement();
              listener.treeStructureChanged( e );

    I actually had to do this a few months ago. There are ways to perform this kind display using various distributed object (i.e., using MS Word OLE objects to "interpret" the byte for you, etc.). But this soon got extremely difficult to manage (and I actually had to use Perl/CGI for the majority of it).
    The solution I went with was to implement a "cache" directory on the web server. Basically, the JSP/Servlet can simply check the cache and if file not there, create it from the database. Then send a redirect back to the browser to this newly-created file. The browser will then appropriately open the document. I tested this with both Netscape and IE browsers and common MIME types such as text files, MS Office docs, zip files, PDFs, RTFs.
    Not ideal, but unfortunately the best I came up with.

  • Display tree in applet

    i have a program to convert Xml to tree structure. But i am not able to call it in JSP. So i want to convert to applet. how to convert it.
    package TreeGen;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import java.io.File;
    import java.io.IOException;
    import org.w3c.dom.Document;
    import org.w3c.dom.DOMException;
    import org.w3c.dom.Element;
    // Basic GUI components
    import javax.swing.JApplet;
    import javax.swing.JFrame;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    // GUI components for right-hand side
    import javax.swing.JSplitPane;
    import javax.swing.JEditorPane;
    // GUI support classes
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.event.KeyEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowAdapter;
    // For creating borders
    import javax.swing.border.EmptyBorder;
    import javax.swing.border.BevelBorder;
    import javax.swing.border.CompoundBorder;
    // For creating a TreeModel
    import javax.swing.tree.*;
    import javax.swing.event.*;
    import java.util.*;
    import java.applet.*;
    public class TreeGen extends JPanel
         static Document document;
         boolean compress = false;
         static final int windowHeight = 660;
         static final int leftWidth = 300;
         static final int rightWidth = 640;
         static final int windowWidth = leftWidth + rightWidth;
         public TreeGen()
         EmptyBorder eb = new EmptyBorder(5,5,5,5);
         BevelBorder bb = new BevelBorder(BevelBorder.LOWERED);
         CompoundBorder cb = new CompoundBorder(eb,bb);
         this.setBorder(new CompoundBorder(cb,eb));
         JTree tree = new JTree(new DomToTreeModelAdapter());
         JScrollPane treeView = new JScrollPane(tree);
         treeView.setPreferredSize(
              new Dimension( leftWidth, windowHeight ));
         final
         JEditorPane htmlPane = new JEditorPane("text/html","");
         htmlPane.setEditable(true);
         JScrollPane htmlView = new JScrollPane(htmlPane);
         htmlView.setPreferredSize(
              new Dimension( rightWidth, windowHeight ));
         tree.addTreeSelectionListener(
              new TreeSelectionListener()
              public void valueChanged(TreeSelectionEvent e)
                   TreePath p = e.getNewLeadSelectionPath();
                   if (p != null)
                   AdapterNode adpNode =
                        (AdapterNode) p.getLastPathComponent();
                   htmlPane.setText(adpNode.content());
         JSplitPane splitPane =
              new JSplitPane( JSplitPane.HORIZONTAL_SPLIT,
                                  treeView,
                                  htmlView );
         splitPane.setContinuousLayout( false );
         splitPane.setDividerLocation( leftWidth );
         splitPane.setDividerSize(1);
         splitPane.setPreferredSize(
                   new Dimension( windowWidth + 10, windowHeight+10 ));
         this.setLayout(new BorderLayout());
         this.add("Center", splitPane );
         //return menuBar;
         } // constructor
         public static void main(String argv[])
              DocumentBuilderFactory factory =
                   DocumentBuilderFactory.newInstance();
              try {
              DocumentBuilder builder = factory.newDocumentBuilder();
              document = builder.parse("C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/parser1/sample.xml");
                   makeFrame();
              } catch (SAXException sxe){
                   System.out.println("ERROR");
              Exception x = sxe;
              if (sxe.getException() != null)
                   x = sxe.getException();
              x.printStackTrace();
              } catch (ParserConfigurationException pce) {
                   pce.printStackTrace();
              } catch (IOException ioe) {
              ioe.printStackTrace();
         } // main
         public static void makeFrame()
              //JApplet app = new JApplet();
              //app.add
              JFrame frame = new JFrame("DOM Echo");
              frame.addWindowListener(
              new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {System.exit(0);}
              final TreeGen echoPanel =
              new TreeGen();
              frame.getContentPane().add("Center", echoPanel );
              frame.pack();
              Dimension screenSize =
              Toolkit.getDefaultToolkit().getScreenSize();
              int w = windowWidth + 10;
              int h = windowHeight + 10;
              //TreeGen tg = new TreeGen();
              //MenuDemo demo = new MenuDemo();
              //frame.setJMenuBar(demo.createMenuBar());
              //frame.setContentPane(demo.createContentPane());
              //Display the window.
              frame.setSize(w, h);
              frame.setVisible(true);
         } // makeFrame
         static final String[] typeName = {
              "none",
              "Element",
              "Attr",
              "Text",
              "CDATA",
              "EntityRef",
              "Entity",
              "ProcInstr",
              "Comment",
              "Document",
              "DocType",
              "DocFragment",
              "Notation",
         static final int ELEMENT_TYPE = 1;
         static final int ATTR_TYPE = 2;
         static final int TEXT_TYPE = 3;
         static final int CDATA_TYPE = 4;
         static final int ENTITYREF_TYPE = 5;
         static final int ENTITY_TYPE = 6;
         static final int PROCINSTR_TYPE = 7;
         static final int COMMENT_TYPE = 8;
         static final int DOCUMENT_TYPE = 9;
         static final int DOCTYPE_TYPE = 10;
         static final int DOCFRAG_TYPE = 11;
         static final int NOTATION_TYPE = 12;
    static String[] treeElementNames = {
              "slideshow",
              "slide",
              "title", // For slideshow #1
              "slide-title", // For slideshow #10
              "item",
         boolean treeElement(String elementName) {
         for (int i=0; i<treeElementNames.length; i++) {
              //System.out.println(treeElementNames);
              if ( elementName.equals(treeElementNames[i]) )
              return true;
         return false;
         public class AdapterNode
         org.w3c.dom.Node domNode;
         public AdapterNode(org.w3c.dom.Node node)
              domNode = node;
         public String toString()
              String s = typeName[domNode.getNodeType()];
              String nodeName = domNode.getNodeName();
              if (! nodeName.startsWith("#"))
              s += ": " + nodeName;
              if (compress)
              String t = content().trim();
              int x = t.indexOf("\n");
              if (x >= 0) t = t.substring(0, x);
              s += " " + t;
              return s;
              if (domNode.getNodeValue() != null)
              if (s.startsWith("ProcInstr"))
                   s += ", ";
              else
                   s += ": ";
              // Trim the value to get rid of NL's at the front
              String t = domNode.getNodeValue().trim();
              int x = t.indexOf("\n");
              if (x >= 0) t = t.substring(0, x);
              s += t;
              return s;
         public String content()
              String s = "";
              org.w3c.dom.NodeList nodeList = domNode.getChildNodes();
              for (int i=0; i<nodeList.getLength(); i++)
              org.w3c.dom.Node node = nodeList.item(i);
              int type = node.getNodeType();
              //System.out.println(type);
              AdapterNode adpNode = new AdapterNode(node); //inefficient, but works
              if (type == ELEMENT_TYPE)
                   if ( treeElement(node.getNodeName()) ) continue;
                   s += "<" + node.getNodeName() + ">";
                   s += adpNode.content();
                   s += "</" + node.getNodeName() + ">";
              else if (type == TEXT_TYPE)
                   s += node.getNodeValue();
              else if (type == ENTITYREF_TYPE)
                   s += adpNode.content();
              else if (type == CDATA_TYPE)
                   StringBuffer sb = new StringBuffer( node.getNodeValue() );
                   for (int j=0; j<sb.length(); j++)
                   if (sb.charAt(j) == '<')
                        sb.setCharAt(j, '&');
                        sb.insert(j+1, "lt;");
                        j += 3;
                   else if (sb.charAt(j) == '&')
                        sb.setCharAt(j, '&');
                        sb.insert(j+1, "amp;");
                        j += 4;
                   s += "<pre>" + sb + "\n</pre>";
              return s;
         public int index(AdapterNode child)
              int count = childCount();
              for (int i=0; i<count; i++)
              AdapterNode n = this.child(i);
              if (child.domNode == n.domNode) return i;
              return -1; // Should never get here.
         public AdapterNode child(int searchIndex)
              org.w3c.dom.Node node =
                   domNode.getChildNodes().item(searchIndex);
              if (compress)
              int elementNodeIndex = 0;
              for (int i=0; i<domNode.getChildNodes().getLength(); i++)
                   node = domNode.getChildNodes().item(i);
                   if (node.getNodeType() == ELEMENT_TYPE
                   && treeElement( node.getNodeName() )
                   && elementNodeIndex++ == searchIndex)
                   break;
              return new AdapterNode(node);
         public int childCount()
              if (!compress)
              return domNode.getChildNodes().getLength();
              int count = 0;
              for (int i=0; i<domNode.getChildNodes().getLength(); i++)
              org.w3c.dom.Node node = domNode.getChildNodes().item(i);
              if (node.getNodeType() == ELEMENT_TYPE
              && treeElement( node.getNodeName() ))
                   ++count;
              return count;
         public class DomToTreeModelAdapter
         implements javax.swing.tree.TreeModel
         public Object getRoot()
              return new AdapterNode(document);
         public boolean isLeaf(Object aNode)
              AdapterNode node = (AdapterNode) aNode;
              if (node.childCount() > 0) return false;
              return true;
         public int getChildCount(Object parent)
              AdapterNode node = (AdapterNode) parent;
              return node.childCount();
         public Object getChild(Object parent, int index)
              AdapterNode node = (AdapterNode) parent;
              return node.child(index);
         public int getIndexOfChild(Object parent, Object child)
              AdapterNode node = (AdapterNode) parent;
              return node.index((AdapterNode) child);
         public void valueForPathChanged(TreePath path, Object newValue)
         private Vector listenerList = new Vector();
         public void addTreeModelListener(TreeModelListener listener)
              if ( listener != null
              && ! listenerList.contains( listener ) )
              listenerList.addElement( listener );
         public void removeTreeModelListener(TreeModelListener listener)
              if ( listener != null )
              listenerList.removeElement( listener );
         public void fireTreeNodesChanged( TreeModelEvent e )
              Enumeration listeners = listenerList.elements();
              while ( listeners.hasMoreElements() )
              TreeModelListener listener =
                   (TreeModelListener) listeners.nextElement();
              listener.treeNodesChanged( e );
         public void fireTreeNodesInserted( TreeModelEvent e )
              Enumeration listeners = listenerList.elements();
              while ( listeners.hasMoreElements() )
              TreeModelListener listener =
                   (TreeModelListener) listeners.nextElement();
              listener.treeNodesInserted( e );
         public void fireTreeNodesRemoved( TreeModelEvent e )
              Enumeration listeners = listenerList.elements();
              while ( listeners.hasMoreElements() )
              TreeModelListener listener =
                   (TreeModelListener) listeners.nextElement();
              listener.treeNodesRemoved( e );
         public void fireTreeStructureChanged( TreeModelEvent e )
              Enumeration listeners = listenerList.elements();
              while ( listeners.hasMoreElements() )
              TreeModelListener listener =
                   (TreeModelListener) listeners.nextElement();
              listener.treeStructureChanged( e );
    pls help.
    ramya

    There's already some applet code in there, although it's commented out. Did you add that?
    Anyway, the general principle for turning an app into an applet, is to replace the main() method with the Applet's (or JApplet's) init(), start(), and stop() methods. Also you won't be able to read data off the file system; use resources instead. (e.g., java.lang.Class.getResource)
    I'm not sure what this has to do with JSP.
    When you post code, please wrap it in &#91;code]&#91;/code] tags.

  • Running System Time In JFrame

    import javax.swing.*;
    import java.awt.*;
    public class SystemTime{
    public static void main(String[] args) {
    JFrame win = new JFrame("System Time");
    Container contPane = win.getContentPane();
    contPane.setBackground(Color.blue);
    BorderLayout layM = new BorderLayout();
    layM.setHgap(5);
    layM.setVgap(5);
    contPane.setLayout(layM);
    JTextArea tA = new JTextArea(10, 28);
    tA.setText(" The Current system time is:");
    JScrollPane scrollP = new JScrollPane(tA);
    scrollP.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); scrollP.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); contPane.add(scrollP, BorderLayout.CENTER);
    JLabel nLab = new JLabel("The Time is updated every 3 seconds");
    nLab.setHorizontalAlignment(JLabel.CENTER);
    nLab.setOpaque(true);
    nLab.setBackground(Color.green);
    contPane.add(nLab, BorderLayout.NORTH);
    JLabel sLab = new JLabel("Use the scrollbar to go to the latest entry");
    sLab.setHorizontalAlignment(JLabel.CENTER);
    sLab.setOpaque(true);
    sLab.setBackground(Color.green);
    contPane.add(sLab, BorderLayout.SOUTH);
    win.pack();
    win.setVisible(true);
    public class TimerTest {
    public static void main(String[] args){
    String s1;
    TimeData t1;
    for (int counter = 1; counter >= 5; counter++) {
    t1 = new TimeData(System.currentTimeMillis());
    s1 = t1.toTimeString();
    System.out.println(s1);
    if (counter != 5) Timer.pause(3);
    // You don't want to wait at the
    // end of last iteration
    public class TimeData {
    private long hours, minutes, seconds;
    public TimeData(long millis) {
    seconds = (millis/1000)%60;
    minutes = (millis/(60*1000))%60;
    hours = (millis/(60*60*1000))%24;
    public String toTimeString() {
    return (String.valueOf(hours) + ":" + String.valueOf(minutes) + ":" + String.valueOf(seconds));
    public long getHours() { return hours; }
    public long getMinutes() { return minutes; }
    public long getSeconds() { return seconds; }
    code}
    All the code compile and run OK. I am trying to put the System Time in the JFrame and run as an infiniate loop.  I manged to use the for loop. I need to have the Time In the Jframe.
    as in TimerTest application.  Timedata give the output in hours: minutes: seconds.
    Please can you assist in solving this problem.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    is there a reason for the 'long-hand' approach
    import javax.swing.*;
    import java.awt.*;
    class SystemTime{
      public static void main(String[] args){
        final java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("HH:mm:ss");
        final JFrame win = new JFrame(sdf.format(new java.util.Date()));
        win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        win.setSize(200,100);
        win.setLocationRelativeTo(null);
        win.setVisible(true);
        new javax.swing.Timer(1000,new java.awt.event.ActionListener(){
          public void actionPerformed(java.awt.event.ActionEvent ae){
            win.setTitle(sdf.format(new java.util.Date()));
        }).start();
    }

  • Creating iViews Based on Remote Portal Component iViews

    Hi,
         Does anybody know if Portal 7.0 EHP 2 supports creating a local iview for a remote transactional iview? I saw this SAP Help link, but it is not really clear on Transactional iviews.
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/f7/34fe8694c84512a2c62cc6d145736e/frameset.htm
    Thanks
    Sathish

    Hi Prasanna,
    this needs some clarifying concerning wordings:
    1.) An iView is an "instance" of a portal component. Within the Portal, you have deployed different applications, each app consists of one ore more components (and/or services, but services are faceless).
    2.) The "traditional" way to implement such a component is to do it directly via HTMLB, JSPDynPages etc. Deploy this app within the portal and then you can create an iView build directly on this component.
    3.) Alternatively, you have components at hand, which import other applications / or web stuff. The most simple for example is an URL-iView. This is an iView using a component which just retrieves the content from some URL given. A more complex example is the ApplicationIntegrator, which does the same plus passing login params etc.
    4.) One possibility is to integrate WebDynpro-Applications via a specific WebDynpro iView. The combination of this has the added value that from WebDynpro Applications you are able to use the Portal Services, so you have a far more tight integration.
    5.) With all this at hand, the rest should be self declaring: Yes, you can develop "normal" J2EE-Apps, based on "good old JSP/Servlet + EJB" technology and integrate it via URL/AppIntegrator iViews. But you can also use WebDynpro for your frontend and EJB's for your backend with the advantage of tighter integration.
    Hope it helps
    Detlev

  • How to use a Work Repository when type is set to 'Execution' ?

    Hi All,
    I was just trying my hand at importing and exporting work repositories , I need to know how we can use a certain work repository when its type is set to 'Execution'
    I want to import some packages (which are in some other Work repository ) into that Work repository but I am missing something somewhere.
    Can somebody tell me what are the exact steps to import packages or Entire Work Repository into this newly created 'Execution' type Repository ??
    Regards.

    Hi,
    An work repository which is of EXECUTION type cant be used to import packages/interfaces etc.
    You can able to import only SCENARIOS in Operator component (from scenarios tab) and "just" execute it. As the term execution repository stands, u can able to execute objects created in Development repository.
    Moreover, u cant access designer itself if its a EXECUTION repository.
    Thanks,
    Guru

Maybe you are looking for

  • HT204291 When I airplay my ipad, it doesn't fit the tv screen

    I have ipad air and using toshiba tv. When I mirror the image to the tv screen, it doesn't "fit to screen". Are other people having this problem?

  • Quick Look PDF with vertical and horizontal pages

    Is there any way to make Quick Look preview a PDF file with vertical and horizontal pages without adding white padding and retaining the aspect ratio? Now, if I have a PDF with page 1 vertical and the other pages horizontal QL shows the latter also w

  • File transfers Torch 9800 to Playbook

    Can anyone tell me how to transfer files from a Torch 9800 to a Playbook 2 without a PC in the middle? BB Bridge works fine. I can see the files in the native file search utility, open them, etc. But actually pulling a file from the phone to the tabl

  • Cannot restore from Time Machine or Reinstall - MacBook Pro Yosemite

    Hi all, I recently started using a new Mac (Macbook Pro 15" with Yosemite) about 2 weeks ago. Upon startup it asked whether I wanted to encrypt and I said yes. It then froze for about 30min with the spinny wheel. After the startup was finally complet

  • Lag/delay when switching between windows/applications in Yosemite

    I have installed Yosemite onto a 27" iMac mid 2011 with 16Gb RAM.  Since the installation anytime I switch between windows in an application or between applications I get a delay or lag of between 5-10 sec before I can then utilise then next window.