Image in a region

I want to put an image in a region that differs according to a table column data value.
If status is UP, image is green and button have a process to stop (run procedure A)
If status is DOWN, image is red and button have a process to start (run Procedure B)
How can I do that?
Thanks a lot.

This can help eventually:
http://htmldb.oracle.com/pls/otn/f?p=31517:23
Denes Kubicek

Similar Messages

  • Attaching a image to a region

    Hi,
    I want to attach a rotate flag image to a "region". The flag will flip to red/green based on my qurey return. I checked "item" which seems not work for this purose. Ang poiner?
    thanks

    i'm not sure what you meant when you said, "I checked 'item' which seems not work for this purose.", but i think i see what you're trying to do. you want either a green or red image to display based on the data returned in your report? if that's so, know that you can't reference your report data on your htmldb page from anywhere but inside the region. that means that you can either use a report template render the appropriate html or select that html out in your query. both options are briefly discussed at...
    Report customization
    ...and if you really need to reference your report data outside of your report region, you'd need to query the same data again to be able to make use of the results.
    hope this helps,
    raj

  • How put PageItems like textbox as placeholders in an image in a region?

    I have this problem that I am facing in an application that I am building.i have read your article that you presented in the oracle users conference in November 2007 “Steal the Show with Apex” but the problem comes to this.
    a)     I have an image that has placeholders for information display. I would like to distinctly put the page items directly at where the placeholders are in the image. Was wondering how to do this . I have already set the fields for where the placeholders are to be for loading information from the database. The question is this if possible how do I do this.? With this fact that I have edit the region template to put the sample code u see below there
    Thanks hope to hear from you soon thanks
    This is a sample of home the place holder looks like.
    SAMPLE
    ==================
    <div align="left" id="voter_card">
    <table width="448" height="263" border="0" cellpadding="0" cellspacing="0" background="#APP_IMAGES/voter_id_real.jpg">
    <tbody><tr>
    <td height="45" colspan="3"> </td>
    <td colspan="8"> </td>
    <td width="159"> </td>
    </tr>
    <tr>
    <td height="40" colspan="3"> </td>
    <td width="34" align="right" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="25" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="24" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="24" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="23" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="20" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="26" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="30" valign="bottom"><strong> </strong></td>
    <td rowspan="6" valign="top"><table width="133" border="0" cellspacing="2" cellpadding="0">
    <tbody><tr>
    <td width="42" height="28"> </td>
    <td width="42"> </td>
    <td width="41"> </td>
    </tr>
    <tr>
    <td height="158" colspan="3" align="center"><img src="../gvive_java/gvive_imgs/61/22081761000.jpg" width="124" height="143" alt="Photo"></td>
    </tr>
    </tbody></table></td>
    </tr>
    <tr>
    <td height="36" colspan="3"> </td>
    <td colspan="8" rowspan="3" align="center" valign="bottom"><span class="style5">PLACE HOLDER 1</span></td>
    </tr>
    <tr>
    <td width="53" height="31" align="right" valign="middle"><strong>2</strong></td>
    <td width="7"> </td>
    <td width="23" align="left" valign="middle"><strong>1</strong></td>
    </tr>
    <tr>
    <td height="24"> </td>
    </tr>
    <tr>
    <td height="19" align="right" valign="top"><strong>M</strong></td>
    <td height="19"> </td>
    <td height="19"> </td>
    <td colspan="8" align="center" valign="bottom"> </td>
    </tr>
    <tr>
    <td height="51" colspan="3"> </td>
    <td height="51" colspan="8" align="center" valign="middle"><strong>PLACE HOLDER 1 </strong></td>
    </tr>
    <tr>
    <td height="5" colspan="12"> </td>
    </tr>
    </tbody></table>
    </div>
    Hope you have an idea of what I am saying, please feel free to respond for further clarification,
    Thanks

    This is a duplicate of this How to put PageItems like textbox as placeholders in an image in a region?

  • How to nicest/cleanest add images in page regions ?

    How do I the nicest/cleanest way add an image to an region?
    1. One way is to add an image to an Content Area Folder, and then set the folder to 'Publish as portlet'. But the portlet then contains a lot of links to folders - NOT nice...
    2. An other way is to create an Navigation bar with the image as the only element! But, how will then the portlet list to select portlets from (the list that shows available portlets), when the site has to hold thousands of images ...
    3. There MUST be a better way ... suggestions ?
    / TN
    null

    Check out the folder style sheet. You will have very fine control over how the folder is displayed, even as a portlet. For example, you can eliminate the "group by" banner, which I assume is what you mean by "lots of links to folders". You should also turn off portlet headers in the region containing the folder portlet.
    Folders are the recommended way to manage any static content that you want to appear on a portal page.
    Regards,
    Jerry
    null

  • Display image in HTML region???

    I made blank page, and on that page I made html region. Then I go to the Shared Components>Images Create and Upload the image DMD.gif
    to the Application 106, that the Application with which I'm working.I trying to put that image to the html region.
    In html region in Source I put this code, but it doesn't working:
    .<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    .<html xmlns="http://www.w3.org/1999/xhtml">
    .<head>
    .<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    .<title>Untitled Document</title>
    .</head>
    .<body>
    /img src="/i/DMD.gif" align="top"/
    .</body>
    .</html>
    I'm workin with Application Express 2.1!
    Edited by: user10187476 on Aug 27, 2008 2:35 AM

    In the HTML Region just put
    &lt;img src="#WORKSPACE_IMAGES#DMD.gif">
    or if you associated the image with the application
    &lt;img src="#APP_IMAGES#DMD.gif">
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to display a static Image in a region (Not From Database)

    Hi
    How can I display a company logo in a region? Not from any database.
    If we can display a static company logo in a region then where Do I have to place this Company Image (Which Directory or is there any location I have to place this company logo).
    Regards
    Kiran Akkiraju

    Scott
    Thanks for reply.
    I have gone through the link and as per the link
    navigate to the Application Builder for your application.
    click on the Shared Components icon
    click the Images icon
    click Create to upload a new image
    click Browse... to locate an image on your local filesystem
    make sure you remember the name of the image, for example: my_logo.gif
    When I click on Application Builder I am not able to see shared Components.
    I am able to see a Shared Components in a page definiton only.
    Could you please let me know where Can I find this Shared components option.
    Regards
    Kiran Akkiraju

  • Upload image in Dynamic Region

    Hello.
    Excuse me. my English is not very good.
    I use Jdeveloper 11.1.1.3.0
    in my application i have 2 Bounded Task Flow and i use them as a dynamic region.
    in each bounded task flow i use InputFile component to upload image. but i can't upload image, because when i click the Browse button and select the image, then i click another button in my application to upload image, but the InputFile component value reset . I don't know why this happen.
    this problem just happen in dynamic region, in another case I don't have any problem with upload image.
    Thanks.

    Habib,
    Welcome to OTN.
    As you said you are using taskflows as region, can you check the refresh condition of the region binding in the pagedef and see if that has anything to do with this?
    -Arun

  • How to put PageItems like textbox as placeholders in an image in a region?

    I have this problem that I am facing in an application that I am building.i have read your article that you presented in the oracle users conference in November 2007 “Steal the Show with Apex” but the problem comes to this.
    a)     I have an image that has placeholders for information display. I would like to distinctly put the page items directly at where the placeholders are in the image. Was wondering how to do this . I have already set the fields for where the placeholders are to be for loading information from the database. The question is this if possible how do I do this.? With this fact that I have edit the region template to put the sample code u see below there
    Thanks hope to hear from you soon thanks
    This is a sample of home the place holder looks like.
    SAMPLE
    ==================
    <div align="left" id="voter_card">
    <table width="448" height="263" border="0" cellpadding="0" cellspacing="0" background="#APP_IMAGES/voter_id_real.jpg">
    <tbody><tr>
    <td height="45" colspan="3"> </td>
    <td colspan="8"> </td>
    <td width="159"> </td>
    </tr>
    <tr>
    <td height="40" colspan="3"> </td>
    <td width="34" align="right" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="25" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="24" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="24" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="23" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="20" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="26" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="30" valign="bottom"><strong> </strong></td>
    <td rowspan="6" valign="top"><table width="133" border="0" cellspacing="2" cellpadding="0">
    <tbody><tr>
    <td width="42" height="28"> </td>
    <td width="42"> </td>
    <td width="41"> </td>
    </tr>
    <tr>
    <td height="158" colspan="3" align="center"><img src="../gvive_java/gvive_imgs/61/22081761000.jpg" width="124" height="143" alt="Photo"></td>
    </tr>
    </tbody></table></td>
    </tr>
    <tr>
    <td height="36" colspan="3"> </td>
    <td colspan="8" rowspan="3" align="center" valign="bottom"><span class="style5">PLACE HOLDER 1</span></td>
    </tr>
    <tr>
    <td width="53" height="31" align="right" valign="middle"><strong>2</strong></td>
    <td width="7"> </td>
    <td width="23" align="left" valign="middle"><strong>1</strong></td>
    </tr>
    <tr>
    <td height="24"> </td>
    </tr>
    <tr>
    <td height="19" align="right" valign="top"><strong>M</strong></td>
    <td height="19"> </td>
    <td height="19"> </td>
    <td colspan="8" align="center" valign="bottom"> </td>
    </tr>
    <tr>
    <td height="51" colspan="3"> </td>
    <td height="51" colspan="8" align="center" valign="middle"><strong>PLACE HOLDER 1 </strong></td>
    </tr>
    <tr>
    <td height="5" colspan="12"> </td>
    </tr>
    </tbody></table>
    </div>
    Hope you have an idea of what I am saying, please feel free to respond for further clarification,
    Thanks

    To the first question i put across, it works , but the problem now is to load the image that comes with the table into the specific part of the image in question.i chose a Display Image as the page item, the datatype is obviously a blob. would it still hold ?
    i am selecting this based on another pageitem called search.which searches for a particular ID, wondering how i can do that need help.
    Thanks
    Please note that facialimage is the BLOB and its of Display Image pageitem
    How do i get the database to show it in the placeholder.It doesnt work even if i just do a demo of select the BLob from the database using the Display Image if i has to wait for a parameter.On load of the page there is an error.
    SAMPLE
    ====
    begin
    select ,facialimage
    into :P1_IMAGE
    from voter_v where voterid = :P1_VOTERSEARCH;
    end;
    OR
    begin
    select voterid,fullname,sex,facialimage
    into :P1_VOTERID,:P1_FULLNAME,:P1_SEX,:P1_IMAGE
    from voter_v where voterid = :P1_VOTERSEARCH;
    end;
    Edited by: TopNedd on 04-Jun-2012 05:51

  • Image as editable region?

    Hi,
    I have an image in Dreamweaver CS4 and I want to put text over it. I tried to make it an editable region, but all it does is it deletes my image. What can I do?
    Thanks.

    Welcome to the Dreamweaver Forum!
    Put your image in the background of a div and then the surface is available to take your text.
    div#divname {
         background-image: url(...path to your image here...);
         repeat: none;
         width: ...make the width of the image...
         height: ... make the height of the image ...
    in use:
    <div id="divname">Put and style your text for the div here</div>
    Technically speaking, this is not an "editable region," which is a term used in Templates, but the contents of the div may be made an editable region in a Template, and the text within it will remain editable in child pages.
    If you want to do that, be sure to select only the contents of the div when you make your editable region...do not select the div tags.
    Beth

  • Images won't always display in a region

    I have a confusing problem. I have loaded 5 gifs on my local version of APEX and designated them as application only.
    To display an image in a region, I use:
    <img src="#APP_IMAGES#AJ01.GIF">
    That gif displays. If I choose any other gif, I get the "broken image" icon.
    I have tried the same steps on the Hosted site and two of the five gifs work.
    I have also tried #IMAGES_PREFIX# with no application selected and that does help.
    Can you point me in the right direction?

    Hi,
    your example code doesn't show. You have to use a space between < and img or use some other sign like [ instead.
    About your problem. Use
    &lt;img src="#APP_IMAGES#yourimage.gif">if you uploaded the file to Shared Components\Images and assigned it to your application. <b>Note:</b> Check that you really assigned it to the correct application.
    Or use
    &lt;img src="#WORKSPACE_IMAGES#yourimage.gif">if you uploaded it into Shared Components\Images but didn't assign it to an application.
    #IMAGES_PREFIX# is just used if you copy it into the APEX <b>images</b> directory onto the web-server. But you shouldn't do that, you should always put it into your own directory.
    Hope that helps to solve your problem.
    Patrick
    My APEX Blog: http://www.inside-oracle-apex.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://apexplugin.sourceforge.net/ New!

  • Expand the Background Image to Cover the Entire Region Title

    I have a region title that contains an image and it has a height of 2 rows but the background image (blue image) is not expanding in the area (the css contains repeat for the background). The application uses theme 2. Can someone help?
    CSS:
    .rc-title {
        background: url("../images/bg-region-blue-l.gif") repeat scroll 0 0 transparent;
        float: left;
        width: 100%;
    div.rc-blue-top
        background: url("../images/bg-region-blue-l.gif") repeat scroll 0 0 transparent;
        float: left;
        width: 100%;
    }I created the application on APEX.ORACLE.COM:
    Workspace: RGWORK
    User: TESTER
    Password: test123
    Application : CSRSR (33558)
    Select Signage from the menu (only choice).
    You will see that one of the tabular forms has Nameplates and an image, another tablular form has an image but no text (Nameplates) even though it is there. I would live the blue to cover both the image and the text.
    Please help
    DB: 10g
    APEX 4.1
    APEX 4.2 (APEX.ORACLE.COM) works the same way.
    Robert
    http://apexjscss.blogspot.com

    sect55 wrote:
    fac586 ,
    I would like to try the second option:
    >
    Another option would be to eliminate the problem by moving the nameplate images out of the region titles. There's horizontal space within the regions that will allow these images to be positioned to the left of the tabular forms, which would look OK.
    But how do I reference the horizontal space within the regions? I looked at the template for the region:
    <div class="rounded-corner-region float-left-100pct" id="#REGION_STATIC_ID#" #REGION_ATTRIBUTES#>
    <div class="rc-blue-top"><div class="rc-blue-top-r">
    <div class="rc-title">#TITLE#</div>
    <div class="rc-buttons">#CLOSE##PREVIOUS##NEXT##DELETE##EDIT##CHANGE##CREATE##CREATE2##EXPAND##COPY##HELP#</div>
    </div></div>
    <div class="rc-body"><div class="rc-body-r"><div class="rc-content-main">#BODY#<br />
    </div></div></div>
    <div class="rc-bottom"><div class="rc-bottom-r"></div></div>
    </div>and couldn't find out to put the image in the horizontal space.
    Can you please help me by providing the details? There are two options, depending on the role you see the nameplate images playing on the page. I've used the two regions to provide one example of each.
    *1. Nameplate as eye-candy:* If there's sufficient information in the region title, region content and item labels to make the nameplate images superfluous in providing information to the user, and you're just using them to improve the appearance of the page, then they can be applied purely using CSS.
    /* Nameplate image as CSS eye-candy */
    #nameplates-ndc div[id$="catch"] {
      min-height: 36px;
      padding-left: 113px;
      background: transparent url(#WORKSPACE_IMAGES#nameplate_ndc.gif) top left no-repeat;
      background-size: 103px;
    }Note the use of the CSS3 <tt>background-size</tt> property to resize the image. If the app has to run in browsers that don't support this then you'll have to drop it and create an image of the exact size required for use in the <tt>background</tt> rule.
    *2. Nameplate as content:* If the nameplate images are necessary to provide information to the user, then they have to be included in the region (and they must have an <tt>alt</tt> attribute providing an alternative representation of the information contained in the image).
    Put the image in the region Header:
    <img src="#APP_IMAGES#nameplate_n.gif" width="103" alt="Nameplate (name only)" />and float it so it sits alongside the form:
    /* Nameplate image as page content */
    #nameplates-name .rc-content-main img {
      float: left;
      margin-right: 10px;
    }

  • Image display in HTML region

    Hi ,
    I'm unable to display image in HTML region, I'm using this syntax for displaying the image
    <img src="#IMAGE_PREFIX#IT logo.jpg">
    first i uploaded the image to "Shared Components" - "Images" .
    then referencing the image in one of the HTML Region in "Region Header".
    When i run the report i see "X" icon on the report.it's not showing the image.
    any body come across this problem. please mail me back
    Thanks.

    [img src="#IMAGE_PREFIX#IT logo.jpg"]
    should be:
    [img src="#WORKSPACE_IMAGES#logo.jpg"]
    chet
    Message was edited by:
    chet
    I had the folder mapping in there which is wrong for the #WORKSPACE_IMAGES# call

  • How to use the Rectangle class to draw an image and center it in a JPanel

    I sent an earlier post on how to center an image in a JPanel using the Rectangle class. I was asked to send an executable code which will show the malfunction. The code below is an executable code and a small part of a very big project. To simplifiy things, it is just a JFrame and a JPanel with an open dialog. Once executed the JFrame and the FileDialog will open. You can then navigate to a .gif or a .jpg picture and open it. What I want is for the picture to be centered in the middle of the JPanel and not the upper left corner. It is also important to stress that, I am usinig the Rectangle class to draw the Image. The region of interest is where the rectangle is created. In the constructor of the CenterRect class, I initialize the Rectangle class. Then I use paintComponent in the CenterRect class to draw the Image. The other classes are just support classes. The MyImage class is an extended image class which also has a draw() method. Any assistance in getting the Rectangle to show at the center of the JPanel without affecting the size and shape of the image will be greatly appreciated.
    I have divided the code into three parts. They are all supposed to be on one file in order to execute.
    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class CenterRect extends JPanel {
        public static Rectangle srcRect;
        Insets insets = null;
        Image image;
        MyImage imp;
        private double magnification;
        private int dstWidth, dstHeight;
        public CenterRect(MyImage imp){
            insets = getInsets();
            this.imp = imp;
            int width = imp.getWidth();
            int height = imp.getHeight();
            ImagePanel.init();
            srcRect = new Rectangle(0,0, width, height);
            srcRect.setLocation(0,0);
            setDrawingSize(width, height);
            magnification = 1.0;
        public void setDrawingSize(int width, int height) {
            dstWidth = width;
            dstHeight = height;
            setSize(dstWidth, dstHeight);
        public void paintComponent(Graphics g) {
            Image img = imp.getImage();
         try {
                if (img!=null)
                    g.drawImage(img,0,0, (int)(srcRect.width*magnification), (int)(srcRect.height*magnification),
              srcRect.x, srcRect.y, srcRect.x+srcRect.width, srcRect.y+srcRect.height, null);
            catch(OutOfMemoryError e) {e.printStackTrace();}
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new Opener().openImage();
    class Opener{
        private String dir;
        private String name;
        private static String defaultDirectory;
        JFrame parent;
        public Opener() {
            initComponents();
         public void initComponents(){
            parent = new JFrame();
            parent.setContentPane(ImagePanel.panel);
            parent.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
            parent.setExtendedState(JFrame.MAXIMIZED_BOTH);
            parent.setVisible(true);
        public void openDialog(String title, String path){
            if (path==null || path.equals("")) {
                FileDialog fd = new FileDialog(parent, title);
                defaultDirectory = "dir.image";
                if (defaultDirectory!=null)
                    fd.setDirectory(defaultDirectory);
                fd.setVisible(true);
                name = fd.getFile();
                if (name!=null) {
                    dir = fd.getDirectory();
                    defaultDirectory = dir;
                fd.dispose();
                if (parent==null)
                    return;
            } else {
                int i = path.lastIndexOf('/');
                if (i==-1)
                    i = path.lastIndexOf('\\');
                if (i>0) {
                    dir = path.substring(0, i+1);
                    name = path.substring(i+1);
                } else {
                    dir = "";
                    name = path;
        public MyImage openImage(String directory, String name) {
            MyImage imp = openJpegOrGif(dir, name);
            return imp;
        public void openImage() {
            openDialog("Open...", "");
            String directory = dir;
            String name = this.name;
            if (name==null)
                return;
            MyImage imp = openImage(directory, name);
            if (imp!=null) imp.show();
        MyImage openJpegOrGif(String dir, String name) {
                MyImage imp = null;
                Image img = Toolkit.getDefaultToolkit().getImage(dir+name);
                if (img!=null) {
                    imp = new MyImage(name, img);
                    FileInfo fi = new FileInfo();
                    fi.fileFormat = fi.GIF_OR_JPG;
                    fi.fileName = name;
                    fi.directory = dir;
                    imp.setFileInfo(fi);
                return imp;
    }

    This is the second part. It is a continuation of the first part. They are all supposed to be on one file.
    class MyImage implements ImageObserver{
        private int imageUpdateY, imageUpdateW,width,height;
        private boolean imageLoaded;
        private static int currentID = -1;
        private int ID;
        private static Component comp;
        protected ImageProcessor ip;
        private String title;
        protected Image img;
        private static int xbase = -1;
        private static int ybase,xloc,yloc;
        private static int count = 0;
        private static final int XINC = 8;
        private static final int YINC = 12;
        private int originalScale = 1;
        private FileInfo fileInfo;
        ImagePanel win;
        /** Constructs an ImagePlus from an AWT Image. The first argument
         * will be used as the title of the window that displays the image. */
        public MyImage(String title, Image img) {
            this.title = title;
             ID = --currentID;
            if (img!=null)
                setImage(img);
        public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h) {
             imageUpdateY = y;
             imageUpdateW = w;
             imageLoaded = (flags & (ALLBITS|FRAMEBITS|ABORT)) != 0;
         return !imageLoaded;
        public int getWidth() {
             return width;
        public int getHeight() {
             return height;
        /** Replaces the ImageProcessor, if any, with the one specified.
         * Set 'title' to null to leave the image title unchanged. */
        public void setProcessor(String title, ImageProcessor ip) {
            if (title!=null) this.title = title;
            this.ip = ip;
            img = ip.createImage();
            boolean newSize = width!=ip.getWidth() || height!=ip.getHeight();
         width = ip.getWidth();
         height = ip.getHeight();
         if (win!=null && newSize) {
                win = new ImagePanel(this);
        public void draw(){
            CenterRect ic = null;
            win = new ImagePanel(this);
            if (win!=null){
                win.addIC(this);
                win.getCanvas().repaint();
                ic = win .getCanvas();
                win.panel.add(ic);
                int width = win.imp.getWidth();
                int height = win.imp.getHeight();
                Point ijLoc = new Point(10,32);
                if (xbase==-1) {
                    xbase = 5;
                    ybase = ijLoc.y;
                    xloc = xbase;
                    yloc = ybase;
                if ((xloc+width)>ijLoc.x && yloc<(ybase+20))
                    yloc = ybase+20;
                    int x = xloc;
                    int y = yloc;
                    xloc += XINC;
                    yloc += YINC;
                    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
                    count++;
                    if (count%6==0) {
                        xloc = xbase;
                        yloc = ybase;
                    int scale = 1;
                    while (xbase+XINC*4+width/scale>screen.width || ybase+YINC*4+height/scale>screen.height)
                        if (scale>1) {
                   originalScale = scale;
                   ic.setDrawingSize(width/scale, height/scale);
        /** Returns the current AWT image. */
        public Image getImage() {
            if (img==null && ip!=null)
                img = ip.createImage();
            return img;
        /** Replaces the AWT image, if any, with the one specified. */
        public void setImage(Image img) {
            waitForImage(img);
            this.img = img;
            JPanel panel = ImagePanel.panel;
            width = img.getWidth(panel);
            height = img.getHeight(panel);
            ip = null;
        /** Opens a window to display this image and clears the status bar. */
        public void show() {
            show("");
        /** Opens a window to display this image and displays
         * 'statusMessage' in the status bar. */
        public void show(String statusMessage) {
            if (img==null && ip!=null){
                img = ip.createImage();
            if ((img!=null) && (width>=0) && (height>=0)) {
                win = new ImagePanel(this);
                draw();
        private void waitForImage(Image img) {
        if (comp==null) {
            comp = ImagePanel.panel;
            if (comp==null)
                comp = new JPanel();
        imageLoaded = false;
        if (!comp.prepareImage(img, this)) {
            double progress;
            while (!imageLoaded) {
                if (imageUpdateW>1) {
                    progress = (double)imageUpdateY/imageUpdateW;
                    if (!(progress<1.0)) {
                        progress = 1.0 - (progress-1.0);
                        if (progress<0.0) progress = 0.9;
    public void setFileInfo(FileInfo fi) {
        fi.pixels = null;
        fileInfo = fi;
    }

  • Display image in report page but just a link if file is not an image

    Hello,
    I've been working on displaying an image in a report page but need to add some logic.
    I would like to be able to call the image using a Region Source of type SQL instead of the HTML Expression. The reason for this is because I need to use logic to determine if the file is an image or not and to determine wether to show a thumbnail or just a link. I did find a "GET_BLOB_FILE_SRC" Function on the internet that suggests that I could do this but I need some help in making it work in my application.
    Here it is as a Region Source of type SQL:
    SELECT ID,
    NAME,
    CASE WHEN NVL(dbms_lob.getlength(document),0) = 0
    THEN NULL
    ELSE CASE WHEN attach_mimetype like 'image%'
    THEN '<img
    src="'||apex_util.get_blob_file_src('P4_DOCUMENT',id)||'" />'
    ELSE '<a
    href="'||apex_util.get_blob_file_src('P4_DOCUMENT',id)||'">Download</a>'
    end
    END new_img
    FROM TEST_WITH_BLOB
    If anyone can help me with this that would be appreciated.
    Thanks
    LEH

    John,
    The problem is that I do not know how to use the "GET_BLOB_FILE_SRC Function". I never got it to work but the HTML Expression did work for me. If you know how the GET_BLOB_FILE_SRC Function works then that would be helpful. I don't think it would be helpful if I posted my example on apex.oracle.com. But here is the information I have on the GET_BLOB_FILE_SRC Function.
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    GET_BLOB_FILE_SRC Function
    As an alternative to using the built-in methods of providing a download link, you can use the APEX_UTIL.GET_BLOB_FILE_SRC function. One advantage of this approach, is the ability to more specifically format the display of the image (with height and width tags). Please note that this approach is only valid if called from a valid Oracle Application Express session. Also, this method requires that the parameters that describe the BLOB to be listed as the format of a valid item within the application. That item is then referenced by the function.
    See Also:
    "About BLOB Support in Forms and Reports" in Oracle Application Express Application Builder User's Guide
    Syntax
    FUNCTION GET_BLOB_FILE_SRC (
        p_item_name           IN VARCHAR2 DEFAULT NULL,
        p_v1                  IN VARCHAR2 DEFAULT NULL,
        p_v2                  IN VARCHAR2 DEFAULT NULL,
        p_content_disposition IN VARCHAR2 DEFAULT NULL)
        RETURN VARCHAR2
    Parameters
    Table 1-28 describes the parameters available in GET_BLOB_FILE_SRC function.
    Table 1-28 GET_BLOB_FILE_SRC Parameters
    Parameter Description
    p_item_name
    Name of valid application page ITEM that with type FILE that contains the source type of DB column.
    p_v1
    Value of primary key column 1.
    p_v2
    Value of primary key column 2.
    p_content_disposition
    Specify inline or attachment, all other values ignored
    Example
    As a PLSQL Function Body:
    RETURN '<img src="'||APEX_UTIL.GET_BLOB_FILE_SRC('P2_ATTACHMENT',:P2_EMPNO)||'" />';
    As a Region Source of type SQL:
    SELECT ID,
           NAME,
           CASE WHEN NVL(dbms_lob.getlength(document),0) = 0
                THEN NULL
                ELSE CASE WHEN attach_mimetype like 'image%'
                          THEN '<img
    src="'||apex_util.get_blob_file_src('P4_DOCUMENT',id)||'" />'
                          ELSE '<a
    href="'||apex_util.get_blob_file_src('P4_DOCUMENT',id)||'">Download</a>'
                          end
            END new_img
       FROM TEST_WITH_BLOB
    The previous example illustrates how to display the BLOB within the report, if it can be displayed, and provide a download link, if it cannot be displayed.Thanks
    LEH

  • How to Add a Row by clicking in other different Region

    Hello Im trying to build a page that allows me to add items to a region by clicking in a report region in the same page.
    I created a Report Region with my information , It has a link and one image in the region 1.
    in other region(REgion 2) I have a tabular form from one table,
    the idea is , how to Add rows to the tabular form(REgion 2) clicking items from the reports region (Region 1)the item could be the image or the link.
    I tried with Addrow javaScrip, on my image as a link or even my link, and it worked ,but it works just adding an empty row and i need to add a row with information of the report region (Region 2) for example ID_product.
    so this is other question how to use Addrow javascrip , including data in the row automaticly .
    Well this is what i have been trying ,I don't know if this is the correct way to do it , or if the best way.
    Maybe there is another method , like ajax or something
    Please any advice will be appreciated.

    Hello Im trying to build a page that allows me to add items to a region by clicking in a report region in the same page.
    I created a Report Region with my information , It has a link and one image in the region 1.
    in other region(REgion 2) I have a tabular form from one table,
    the idea is , how to Add rows to the tabular form(REgion 2) clicking items from the reports region (Region 1)the item could be the image or the link.
    I tried with Addrow javaScrip, on my image as a link or even my link, and it worked ,but it works just adding an empty row and i need to add a row with information of the report region (Region 2) for example ID_product.
    so this is other question how to use Addrow javascrip , including data in the row automaticly .
    Well this is what i have been trying ,I don't know if this is the correct way to do it , or if the best way.
    Maybe there is another method , like ajax or something
    Please any advice will be appreciated.

Maybe you are looking for

  • Cant sync iphone 6 plus to itunes, can only restore backup or setup as new

    I recently bought a new iphone 6 plus and set it up through itunes by restoring from the backup of my previous iphone.  Since then I have made updates on my new phone (installed some apps, updated IDs and passwords, etc), and most recently let it ins

  • Family Sharing not working

    I set up family sharing a few weeks ago with no issues.  Today I tried to locate a purchase that another family member made and am unable to see anyone's purchases but my own.  Also my kids are able to download new apps with ask to buy ON.  I don't g

  • Purchase Requisition number : In which table the currency field stored?

    When we raise a Purchase requisition nr : t codes ME53N / ME21N the PR nr, item nr, PR doc type, PR group, plant etc are stored in EBAN table. PR amount can be calculated based on MENGE * PREIS / PEINH from the table EBAN. Where will be the PR amount

  • Double-Clicking to play a song puts it in a different order

    Whenever I double-click on a song to play it, it moves that song down to the last song of that album. It does this in both my iTunes library and in the music on my iPod. So, it's reordering the songs in all of my music and I don't know how to change

  • IPhoto 09 won't import my photos

    I've tried importing directly from my Canon SD790 IS. THis used to work but now iPhoto crashes with a message 'The application iPhoto quit unexpectedly. The problem may have been caused by the AviImporter plug-in." I've also tried downloading to my M