How to change image in APEX

Hi, Guys:
I am struggling to display multiple images one page by clicking button. I implement an PL/SQL stored procedure as follows:
CREATE OR REPLACE PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number) AS
v_mime_type VARCHAR2(48);
v_length NUMBER;
v_name VARCHAR2(2000);
v_image BLOB;
v_counter number:=0;
cursor cur_All_Images_of_Offender is
SELECT 'IMAGE/JPEG' mime_type, dbms_lob.getlength(image) as image_length, image
FROM sor_image
WHERE offender_id = p_n_Offender_id;
rec_Image_of_Offender cur_All_Images_of_Offender%ROWTYPE;
BEGIN
open cur_All_Images_of_Offender;
loop
fetch cur_All_Images_of_Offender into rec_Image_of_Offender;
v_counter:=v_counter+1;
if (v_counter=p_n_image_Count) then
owa_util.mime_header(nvl(rec_Image_of_Offender.mime_type, 'application/octet'), FALSE);
htp.p('Content-length: '||rec_Image_of_Offender.image_length);
owa_util.http_header_close;
wpg_docload.download_file (rec_Image_of_Offender.image);
end if;
exit when ((cur_All_Images_of_Offender%NOTFOUND) or (v_counter>=p_n_image_Count));
end loop;
close cur_All_Images_of_Offender;
END Sor_Display_Current_Image;
and I set up a report region in the page with such a query:
select max(OFFENDER_ID) OFFENDER_ID, 'PHOTO' from sor_image where offender_id = 1
there are many offenders, but i just try 1.
and I set up the column of photo as
<img src="#OWNER#.SOR_DISPLAY_IMAGE?P_N_OFFENDER_ID=#OFFENDER_ID#, p_n_image_Count=2" width="75" height="75">
Here I just tried to display the second image of this guy.
I cannot display image in report, Could anyone give me an example about it?
Thanks a lot!
Edited by: lxiscas on Jul 3, 2012 2:45 PM

