Skip to Content
author's profile photo Former Member
Former Member

how to display image in view

Hi ,

I want to display an image in my one of the views?? How to do it??

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 07:50 AM

    Hi kavita,

    You can achive this using the image UI.

    Insert the image UI in the corresponding view.

    1. Import the image to ur project

    src->mimes->components->(package) -><file.jpg>

    2.Set the image UI properties

    alt-><file.jpg> Or use a context

    source-><file.jpg> or context.

    Regards

    karthik.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 08:06 AM

    Hi Kavitha

    first copy XX.gif into "project/src/mimes/components/<packagename>"

    1) First insert a Child "Image" UI Element

    2) Create a Context in a view in which you are using Image UI Element

    3) Value Node

    Name : Image

    Cardidality : 1..1

    4) create 2 Value Attributes

    4)a ImageAlt (Calculate property - true)

    4)b ImageSrc (Calculate property - true)

    5)Bind the properties of Image

    alt - Image.ImageAlt

    source - Image.ImageSrc

    6) in getImageSrc()

    {

    retrun "XX.gif"

    }

    7) in getImageAlt()

    {

    return "Image Not Available"

    }

    Regards

    Chaitanya.A

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 30, 2007 at 09:03 AM

    Hi Kavita,

    Go to the Navigator tab and open the project.

    copy the image to src->mimes->components->componentFolder->

    Go to your view and add an image UI element here.

    go to the property "source" and then click on browse and select the component image.

    Feel free to ask queries.

    Regards,

    Praveen

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 07:47 AM

    Hi,

    First Keep your image in Sample.jpg in c:\program files\<installation directory>\src\mimes\components\<ur component name>\Sample.jpg

    U can display .JPG,.BMP,.GIF

    1)Insert Image UI element

    2)create an attribute IMAGE and set calculated=True in attribute properties

    3)It generate two methods getImage() and setImage() methods

    4)Bind the image attribute to image UI element

    5)write the following coding in

    getImage()

    {

    return "sample.jpg"

    }

    6)u have to specify the Image name correctly if it is in uppercase or lowercase

    Otherwise,

    Insert Image UI element then click image properties---->Source=Sample.jpg

    Directly u type the image name Sample.jpg in that source and press Enter,automatically it will bind with tickmark. Then deploy it works...

    Regards,

    Suresh.T

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 08:03 AM

    Hi Kavita,

    1. Copy your image from local machine.

    2. Open Navigator view of your project and navigate to the folder

    <project>>src>mimes>Components><name of the component along with package>

    Paste your image over here

    3. Insert an Image UI element in your view.

    4. Set its imageSource property to the name of the image that you pasted in the folder in step2 along with its extension and remember name is case sensitive.

    5. Build your application.

    6. Deploy and run.

    Regards,

    Murtuza

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.