How to show an Default Image in case of Image  src attribute is pointing to  null

Hi ,
I am displaying Images on to DataGrid by reading an XML File .
This works fine if the Image src is prsent.
Now my question is that sometimes the Image  src might be null , then in which case i need to
display some default Image .
<mx:HBox id="hBox">
<mx:Image source="{rep.currentItem.@src}"/>
</mx:HBox>
<images>
<image src="images/One.png" />
<image src="images/Two.png"/>
<image src=""/>
</images>
Please tell me as how to show an Default Image in case of Image  src attribute is null .
Please share your ideas on this .
Thanks in advance .

bind the image source to a function
<mx:Image source="{getImage()}"/>
then write a function to detect if an image is present
private function getImage():String
     if  ( rep.currentItem.@src == null)
          return "default.png";
     else
          return rep.currentItem.@src;

Similar Messages

  • Slide show using default images on Pause

    Why is my AppleTV showing the default Apple Pictures for the screen saver slide show whenever the the is paused. It shows my Flickr pictures when the AppleTV is not Paused.
    Is anyone else experiencing this problem?

    After several AppleTV updates this problem still exists. When ever a show is in Pause mode and the screen saver kicks in it uses Apples default photos and not the Flickr albums that are normal shown when a show is not in Pause mode. Anyone have any ideas on how to fix this?

  • How to show a background image in the Forms 6i MDI window?

    Hello,
    We are using Oracle Forms 6i Release 2 Patch 18 on Windows XP in client/server environment (not web server).
    Is there any way to show a background image in the MDI root window without using DLL injection to subclass the MDI root window procedure.
    Kurt

    Please try this 
    Public Function Decompress(ByVal arr As Byte()) As Byte()
            Dim s As Byte()
            Dim notCompressed As Boolean
            notCompressed = False
            Dim MS As System.IO.MemoryStream
            MS = New System.IO.MemoryStream()
            MS.Write(arr, 0, arr.Length)
            MS.Position = 0
            Dim stream As System.IO.Compression.GZipStream
            stream = New System.IO.Compression.GZipStream(MS, System.IO.Compression.CompressionMode.Decompress)
            Dim temp As System.IO.MemoryStream
            temp = New System.IO.MemoryStream()
            Dim buffer As Byte() = New Byte(4096) {}
            While (True)
                Try
                    Dim read As Integer
                    read = stream.Read(buffer, 0, buffer.Length)
                    If (read <= 0) Then
                        Exit While
                    Else
                        temp.Write(buffer, 0, buffer.Length)
                    End If
                Catch ex As Exception
                    notCompressed = True
                    Exit While
                End Try
            End While
            If (notCompressed = True) Then
                stream.Close()
                Return temp.ToArray()
            Else
                Return temp.ToArray()
            End If
        End Function
    Thanks & Regards Manoj

  • How to show a compressed image in the report?

    Hi
    I have created a new report.what i do in application is i  compress the image and save it in database.now i need to retrieve the compressed image and display in the report. I have used the following code to decompress the binary data save in the image.I
    dont know after that what should i do. Please help me to show the picture in SSRS Report. I need to show picture in many reports.one of my doubt is how to call this function in SSRS Report. The function accepts input as byte but in database the column in varbinary.
    should i convert the input type of function to varbinary instead of byte array? Please help me.
    Public Function Decompress(ByVal arr As Byte()) As Byte()
    Dim notCompressed As Boolean
    notCompressed = False
    Dim MS As MemoryStream
    MS = New MemoryStream()
    MS.Write(arr, 0, arr.Length)
    MS.Position = 0
    Dim stream As GZipStream
    stream = New GZipStream(MS, CompressionMode.Decompress)
    Dim temp As MemoryStream
    temp = New MemoryStream()
    Dim buffer As Byte() = New Byte(4096) {}
    While (True)
    Try
    Dim read As Integer
    read = stream.Read(buffer, 0, buffer.Length)
    If (read <= 0) Then
    Exit While
    Else
    temp.Write(buffer, 0, buffer.Length)
    End If
    Catch ex As Exception
    notCompressed = True
    Exit While
    End Try
    End While
    If (notCompressed = True) Then
    stream.Close()
    Return temp.ToArray()
    Else
    Return temp.ToArray()
    End If
    End Function
    Thanks & Regards Manoj

    Please try this 
    Public Function Decompress(ByVal arr As Byte()) As Byte()
            Dim s As Byte()
            Dim notCompressed As Boolean
            notCompressed = False
            Dim MS As System.IO.MemoryStream
            MS = New System.IO.MemoryStream()
            MS.Write(arr, 0, arr.Length)
            MS.Position = 0
            Dim stream As System.IO.Compression.GZipStream
            stream = New System.IO.Compression.GZipStream(MS, System.IO.Compression.CompressionMode.Decompress)
            Dim temp As System.IO.MemoryStream
            temp = New System.IO.MemoryStream()
            Dim buffer As Byte() = New Byte(4096) {}
            While (True)
                Try
                    Dim read As Integer
                    read = stream.Read(buffer, 0, buffer.Length)
                    If (read <= 0) Then
                        Exit While
                    Else
                        temp.Write(buffer, 0, buffer.Length)
                    End If
                Catch ex As Exception
                    notCompressed = True
                    Exit While
                End Try
            End While
            If (notCompressed = True) Then
                stream.Close()
                Return temp.ToArray()
            Else
                Return temp.ToArray()
            End If
        End Function
    Thanks & Regards Manoj

  • How to show 'now playing' Image in bottom left, How to show 'now playing' Image in bottom left

    Hi,
    On my iTunes (10.7) in the bottom left corner it shows an image of the music you are currently playing titled as Now Playing.
    I am trying to get the same thing on my father's iTunes, his is also v10.7 but no 'now playing' section. How can I enable this? I can't seem to find it in the 'view' menu either..
    Thanks,
    Jamie

    Try clicking the wee icon I've circled in the following screenshot:

  • How to show a tif image

    I want to show a tif in a JLabel
    I know Java work with gif and jpeg, but what 's about tif ?

    Well, you need a tiff decoder. AFAIK the new ImageIO API supports tiff, but if you're after something smaller I'm sure you'll find something useful from http://www.geocities.com/marcoschmidt.geo/java-image-coding.html

  • HOW TO SHOW A DEFAULT VALUE IN AN UPDATABLE TABULAR FORM

    I have an updatable form that has three columns:
    Employee Name (display only)
    Reporting Name (select list)
    Element Type ID (hidden and updatable)
    When the user select a value in the reporting name column it updates the
    element type id with the appropriate value. But when they look at the select list
    it has the select list values as well as the selected value in the list. How do I
    overcome this. My example is setup and ready to be reviewed at http://apex.oracle.com/pls/otn/f?p=32409:1
    Thank you
    Forrest
    p.s. weather in Anchorage Alaska Sunny and 45 degrees!

    Woody,
    I'm a little confused (not uncommon), as I don't understand why you have a hidden column to hold the element_type_id value.
    It looks like you're doing a simple SELECT LIST/LOV that shows the display value and stores the code value. I guess I don't understand why you need the hidden column. Shouldn't the code value end up in the APEX_ITEM array, so you can save it to your table?
    I would think you'd have a hidden value to hold the primary key for your table in one APEX_ITEM array, and the element_type_id column is the second parameter of the APEX_ITEM.SELECT_LIST() call. Then your manual update procedure saves that value to the right record, using the primary key from the hidden column?
    What am I missing here?
    Good luck,
    Stew

  • How to show full size images from a thumbnail view?

    Hi,
    I am trying to setup a simple portfolio of projects. I have a series of 4 screen dumps of some web work I did, and they have to be greatly reduced in size so they can all fit on one page. I'd like to be able to have the user click on any of the 4 screen shots (imported png files) and then see a full size image. I know how to do this basically in plain html, but uncertain how to set this up with iWeb. Do I need to create 4 new pages with the full size images on them? Or is there an easier way.
    thx
    'mark

    mark:
    The method described on this demo page is one way you can accomplish what you want: Opening Item in a New, Precisely Sized Window.
    Another method can be seen here: Fancy Zoom.
    There are a number of flash based slideshows that might do what you want. Check out these:
    Jalbum
    SimpleViewer and Flash Album Exporter
    Mouse Over
    OT

  • In Lists - How do you write an Image and Attributes in the defined fields?

    I have tried #IMAGE_PREFIX#load_ascii.gif with no results..
    then tried /i/load_ascii.gif
    then tried load_ascii.gif
    Can you give me an example or something else is wrong because just a diamond bullet is showing up? Trying to emulate the Run icon in the Application Developer's home Page.. or is this the wrong way of doing it?

    Using a list, I want to apply an image from the /i/ folder. In the List Entry Area under Label and Sequence I tried several syntax varations with no luck in the Image and Image Attributes Fields. With the List Entry Label I want to display and Icon (Image) they can click on with the List Entry Label below the image.. I've tried #IMAGE_PREFIX#load_ascii.gif with no results..

  • How to make a single image with multiple clickable points?

    Hi,
    I just started using CS4 yesterday, but am pretty confused. I managed my first little achievement with it, but am havign troubles. I'm not even sure of the capabilities of the software to be honest, but I would like to know if I can have a single image, then have sections of it which can be hovered over with a tag and a link to another part of my site. Is this something that can be done?
    Thanks!

    Hi,
    to reach several different links on the image you need to create so-called hotspot (I had to translate the following terms from my German Dreamweaver). How to do?
    Click into the image
    Open properties window
    Open list box orientation.
    Surround the image parts in question (look at the green arrow). Feel free/play with chosen forms.
    Hans-G.
    P.S.
    You shouldn't use only images on your site.

  • How can i rotate an image by a pivot point?

    Hello,
    i have a problem, the Imaq Rotate VI only rotate an image by its center. My problem is i need to do this by a known pivot point. How can i achieve this?
    Thank you,
    Francesco.
    Solved!
    Go to Solution.

    can this post help?
    http://forums.ni.com/t5/LabVIEW/Rotate-an-Image-by-specified-pixel/td-p/2570453
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13

  • Default Image with created Method on HTML Client

    Hi,
    I have an entity called "Users" and I would like to show a default image for the user when New User screen appears.
    Somebody knows how to achieve that on the "created" method of entity for HTML (JavaScript)?
    Thanks in advance!
    Jesús

    HI Helmut,
    When you help secure your application, the final step is to publish it. When you publish for the first time, you must provide authentication information for a default administrator. When you publish again, you don’t have to repeat this step.
    To provide authentication information when you publish an application
    1.  
    In the LightSwitch Publish Application Wizard, choose the Security Settings page, and then choose the Yes, create an Application Administrator option button.
    2.  
    In the User Name text box, enter a username.
    3.  
    If you’re using Windows authentication, you must specify a valid Windows logon name that has the form Domain\Username.
    For this issue, you can also repair your Lightswitch, and check whether it helps fix it.
    For this issue, here are a few suggestions that might help:
    •Clean and Rebuild - Cleaning and rebuilding your current Project (Right-click > Clean, Right-click Rebuild respective) and see if that makes any difference at all. 
    •Consider Restarting Visual Studio - If these issues are still persisting after the above steps, try restarting Visual Studio (and even your local machine
    Please let me know if there is anything that I can do to help.
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to include a default value in Dynamic cascading prompt from 2nd Level.

    Hi,
      I use Command Object in 'Datbase Expert' to create 'Custom Tables'  and use these tables to fetch LoVs. I use Dynamic Cascading Prompts in the reports.  I have a peculiar requirement using DCP.
      There are Four Levels as in the Example:
      Continent
       Country
       State
       City
      In the Custom Table, requirement is to create an additinal row with '' that represents 'All Values selected' for that level starting from second.  and The default selection should be '' . I defined that '*' means 'All Vales Selected in the report' This si not a problem. But the problem how to show a default value in a Dynamic Cascading Prompt i.e. how we can make sure in an default value can be selected in DCP from Second Level?
    how can the examples 1,2,3 can be achieved detaisled below beacsuse we need to show a default value in Casacading Propmt
    Eg of Schedules with DCP:
    Schedule 1   
      Continent: Europe
       Country: *
       State: *
        City:  *
      Schedule2:
       Continent: Europe
       Country: England
        State: *
         City: *
    Schedule 3:
        Continent: Europe
       Country: England
        State: Greater London
         City: *
    Schedule 4:
    Continent: Europe
       Country: England
        State: Greater London
         City: City of london

    You won't be able to have a true "default" value in the various cascading levels, since there aren't default values in a dynamic cascading parameter.  That being said, I've created a sample report in Crystal Reports 2008 that has a Command-driven DCP with '*' values for the 2nd and 3rd levels of my 3-tier DCP and have accounted for them in the record selection criteria.  You can find the sample here at https://www.box.net/shared/mav5qp337j

  • How to set the default values for fields

    Hi all,
    How to show the default values without changing the existing code in the CO for the seeded page.
    I have requirement like one drown box in that three values are there. On page load the item is empty , but i have to show first value as default value. Is this possible through personalization..
    Can any body have idea pls give some suggession.
    Thanks
    Uma

    Considering you don't want to go for controller extension..
    A way is to use java script in personalization.
    Simply create a RawTextBean using personalization and add the java code to change the properties.
    Java script plan:
    Get the handle of the items to change (like here drop down)
    selectTags=document.getElementsByTagName('select') --gives list of all the select tags in the page
    get ID of the select tag whose value you want to change (loop throug selectTags array).
    or get it directly by getElementsByName method or getElementsByID mETHOD.
    Say its handle is changeItemID.
    changeItemID.selectedIndex=2
    Overview of script
    <SCRIPT type="text/javascript">function _checkLoad(eventXX){
    --yOUR CODE FOR GETTING handle Of the select item whose value is to be changed,goes here...
    changeItemID.selectedIndex=2
    }</SCRIPT>

  • How I configure a default value in an entity object?

    Hi,
    1:how I configure a default value in an entity object?
    attribute type: DATE
    I want to set the current date
    ...thanks

    Override the create() action in your entity object implementation:
    protected void create(AttributeList attributeList)
    * This method should be subclassed to supply programmatic default values to
    * various attributes of a new Entity Object. For example, to create a sequence.
    * Instances of subclasses should call super.create() before performing any operations.
    System.out.println("create(AttributeList attributeList) - start");
    Date datSysdate = ( oracle.jbo.domain.Date) Date.getCurrentDate();
    super.create(attributeList);
    // set the default to today...
    setHiredate( datSysdate );
    System.out.println("create(AttributeList attributeList) - end");
    }

