Load and Display Multiple Images in a Web Dynpro Table

I am new to Web Dynpro and I am wondering if anyone can help me with an application that I am currently developing. I have a particular requirement to store images in a database table (not MIME repository) and then display them in a WD table element. An image can be of JPEG, PNG or TIFF format and is associated with an employee record.
I want to create a view in my application that displays multiple images in a table, one image per row. I want to do this using Web Dynpro for ABAP, not Java. I have looked into pretty much all examples available for Web Dynpro and came to the conclusion that Components such as WDR_TEST_EVENTS and WDR_TEST_UI_ELEMENTS do not have any examples of images being stored in a database table and viewed in/from a Web Dynpro table element. Programs such as RSDEMO_PICTURE_CONTROL, DEMO_PICTURE_CONTROL and SAP_PICTURE_DEMO do not show this either.
The images to be displayed in the Dynpro table are to come from a z-type table, stored in a column of data type XSTRING (RAW STRING). So I would also like to know how to upload these images into this z-type table using ABAP code (not Java).
Your help would be greatly appreciated.
Kenn

Hi,
May be this is the is the correct place to post your query.
Web Dynpro ABAP
Regards,
Swarna Munukoti.
Edited by: Swarna Munukoti on Jul 16, 2009 3:52 PM

Similar Messages

  • Loading and displaying an image

    I have been able to do this with an applet quite easily
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.awt.Image;
    // This is a simple example applet that loads an image and
    // displays it.
    public class DrawImage extends Applet
         Image image;
         public void init()
              image = getImage(getDocumentBase(), "cow1.jpg");
         public void paint(Graphics g)
              g.drawImage(image, 10, 10, this);
    }I haven't been able to find a good source that explains how to do it just using swing and awt. The ones I have found are complicated or don't work. I am trying to program a tester program that will load an jpg image and redraw the panel then load another jpg image so it looks like its moving. I know you can do this just using the graphic in java but I would like to do it with a jpg image files. Can anyone help with simple code for this?

    After lots of trial and error with certain classes and not knowing how to use certain methods correctly, I have this below code:
    public class image_load extends Frame
         Image img;
         public static void main (String args[])
              Toolkit toolkit = Toolkit.getDefaultToolkit();
              img = toolkit.createImage("cow1.jpg");
              img = ImageIO.read();
              ImageIcon icon = new ImageIcon("cow1.jpg",
                                     "cow pic");
              JLabel label1 = new JLabel("Image and Text", icon, JLabel.CENTER);
              JFrame frame = new JFrame();
              //set frame to exit when closed
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.add(label1);     //add panel to frame
              frame.setSize(25,25);     //set size of frame to 300pix x300pix
              frame.setVisible(true);     //make frame visable
         public void paint(Graphics graphics) {
              graphics.drawImage(img, 0, 0, null);
    }I get these errors from the code:
    image_load.java:21: non-static variable img cannot be referenced from a static c
    ontext
                    img = toolkit.createImage("cow1.jpg");
                    ^
    image_load.java:23: non-static variable img cannot be referenced from a static c
    ontext
                    img = ImageIO.read();
                    ^
    image_load.java:23: cannot find symbol
    symbol  : method read()
    location: class javax.imageio.ImageIO
                    img = ImageIO.read();
                                 ^
    3 errorsI have tried a contructor and other things. As for the imageIO.read error that only accepts in Buffered Images. For this I have this odd bit of code that needs changing to be able to work. Any more suggestions?
    BufferedImage bufferedImage = new BufferedImage ( imageWidth,
                                                      imageHeight,
                                                      BufferedImage.TYPE_INT_BGR  );
              bufferedImage.createGraphics().drawImage( image, 0, 0, this);

  • Reading and displaying Ms.Word document with web dynpro java

    Hi,
    I'm using NetWever developer studio 7..0.21.
    I'm developing web dynpro java application.I'm in difficulty to read and display word document with its original format in web dynpro view. Is it possible?
    If possible , is there a blog etc.?
    Thanks.

    Hello,
    You have to use the Office Integration Library. Please, follow the documentation below:
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/32853febec3c17e10000000a114084/frameset.htm
    I hope this helps you.
    Regards,
    Blanca

  • Visio Web Part - Problems Loading and Displaying Multiple Sheets

    I am having two issues with the VISIO SharePoint web part:
    1) most of the time the server times out and returns "...unable to retrieve data...
    2) When it does load, it only displays 1 or 2 sheets from visio file
    I don't currently have access to the back end so the best I can say is that we are running SharePoint 2013 and I am using the Office265 interface to access it.
    Originally the visio file was connected to an excel file (where shape data was stored). I made a copy of the visio file and deleted all of the connections to see if that helped (it didn't). As for the issue with not all of the sheets being displayed, one
    of the times I was able to select about 4-5 sheets (via the dialog box in the top right corner of the visio web part) - right now I can only see 2 of the sheets (the 2nd and the 5th).
    Visio file was created using Visio 2013, 2Mb and saved with a .vsdx extension.
    Any thoughts?
    Byron Johnson.

    Hi Byron,
    I suppose that “sheets” means the pages in the Visio file.
    I recommend to check the Publish Options for your Visio file in Microsoft Visio to see if the pages haven selected to be displayed when viewing the file in SharePoint and also check if the data sources have been added to be available.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Load and display image using CDC

    Hi everyone,
    Please help. I'm new to java. I need a simple routine to load and display an image from the file system into a CDC app on windows mobile 5. I'm usin creme 4.1.
    Thanx in advance

    Use the following as a guide:
    1. Get the image (path below must be absolute):
    public static Image getImage(String filename) throws ScanException {
    Image img = null;
    // Read paths from properties file
    StringBuffer buf = new StringBuffer("\\");
    buf.append(ScanUtility.getPathImages());
    buf.append("\\");
    buf.append(filename);
    buf.append(".jpg");
    File dataFile = new File(buf.toString());
    if(!dataFile.exists())
    throw new ScanException("Cannot locate the file:\n" + dataFile.getAbsolutePath());
    img = Toolkit.getDefaultToolkit().createImage(buf.toString());
    return img;
    2. Create a class to display the image (pass in the image, above):
    ImagePanel class source:
    import java.awt.*;
    import java.awt.image.*;
    public class ImagePanel extends Panel {
    private Image image = null;
    private Image scaledImage = null;
    private boolean imageComplete = false;
    public ImagePanel(Image img) {
    image = img;
    scaledImage = image.getScaledInstance(200, -1, Image.SCALE_DEFAULT);
    prepareImage(scaledImage, this);
    // Override the paint method, to render the image
    public void paint(Graphics g) {
    if(imageComplete) {
    g.drawImage(scaledImage, 0, 0, this);
    // Override imageUpdate method, to prevent repaint() from trying
    // to do anything until the image is scaled
    public boolean imageUpdate(Image img, int infoFlags, int x, int y, int w, int h) {
    if(infoFlags == ImageObserver.ALLBITS) {
    imageComplete = true;
    repaint();
    return super.imageUpdate(img, infoFlags, x, y, w, h);
    public void flush() {
    image.flush();
    scaledImage.flush();
    image = null;
    scaledImage = null;
    }

  • Loading And Displaying image From MYSQL

    Hello, How can I load and display picture stored into a MYSQL database in a Swing GUI using for example JLable component.

    establish a connection to ur sql, n
    retireve the record with the images or image url in the db.
    and then load it to a Image icon and set it to a JLabel.

  • Firefox can't load a Siemens Gigaset network camera but IE8 can. There is an error in the code from the cam. Could Firefox ignore this and display the image anyway ? eg. with Ignore / Abort.

    I run Windows-XP SP3 and I can't get the image from a Siemans Gigaset cam. There is an error in the cam code (a lacking rutine) . IE8 ignores this and displays the image anyway.
    Is it possible to get a notification like Ignore/Abort/ Continue ???

    Does the documentation for that camera, or for the software with it, say anything about ActiveX or about H.264?
    If so, it isn't compatible with Firefox - it doesn't do ActiveX and it doesn't support H.264 in the HTML5 standard. Microsoft just released a plugin for Firefox that adds H.264 support to Firefox, but IIRC that only covers Windows 7 - not WinXP.

  • Unable to display text with image in a cell of web dynpro table.

    Hello,
    I am unable to display an image with the text inside a cell of web dynpro table. The image doesn't come at all. I am trying to display the image of an object and the object description alongside within the same cell.
    Thanks and Regards,
    Abhijnan

    Hi
    Pls check the below link
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/9b/46bb0d339b42cc8d30636ca0c9f5b6/frameset.htm
    The only problem is only the below UI elements are supported
    ■Button
    ■ToggleButton
    ■LinkToUrl
    ■LinkToAction
    ■FileDownload

  • Hi , How to display multiple images

    hi,
    please help me out!
    I need to display multiple images on the jframe or on a jpanel . From the database where the path of the images are stored how to do it any one please
    give the code

    import java.awt.*;
    import java.awt.geom.AffineTransform;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import java.net.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class ShowingImages extends JPanel
        final int
            WIDTH  = 75,
            HEIGHT = 125;
        public ShowingImages()
            String[] filePaths = getPaths();
            BufferedImage[] images = getImages(filePaths);
            setLayout(new GridBagLayout());
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.insets = new Insets(5,5,5,5);
            gbc.weighty = 1.0;
            gbc.weightx = 1.0;
            loadImages(images, gbc);
        private void loadImages(BufferedImage[] images, GridBagConstraints gbc)
            for(int j = 0; j < images.length; j++)
                BufferedImage scaled = scale(images[j], WIDTH, HEIGHT);
                ImageIcon icon = new ImageIcon(scaled);
                if(j % 2 == 0)
                    gbc.gridwidth = GridBagConstraints.RELATIVE;
                else
                    gbc.gridwidth = GridBagConstraints.REMAINDER;
                add(new JLabel(icon), gbc);
        private String[] getPaths()
            String[] fileNames = {
                "images/redfox.jpg", "images/greathornedowl.jpg",
                "images/bclynx.jpg", "images/mtngoat.jpg"
            return fileNames;
        private BufferedImage[] getImages(String[] fileNames)
            BufferedImage[] images = new BufferedImage[fileNames.length];
            for(int j = 0; j < fileNames.length; j++)
                images[j] = loadImage(fileNames[j]);
            return images;
        private BufferedImage loadImage(String fileName)
            BufferedImage image = null;
            try
                URL url = new URL("file:" + fileName);
                image = ImageIO.read(url);
            catch(MalformedURLException mue)
                System.err.println("malformed url for image: " + mue.getMessage());
            catch(IOException ioe)
                System.err.println("unable to read image file: " + ioe.getMessage());
            return image;
        private BufferedImage scale(BufferedImage source, int w, int h)
            BufferedImage scaled = new BufferedImage(w, h, source.getType());
            Graphics2D g2 = scaled.createGraphics();
            g2.setPaint(getBackground());          // background for
            g2.fillRect(0,0,w,h);                  //   scale to fit
            double width = source.getWidth();
            double height = source.getHeight();
            double xScale = w / width;
            double yScale = h / height;
            double scale = Math.min(xScale, yScale);      // scale to fit
            //double scale = Math.max(xScale, yScale);    // scale to fill
            double x = (w - scale*width)/2;
            double y = (h - scale*height)/2;
            AffineTransform at = AffineTransform.getScaleInstance(scale, scale);
            g2.translate(x, y);
            g2.drawRenderedImage(source, at);
            g2.dispose();
            return scaled;
        public static void main(String[] args)
            // create and configure your JFrame here...
            f.getContentPane().add(new JScrollPane(new ShowingImages()));
    }

  • Loading and Playing Multiple Sounds

    I have written a loadSound function which handles loading and playing multiple sounds. This function works fine when I call this function in another keyframe i.e. the frame in which the function is not written. But when I call the function on the same frame in which the function is written the sounds gets mixed up. For example the function is written in 1st keyframe. If I call this function in 2nd, 3rd and 4th keyframe (with different sounds) it works fine. But when i call the same function in 1st, 2nd and 3rd keyframe it all gets messed up.
    In 1st keyframe the sound plays properly. When I move to 2nd Keyframe the 2nd sound plays. But when I move back to the 1st keyframe the 2nd and 1st keyframe sounds all get mixed up. This doesn't happen when I call the function in 2nd, 3rd and 4th keyframes.
    Below is my function:
    import flash.events.Event;
    import flash.media.Sound;
    import flash.net.URLRequest;
    import flash.events.ProgressEvent;
    import flash.events.IOErrorEvent;
    import flash.errors.IOError;
    import flash.media.SoundChannel;
    import flash.media.SoundMixer;
    import flash.events.TimerEvent;
    import flash.utils.Timer;
    import flash.display.MovieClip;
    import flash.media.SoundTransform;
    stop();
    var s:Sound;
    var localSound:SoundChannel = new SoundChannel();
    var req:URLRequest;
    var loadedPct:uint;
    var currentFrameArr:Array = ["One","Two","Three"];
    var urlArr:Array = ["sound/m01_t01_s01.mp3","sound/m01_t01_s02.mp3","sound/page10_11.mp3"];
    function loadSnd(currentFrm:String)
    s = new Sound();
    s.addEventListener(ProgressEvent.PROGRESS, onSoundProgress);
    s.addEventListener(Event.COMPLETE, onSoundLoaded);
    s.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
    localSound.stop();
    for (var i:uint=0; i<currentFrameArr.length; i++)
      if (currentFrm == currentFrameArr[i])
       req = new URLRequest(urlArr[i]);
    s.load(req);
    function onSoundProgress(evt:ProgressEvent):void
      loadedPct = Math.round(100 * (evt.bytesLoaded / evt.bytesTotal));
      trace("The sound is " + loadedPct + " % loaded");
    function onSoundLoaded(evt:Event):void
      localSound = s.play();
    function onIOError(evt:IOErrorEvent):void
      trace("The sound could not be loaded: " + evt.text);
    Call to this function in different frames:
    loadSnd("One");
    loadSnd("Two");
    etc
    If I pass the parameter 'One' in loadSnd it plays the 1st element in urlArray, 'Two' 2nd element and so on.
    I have been scratching my head since long over this.
    Can anybody please pinpoint the error.

    Got the solution. The SoundMixer.stopAll(); statement did the trick. The complete workable function is pasted below:
    import flash.events.Event;
    import flash.media.Sound;
    import flash.net.URLRequest;
    import flash.events.ProgressEvent;
    import flash.events.IOErrorEvent;
    import flash.errors.IOError;
    import flash.media.SoundChannel;
    import flash.media.SoundMixer;
    import flash.events.TimerEvent;
    import flash.utils.Timer;
    import flash.display.MovieClip;
    import flash.media.SoundTransform;
    stop();
    var s:Sound;
    var localSound:SoundChannel = new SoundChannel();
    var req:URLRequest;
    var loadedPct:uint;
    var currentFrameArr:Array = ["One","Two","Three"];
    var urlArr:Array = ["sound/m01_t01_s01.mp3","sound/m01_t01_s02.mp3","sound/page10_11.mp3"];
    function loadSnd(currentFrm:String)
      s = new Sound();
      s.addEventListener(ProgressEvent.PROGRESS, onSoundProgress);
      s.addEventListener(Event.COMPLETE, onSoundLoaded);
      s.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
      SoundMixer.stopAll();
      localSound.stop();
      for (var i:uint=0; i<currentFrameArr.length; i++)
      if (currentFrm == currentFrameArr[i])
      req = new URLRequest(urlArr[i]);
      break;
      s.load(req);
    function onSoundProgress(evt:ProgressEvent):void
      loadedPct = Math.round(100 * (evt.bytesLoaded / evt.bytesTotal));
      trace("The sound is " + loadedPct + " % loaded");
    function onSoundLoaded(evt:Event):void
      localSound = s.play();
    function onIOError(evt:IOErrorEvent):void
      trace("The sound could not be loaded: " + evt.text);
    Calling the function
    loadSnd("One");
    loadSnd("Two"); etc

  • PDF addresses not longer load and display PDF in Firefox and solutions suggest to other users with problem DON'T WORK (work fine in Chrome and Safari)

    This is an ongoing problem with other users. When putting a PDF in address window of Firefox and clicking go to address FIREFOX WILL NOT LOAD AND DISPLAY THE PDF. This problem has come up in questions from other users on your site. NONE OF THE SUGGESTED SOLUTIONS WORK! (trying either the Firefox PDF viewer or the Acrobat viewer as default viewer)
    I am using Firefox 23.0.1 (as some of the other users with the same problem). This was not a problem in the past with Firefox. Safari and Chrome continue load and display PDFs just fine from their addresses. This is a big problem as I now have to inform people who want to view my PDFs NOT TO USE FIREFOX BUT TO USE SAFARI OR CHROME.

    It appears that a link to a PDF on an internet page will not download in Firefox either!
    I went to this page:
    http://www.nasa.gov/connect/ebooks/earth_art_detail.html#.UjYEzrwsU08
    and tried to download the PDF link at the bottom of the page (Download: PDF 11.3 MB) It didn't work! Nothing happens. Tried it in Safari and it worked flawlessly.
    I have a PDF file of my work in the public_html folder on my URL. I give the address generated by that file to people who want to view my work---this works perfectly in Safari and Chrome. As to your other question, can't bookmark it if I can't get to it in Firefox.

  • How to load and display the external flv video files in dynamicly and the how to control the flv fil

    How to load and display the external flv video files in dynamicly using AS 3.0
    and  How to control the flv file  add the play paus button and add seekbar.
    I have using to load the flv file following code
    var flvPlaceHolder1:MovieClip = new MovieClip();
    var vid1:Video = new Video(734, 408);
    flvPlaceHolder1.addChild(vid1);
    addChild(flvPlaceHolder1);
    flvPlaceHolder1.x = 1059;
    flvPlaceHolder1.y = 152;
    var nc1:NetConnection = new NetConnection();
    nc1.connect(null);
    var ns1:NetStream = new NetStream(nc1);
    vid1.attachNetStream(ns1);
    var listener1:Object = new Object();
    listener1.onMetaData = function(evt:Object):void {};
    ns1.client = listener1;
    ns1.play("GV-1600 TURNING.flv");
    ns1.addEventListener(NetStatusEvent.NET_STATUS, statusChanged1);
    function statusChanged1(ns1:NetStatusEvent):void
             trace(ns1.info.code);
            if (ns1.info.code == 'NetStream.Buffer.Empty')
                 trace('the video has ended');
                 removeChild(flvPlaceHolder1);
                 //trace('removeChild');
                gotoAndPlay(1786);
    then how to add the play,paus ,full screen button    and   seekbar,volumebar.

    I have to Create the flash presentation for our company product
    In this presentation the left  side the text animation are displayed then right side the our product video is displayed.
    In this presentation i need the following option :
    1, The first product video and animation is finished then the next product is played
    2, then the video displayed  (size width and height 400x300) , I click this video to increase the size(ex:1000x700)
    3, then the playing video i control  it play, stop, paus button and volume bar, seek bar.
    4, then this presentation is displayed on 42 inches LCD TV so this full presentation is run full screen.
    I have finished first two steps 1 and 2
    the following are the screen short and code:-
    code :-
    var count=0;
    var flvPlaceHolder2:MovieClip = new MovieClip();   
    var vid2:Video = new Video(734, 408);
    flvPlaceHolder2.addChild(vid2);
    addChild(flvPlaceHolder2);
    flvPlaceHolder2.x = 1059;
    flvPlaceHolder2.y = 152;
    var nc2:NetConnection = new NetConnection();
    nc2.connect(null);
    var ns2:NetStream = new NetStream(nc2);
    vid2.attachNetStream(ns2);
    var listener2:Object = new Object();
    listener2.onMetaData = function(evt:Object):void {};
    ns2.client = listener2;
    ns2.play("GS-4000.flv");
    this.addEventListener(Event.ENTER_FRAME, BtnFadeIn2);
    function BtnFadeIn2(event:Event):void
        if (this.currentFrame == 387)
            /*flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            trace('Screen size is changed');*/
            if(count==0)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            count++;
    ns2.addEventListener(NetStatusEvent.NET_STATUS, statusChanged2);
    function statusChanged2(ns2:NetStatusEvent):void
        trace(ns2.info.code);
        if (ns2.info.code == 'NetStream.Buffer.Empty')
                trace('the video has ended');
                 removeChild(flvPlaceHolder2);
                 //trace('removeChild');
                gotoAndPlay(433);
    flvPlaceHolder2.buttonMode=true;
    flvPlaceHolder2.addEventListener(MouseEvent.CLICK,home2);
    function home2(e:MouseEvent):void
        if(vid2.width==734 && vid2.height==408)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
        else
            flvPlaceHolder2.x = 1059;
            flvPlaceHolder2.y = 152;
            vid2.width=734;
            vid2.height=408;

  • How to Snap/Grab Image from 1394 camera and display the Image in CWIMAQVIEWER in VC++ ?

    Hi,
    I have :  -  IMAQ1394 2.0.1
                  -  NI Vision 7.1
    In VB, I can Snap/Grab Image from 1394 camera and display the Image in CWIMAQVIEWER :
        Dim Image0 As New CWIMAQImage
        imaq1394SnapCW(sid0,Image0)
        CWIMAQViewer1.Attach Image0
    Now,How can I do this in VC++6.0?
        I tried:
                  C_CWIMAQImage m_imgViewer1;
                  m_imgViewer1 = m_CWIMAQVision1.CreateCWIMAQImage();
                  m_CWIMAQViewer1.Attach(m_imgViewer1);
                  imaq1394SnapCW(Sid,m_imgViewer1);  <--there is no "imaq1394SnapCW "function in VC++,why?
        Please help me!
        Thank you!

    For people looking back at these old posts regarding
    CWIMAQViewer - it was not made to be used in the C environments and is made
    for VB.
    Refer to the following locations for displaying images in C
    environments:
    Start»All Programs»National Instruments»Vision»Documentation
    Start»All
    Programs»National Instruments»Vision»Text Based Examples
    Make
    sure that you look at the examples and documentation that is in
    reference to the C environments not the VB environments
    Vince M
    Applications Engineer

  • Browser can resolve, access, and display JPEG image, but ImageIcon can't.

    I've got this weird problem that only happens with images accessed through a customer's VPN:
    Microsloth Internet Imploder can resolve, access, and display a JPG image from a VPN URL, in the general form:
    http://intranet/part?FOOBAR.JPG which the browser apparently transmogrifies into
    http://mogrify.foo.com/images/scripts/cgi/detail.cgi?FOOBAR.JPG(as Jack Webb often said, the names have been changed to protect the innocent)
    Firefox can also resove, access, and display the image.
    But an ImageIcon, when fed either URL, quietly fails to get anything, No errors, no exceptions, but no image, either.
    The application, if it detects the failure of ImageIcon to come up with the image, somehow (not my code) defers to "Windoze Image and Fax Viewer," which locks up trying to resolve, access, and display the image.
    What could possibly be going on here?

    I'd love to have the luxury of saying, "You lost me at Windoze." Then again, to paraphrase a running gag from Airplane!, it looks like I picked the wrong week to quit hemlock.
    As my final message on my other thread on this topic indicates, the problem is that even though the URL ends in JPG, the server isn't really serving up a JPEG, but rather, an HTML page containing the JPEG.
    Knowing this, a solution (of sorts) presented itself: if the URL doesn't produce a displayable ImageIcon, try constructing a JEditorPane on the URL. The results aren't exactly pretty, and you do have to try the ImageIcon first, but it does work.
    JHHL

  • HT1600 I get the menu and can pick a movie but then it won't load and displays an error message

    I get the menu and can pick a movie but then it won't load and displays an error

    What version of iPhoto do you have installed?  Is if one of the versions shown as not compatible in this screenshot?
    If it is then go to the App Store and download iPhoto 9.5.  It will be free if you have an iPhoto 9 or later verson currently.
    OT

Maybe you are looking for