I want to change the displayed image of the same guy (identified by Offender_id) by clicking button (Next picture), all of images are stored in sor_image table (one offender may have multiple images). This table is defined as follows:
CREATE TABLE "SORS"."SOR_IMAGE"
"IMAGE_ID" NUMBER(10,0),
"OFFENDER_ID" NUMBER(10,0) NOT NULL ENABLE,
"IMAGE" BLOB CONSTRAINT "SOR_IMAGE" NOT NULL ENABLE,
"THUMBNAIL" BLOB,
"POLICE_VALIDATED" DATE,
"ADMIN_VALIDATED" DATE,
"ENTRY_DATE" DATE NOT NULL ENABLE,
"ENTRY_USER" VARCHAR2(30 BYTE) NOT NULL ENABLE,
"ADMIN_VALID_USER" VARCHAR2(30 BYTE),
"NCIC_VERIFY_DATE" DATE,
"NCIC_VERIFY_USER" VARCHAR2(30 BYTE),
"MIME_TYPE" VARCHAR2(50 BYTE),
CONSTRAINT "SOR_IMAGE_PK" PRIMARY KEY ("IMAGE_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SOR" ENABLE,
CONSTRAINT "SOR_IMAGE_FK" FOREIGN KEY ("OFFENDER_ID") REFERENCES "SORS"."SOR_OFFENDER" ("OFFENDER_ID") ON
DELETE CASCADE ENABLE
Thanks.
Sam

Similar Messages

  • How to change image display of my podcast page in iTunes?

    How to change image display of my podcast page in iTunes?

    As far as I understand you need to update the image's link in your RSS XML file.  Be sure to change the link file name even if it links to a different image.
    The XML files associated with podcasts are checked for changes every 24 hours so don't expect this to happen instantly.

  • How to change images based on action.Even clicking changed images should ?

    how to change images based on action.
    Even clicking changed images should do respective actions.
    and while displaying only one image at a time sholud get displayed.
    I am using three images for a single column of a table in Jsp.
    Any clues.
    Any link for any good javascript html jsp site where i can find some good solution.
    vijendra

    In broad way if i say i have multiple situations in mutiple tables where i need such a logic to operate in for all tables.
    lets say in first time load of page by default one image will be displayed (one with sorted order for first column rest all non sorted)Now after every click to any image respective sort should get called.along with all images should get changed.Here with every function one/two images will get effect at least.
    As in first if i say sort by desc then this image will change rest all will remain in unsort form.
    when i move to other column and click on new image the previos will convert to unsort and new one will convert to sort by ascending. rest all will be in unsort form as it is.
    Now it seems like same logic is required with two three conditions.
    even for everyaction different parametrs has to be passed at differnt situations.
    Any good idea if someone can suggest.
    I will be very greatful for him.
    thanks
    vijendra

  • How to change images dynamically in jsp?

    Hi All,
    i Want to know how to change images dynamically in jsp, for example in any site if u look at advertise or any images, it will be changed after every few seconds.
    Please guide me
    Thanks
    Sandesh S

    sandeshas wrote:
    Hi BlusC,
    i was searching your mail Id to ask the question directly to u,i checked in your blog also, but i didnt get,I want to keep my email spam safe. Only trusted people and direct friends have it. Just use the forums for discussion.
    my question is suppose if i want to display and change the advertise(adds from different company ) in my web site,how can i do it by using jsp?
    Do i need to create animated gifs which contains all company adds??one might be from movie add,after few seconds next one migth be some other web site add like that, how can i achieve this in my servet,jsp or using struts.You create animated gifs with an [animated gif editor|http://google.com/search?q=animated+gif+editor]. There is nothing what JSP can do for you here.

  • How to change the default apex port

    hi,
    i am installed apex4.0 in EBS R12 DB with HTTP Server method. my apex is running from application server 10g and default port is 7777.
    URl: http://hostname:7777/pls/apex
    My EBS R12 running on http://hostname:8007.
    is it possible to change the apex port to EBS Apache port(8007) in R12 and finally i want to change above URL like this
    Before change : http://hostname:7777/pls/apex
    After Change : http://hostname:8007/pls/apex
    Thanks in advanace....

    How to Change the Default SSH Port from Terminal ?
    now showing default SSH Port 22 i need change it pls help me how can do

  • How to  change Image in Portal logon page

    Hi
    we installed the portal EP6SP16.can anybody tell how to change the Standard image with my Company's logo.can any provide the document how to do that.please help
    Regards
    Prasad

    Hi
    Goto System Administration => System Configuration => UM Configuration => Direct Editing.
    In the set of properties listed there, change the value of ume.logon.branding_image to the location of your new image. Don forget to restart the portal server after making changes.
    Place the image in the layout folder of your project which is nothing but the modification of the logon par file (com.sap.portal.runtime.logon.par.bak).
    Regards
    Yoga

  • How to change Images with ImageIcon

    Hello everyone, this is my first post on the forums.
    I am struggling at the moment to find a way to change images in my program. I am making a card game and when the user clicks a button it will replace the card he has with another card. I thought the following code would work but apparently it doesnt:
    String cardPathA = "image1.gif";
    ImageIcon imageCardA = new ImageIcon(cardPathA);   //cardPathA for example is image1.gif
    //during the program the user changes cards so it should now show image2.gif
    cardPathA = "image2.gif";
    imageCardA.setImage(cardPathA);The error occurs when compiling and it reads: "+setImage(java.awt.Image) in javax.swing.ImageIcon cannot be applied to (java.langlString)+".
    I have searched all over the internet and I haven't found anything. I would appreciate some help. Thanks :)

    im not really sure i made a quick example to show how I would change the imageIcon in a button, just change the paths for cardPathA and cardPathB for your pictures to get it working.
    The only other thing i can think of is maybe to call repaint() for the components you are trying to change the image?
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class ImageChange extends JFrame implements ActionListener{
             final private String cardPathA;
            final private String cardPathB;
         private ImageIcon myImageIcon;
            private JButton changeCard;
            private int counter;
            private JPanel panel;
            private JButton imageButton;
         public ImageChange(){       
                changeCard = new JButton("Change Button");
                counter = 0;
                cardPathA = "1.gif";
                cardPathB = "2.gif";
                myImageIcon = new ImageIcon(cardPathA);
                imageButton = new JButton(myImageIcon);
            public void makeGui(){
                changeCard.addActionListener(this);
                panel = new JPanel(new BorderLayout());
                panel.add(changeCard,BorderLayout.NORTH);
                panel.add(imageButton,BorderLayout.CENTER);
                this.add(panel);
                this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
                this.pack();
                this.setVisible(true);
         public void actionPerformed (ActionEvent menuChoice){
                counter++;
                if(counter%2 ==0){             
                    myImageIcon = new ImageIcon(cardPathA);
                    imageButton.setIcon(myImageIcon);
                }else{
                    myImageIcon = new ImageIcon(cardPathB);
                    imageButton.setIcon(myImageIcon);
            public static void main(String[] args){
                ImageChange test = new ImageChange();
                test.makeGui();
    }Calypso

  • How to change image position in PanelStrecthLayout  using css?

    Hi All,
    I am using JDeveloper 11.1.1.6.
    My Scenario is I need to show the image front of the Panel Stretch Layout .I tried to set like Style Class and change the Z-index but it's not working ,
    My Design Like :
    <af:panelStretchLayout id="psl3" inlineStyle="background-color:red" styleClass="ImageStyle">
                          <f:facet name="center">
                            <af:panelStretchLayout id="psl2" topHeight="40px"
                                                   inlineStyle="margin:20px;">
                              <f:facet name="center">
                                <af:panelGroupLayout id="pgl3" layout="vertical"
                                                     inlineStyle="background-color: Green">
                                  <af:panelGroupLayout layout="vertical" id="pgl4"   inlineStyle="margin-top:10px;margin-left:10px;background-color:Green">          
                                  </af:panelGroupLayout>
                                </af:panelGroupLayout>
                              </f:facet>
                            </af:panelStretchLayout>
                          </f:facet>
                        </af:panelStretchLayout>
    My CSS Codes :
    .ImageStyle{
    background-image: url("../img/sampleimage150x100.png");
    z-index:9999;
    background-repeat: no-repeat;
    How to show image in-front of the layout not it's hiding behind the layout ...
    Thanks..

    Hi,
    normally you would use skinning to skin the components. I don't think that layers make a different because with the stretch layout there are no overlapping layers. So maybe we should start with the use case you are trying to implement, I am not sure I understand the sentence: "I need to show the image front of the Panel Stretch Layout". What does this mean "in front" ? Do you want it to hide the panel stretch layout ? What is the use case?
    Frank

  • How to change image in jsp in a web application

    I had created a web application in which I have given the option to change the image in a jsp, and I am saving that image in a folder.
    The image is saved during the run time.But I am not getting that changed image.
    If I restart my server the image is retrieved . What is the solution for getting the changed image during the runtime itself?

    use javascript
    example:
    <img id='img' src="Img1.gif" border=0
         onMouseover="document.getElementById('img').src='Img2.gif'"
         onMouseout="document.getElementById('img').src='Img1.gif'">

  • How to Change Images in fla file

    I have Macromedia Flash MX 2004.  I need to change the images in an fla file for inclusion in a new Web site.  I have inherited an fla file and am just learning the in-and-outs of using Flash.  I have been trying to figure out/learn what to do.  But I am now under a deadline.
    How to I replace the old images with new ones?   Thanks, Betsy

    As you have noticed on the timeline, there are 4 keyframes (black dots connected by a long arrow to the next dot) for each of the image tweens on different layers. Just select the 1st or 2nd keyframe of each layer, you will notice that it will select the image (blue rectangle around it), then double click it to get into the MovieClip's content (the bitmap image). You will see the MovieClip's timeline which is only one frame. Select and delete the Bitmap then drag the new Bitmap into it. Then position it and double click outside the stage to return to the root timeline. Do this for each of the layers and you are done. It is really that simple

  • How to change Image source file name

    Hi,
    I have a logo image on my report that I want to change based on value of my query item. Can someone help me .....how can I change the source of my image item dynamically.
    Thanks
    Aali

    Hello,
    You can use a Formula Column and the property "Read From File" :
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwcontxt/props/pi_col_read_from_file.htm
    Regards

  • How to change image of folder?

    When I try to change the image on my MacBook Pro folder, it only comes up as a preview of a JPEG or GIF. How do I get it to be the actual picture?

    If you want to make a folder appear like an image, one approach is to copy your image to the clipboard, then click on the folder, type command-i to open its info window, click on the folder icon in the info window, then paste (from the clipboard).

  • How to change images

    Hello SRM Experts
    I'd like to know how is possible to change the images of the home page of "SRM Web Layout" on the system of my customer. I'd like to put into its "logo", in this way it will be nicer.
    Thanks
    Andrea

    Hi Andrea,
    Offcourse there is a solution
    First You must upload new image in se80 -> internet services -> bbpglobal  into MIMES,
    then go to eg. login.html and change sap image to yours.
    (don't forget to publish services after upload)
    Check also this link:
    http://help.sap.com/saphelp_srm50/helpdata/en/60/93b74377a911d2b41c006094b92d37/frameset.htm
    Regards,
    Marcin Gajewski

  • How to change image size defaults

    Hi all
    I have a burning question. In CS4, when I use the Image Size command, the default units are centimetres instead of inches under Document Size part of the dialog box.
    I know that keeping rulers set to inches will change that default, but I distinctly remember the time when I was able to keep my rulers set to pixels, and my Image Size to inches at the same time.
    Something changed at some point and I can't figure out what. How can I keep my rulers set as pixels, but the Image Size dialog box to inches at all times?
    -iVan

    Problem solved by a fellow 'shoppist at another forum. He suggested changing the regional settings in control panel and restarting a computer, as he felt that was the culprit. Well, regional settings did it indeed - caught red handed AND with a thong in a purse.
    Allow me to paraphrase a rant I already vented on the aforementioned forum: See, I'm in Canada. That means we're officially metric by executive decision. Only, no one ever bothered to tell us, the mindless minions, so we still scurry about our busy little lives oblivious to the existence of a centimeter, while fully engaged in an affair with an inch (or more).
    Whoops, pardon - here in Canada it's spelled centimetre.
    But every once in a while someone here will stub their toe on a stray "centimeter" (I'm trying to get fired from being a Canadian). And when that happens, since we can't actually see them, we just stare into an empty half-inch space wondering what possibly could have caused a hiccup in space-time continuum.
    Microsoft had other plans though. It planted the invisible centimeters into the operating system that are triggered by regional settings. Settings that are officially metric, even if in reality they don't exist, just like the Hobbits, ET's and southern democrats.
    OK, rant is over!

  • How to change images of selected items in gridview on selection changed event in universal app

    Hi,
    I am developing Universal App. I have bind the images to the Gridview using ObservableCollection. I have set gridview
    SelectionMode as Multiple . I want to change the images of selected items but I don't know how to do in Selection Changed event of Gridview. I got selected items with the help of
    Gridview SelectedItems property. How can i change the images of respected selected items?
    Please reply me asap.
    Thanks in advance.

    Hi, Sorry for late reply,
    Please change the class : 
    public class ImageCollection : INotifyPropertyChanged
    private string source;
    public string Source
    get { return source; }
    set { SetProperty(ref source, value); }
    public int MyProperty { get; set; }
    protected void SetProperty<T>(ref T storage, T value, [System.Runtime.CompilerServices.CallerMemberName] String propertyName = null)
    if (!object.Equals(storage, value))
    storage = value;
    if (PropertyChanged != null)
    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    protected void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] String propertyName = null)
    if (PropertyChanged != null)
    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    public event PropertyChangedEventHandler PropertyChanged;
    XAML
    <GridView x:Name="gd"
    Tapped="gd_Tapped">
    <GridView.ItemTemplate>
    <DataTemplate>
    <Grid Height="300" Width="250">
    <Image Source="{Binding Source}" Stretch="Fill"/>
    <Grid Height="100" Background="#B2000000" VerticalAlignment="Bottom">
    <TextBlock Text="{Binding MyProperty}" FontSize="25" />
    </Grid>
    </Grid>
    </DataTemplate>
    </GridView.ItemTemplate>
    </GridView>
    C#
    //ObservableCollection of class
    ObservableCollection<ImageCollection> img = new ObservableCollection<ImageCollection>();
    public MainPage()
    this.InitializeComponent();
    img.Add(new ImageCollection() { MyProperty = 1, Source = "ms-appx:///Assets/Logo.scale-100.png" });
    img.Add(new ImageCollection() { MyProperty = 2, Source = "ms-appx:///Assets/2.jpg" });
    img.Add(new ImageCollection() { MyProperty = 3, Source = "ms-appx:///Assets/3.jpg" });
    img.Add(new ImageCollection() { MyProperty = 4, Source = "ms-appx:///Assets/4.jpeg" });
    gd.ItemsSource = img;
    private void gd_Tapped(object sender, TappedRoutedEventArgs e)
    GridView gv = (GridView)sender;
    ImageCollection ic = gv.SelectedItem as ImageCollection;
    ic.Source = "ms-appx:///Assets/4.jpeg";
    gv.UpdateLayout();
    I have used  INotifyPropertyChanged now UI is not fluctuate 
    and I have not bind again O-Collection.
    I hope so You will get right answer. 
    shah

Maybe you are looking for

  • Apple Multiple Scan 1705 - usable with modern video cards?

    I still have an old Apple Multiple Scan 1705 display which I've been using continuously since ~1995. Even though I don't have a Mac anymore (I know, I know, mea culpa), I hooked it up to my PC and it has worked great. But, I recently received a newer

  • 24 inch iMac Screen problems after 10.5 upgrade

    After upgrading to 10.5 i have had many issues with the display my iMac (white) 24inch Core 2 Duo. I have corruption resulting in horizontal lines across open windows and in some cases on the desktop itself. Some of the button text turns bright green

  • Creating aVirtual directory Using java

    Hai , I am Using windows XP Operating system, I know how to create a directory using java, can you please suggest me a procedure to create a virtual(web share ) directory using java. waiting for your reply Thanks & Regards, Naga Raju

  • SBOPriceList Synch Error

    Hi, I keep getting the following SBOPrice error on every synch: NPBase - more than one object found.    at netpoint.api.NPBase.PopulateFromReader(String sql, DataParameters dp)    at netpoint.api.NPBase.Fetch(String[] keys)    at netpoint.api.catalog

  • Adobe LiveCycle Access Field in Subform inside Master Page

    Hello, I have a Dynamic PDF document created in LiveCycle 8.2 with the following structure topmostSubform           (Master Pages)                   Page1                         sfHeader                                txtName When I try to assign th