Maybe you are looking for

  • Help with "Sort Artist" please

    Hi all What I'm trying to do is use iTunes to make it so that tracks that are by different artists appear under the same artist when I go through the "Artist" field on my iPod Touch. For example, I've got songs that are by Prince & the Revolution, so

  • IRecruitment in DMZ

    Hi Apps Gurus, We have a situation where we need to take the Irecruitment external and we want to make it as a secure connection. Our envirionment is like this: OS- RHEL AS4 APPLICATION - Oracle 11.5.10.2 Two tier System where DB, admin and concurren

  • Upgraded a new MBP from its updated 10.7.5 to 10.8.2, but no updates to get after it?

    Hello. I upgraded my client's new MBP from its updated 10.7.5 to 10.8.2. It appeared to be a success after the long wait (took a short nap). There are no updates found from both Software Updates and App Store? Did all the updating in 10.7.x's Softwar

  • Missing google play app from phone

    my xperia z1c had the app before, but after an authorized service center replaced my phone's board due to damage, the app went missing... it's supposed to be a built-in app, now i can't download apps from google.....can anyone help me?

  • I have the first version of the iPad and lost my wifi.

    I couldn't understand why I lost my wifi on my first version ipad.  I did a hard reboot and I attempted to sync it to my new mac computer.  I soon realized all my old apps and wifi option on my ipad disappeared.  My old computer has a virus and I att