Displaying of image in table cells

Hi,
I have a requirement where i need to display an image in table cell editor. Can anyone please tell how to do this.
Thank You,
Madhavi

Hi
The link is related to the same code as well..
First copy all your images into "project/src/mimes/components/<packagename>"
1) First create a new column for image and insert 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()
//according to your condition use your image
retrun "XX.gif"
7) in getImageAlt()
return "Image Not Available"
Case 2 :
1) Add a new String attribute to your existing context
2) Right click on your table in RootUIElememntContainer
3) Edit Sturcture Binding
4) Select the context which you modified , Select next
5) in the next step for the newly created attribute select imageUIElement as type
If you want to use that in wdDoinit()
bind the two string value attributes to alt and source properties of ImageUIElement and write the following code
in doinit
wdContext.currentContextElement.set<src>("img1.gif") ;
wdContext.currentContextElement.set<alt>("Image not found") ;
Best Regards
Chaitanya.A

Similar Messages

  • Add image to Table cell

    Hi All,
       Based on condition how can i add image to Table cell.

    Hi,
    Its very simple and straightforward.
    All you need to do is:
    1...Create a context(value attribute) of type string.
    2...I am assuming that you have created a table, and mapped its columns with a node.
    3...In the <i>TableCellEditor</i>  of your desired column, map the above context with the <i>imagesource</i> property.
    4...In the code, set the value of this context to the image name(eg: abc.gif), on satisfying of a condition.
    5...However, keep in mind to set the context value to some default blank image in the doinit() of the view, else, you will get a null pointer exception.
    I hope this solves your problem.
    Keep posting if you have any further queries.
    Regards,
    Hanoz

  • How to display an image in particular cell editor

    Hi All,
    I want to display an image as the background for the table cell.
    I searched in sdn and found the solution only for link to action.
    I have created a dynamic table and if i click on apply button one more row is getting added according to my requirement.
    I want to differentiate this row from rest.  So I need to display image for the last row in the table which is added newly. 
    Can anyone suggest the procedure for adding an image in a particular cell editor along with the table data?
    Hope I am clear with my requirement.
    Pls suggest.
    Regards,
    subashini

    Hi,
    IF iam not wrong then for some rows u need to show text data and for some rows u need to show image data.
    follow the following steps.
    1. In ur table add cell editor of type Image.
    2.Create a value node with one more than required attributes.
    3.Suppose if need to show only one column then i will create  
       value node with two attributes.One attribute will be for text
      data and one will for Image.
    4.now access ur table cell editor dynamically.For image type
      cell editor we need to play only with two properties source
    and alt.Bind this alt property of editor wid that attribute which u
    need use for text data and source wid that attribute which u
    need to use for image.
    5.  Now suppose I need to show text data then
    I will create one element of that value node.In case of Image
    type cell editor source property  is given prefrence over alt
    property.
    set attribute which is bound to alt to the actual text data
    i.e setText("Actual text data");
    and set attribute which is bound to source to some dummy
    image name
    i.e setImage("dummy.gif");
    add this to node.
    during execution as source property of editor is bound to
    Image attribute of node  which in turn is set to dummy value it
    wont find actual source and will set Image cell editor with
    watever is bound to alt property which in turn set with actual
    text value..
    6.  Now suppose I need to show Image data then
    I will create one element of that value node.In case of Image
    type cell editor source property  is given prefrence over alt
    property.
    set attribute which is bound to alt to blank value 
    i.e setText("");
    and set attribute which is bound to source to some Actual 
    image name
    i.e setImage("Image.gif");
    add this to node.
    during execution as source property of editor is bound to
    Image attribute of node which in turn is set to Actual image file
    it will  set Image cell editor with that image name  and wont look for alt property.
    Copy all ur images in src->mimes->components->ur package
    Regards
    Surender Dahiya

  • Images in Table cell

    HI,
    I have to display different images in a SAP .Net tabe control cell depends on the field values from a database. I set the Tabel cell editor property to "Image Instance" and programatically assign the relative path of the image "web resourcesimagesxxx.gif" according to the database field values. I can see at runtime the web source have correct URL to the image source but the image is not getting displayed on the iView. What am I doing wrong?? I follow this article to do the code part
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/nw/dotnet/pdk for .net faq - .net controls.faq
    Please help.
    thanks

    Thanks for the reply guys,
    Here is the code; I'm not using server "itemDtaBound"
    I set the field type as "image instance" at design time and at runtime after reading the data assign the graphics to the control according to the value returned from the database at the Page_Load
    I only took the relevant portion
            Dim sOrderByField As String = ""
            Dim sqlDate As String = FormatDBDateTimeSQL(Format(Now, "MM/dd/yyyy 00:00:00"))
            'Dim ConnStr As String = "server='(local)'; trusted_connection=true; database='tllink'"
            sSQL = "SELECT EmployeeName, BadgeId, Punch_Type,Punch_Date, Punch_time, TerminalID FROM TERMINAL_TRANSACTIONS"
         sSQL &= " WHERE (Punch_Date =" & sqlDate & ") AND (Punch_Type IN ('IN', 'OUT' ,'DEPT' )) AND ((CAST(Punch_Time AS VARCHAR) + '-' + BadgeId) IN"
            sSQL &= " (SELECT (CAST(MAX(PUNCH_TIME) AS VARCHAR) + '-' + BADGEID) FROM TERMINAL_TRANSACTIONS"
            sSQL &= " WHERE  (Punch_Date =" & sqlDate & ") GROUP BY BADGEID))"
    rRec = g_cDB.GetRec(sSQL, , True)
    OleDbDataAdapter1.Fill(dSQLSet,rRec, "TERMINAL_TRANSACTIONS")
            'SQLTable = dSQLSet.Tables(0)
            Dim RowCurrent As DataRow
            Dim tr As SAP.Web.UI.Controls.TableRow
    For Each RowCurrent In dSQLSet.Table("TERMINAL_TRANSACTIONS").Rows
                tr = New SAP.Web.UI.Controls.TableRow
                If IsDBNull(RowCurrent("EmployeeName")) = False Then
                    tr.Cells.Add(New SAP.Web.UI.Controls.TableCell(New TextView(RowCurrent("EmployeeName"))))
                Else
                    tr.Cells.Add(New SAP.Web.UI.Controls.TableCell)
                End If
                If IsDBNull(RowCurrent("badgeid")) = False Then
                    tr.Cells.Add(New SAP.Web.UI.Controls.TableCell(New TextView(RowCurrent("badgeid"))))
                Else
                    tr.Cells.Add(New SAP.Web.UI.Controls.TableCell)
                End If
                If IsDBNull(RowCurrent("Punch_Type")) = False Then
                    If RowCurrent("Punch_Type") = "IN" Then
                        tr.Cells.Add(New SAP.Web.UI.Controls.TableCell(New SAP.Web.UI.Controls.Image("Web Resources/Images/in.gif")))
                    ElseIf RowCurrent("Punch_Type") = "OUT" Then
                        tr.Cells.Add(New SAP.Web.UI.Controls.TableCell(New SAP.Web.UI.Controls.Image("Web Resources/Images/out.gif")))
                    Else
                        tr.Cells.Add(New SAP.Web.UI.Controls.TableCell(New SAP.Web.UI.Controls.Image("Web Resources/Images/transfer.gif")))
                    End If
           End If
           Me.DataTable.Items.Add(tr)
    Next
    My table displays the employee name and badge id but the images are coming as broken link. I added the images to the web resources before deploying the par.
    The follwing is the runtime source from the browser
    </td></tr><tr rr="1"><td tableid="tae241ba0_DataTable" cc="0" rr="1" class="urSTTD urSTTDBdr1" style="padding:0;"><div tabindex="0" ti="0"><span ct="TextView" style="margin:0px;"></span></div></td><td tableid="tae241ba0_DataTable" cc="1" rr="1" class="urSTTD urSTTDBdr" style="padding:0;"><div tabindex="0" ti="0"><span ct="TextView" onkeydown="sapUrMapi_TextView_menuActivate('',event)" class="urTxtStd" style="white-space:nowrap;">000000000003412770</span></div></td><td tableid="tae241ba0_DataTable" cc="2" rr="1" class="urSTTD urSTTDBdr" style="padding:0;"><div tabindex="0" ti="0"><img class="urImg" src="/irj/portalapps/Timelink_Portal_APP/Images/green.gif" ct="Image" border="0" style="height:28;width:30;"></img></div></td><td tableid="tae241ba0_DataTable" cc="3" rr="1" class="urSTTD urSTTDBdr" style="padding:0;"><div tabindex="0" ti="0"><img class="urImg" src="/irj/portalapps/Timelink_Portal_APP/Images/in.gif" ct="Image" border="0"></img></div></td><td tableid="tae241ba0_DataTable" cc="4" rr="1" class="urSTTD urSTTDBdr" style="padding:0;"><div tabindex="0" ti="0"><span ct="TextView" onkeydown="sapUrMapi_TextView_menuActivate('',event)" class="urTxtStd" style="white-space:nowrap;">2/10/2006</span></div></td><td tableid="tae241ba0_DataTable" cc="5" rr="1" class="urSTTD urSTTDBdr" style="padding:0;"><div tabindex="0" ti="0"><span ct="TextView" onkeydown="sapUrMapi_TextView_menuActivate('',event)" class="urTxtStd" style="white-space:nowrap;">07:24:58</span></div>
    as you can see it includes the path to th images green.gif and in.gif
    thanks

  • What's the best way to place images in table cells?

    I'm working on a basic tooling catalog/list using a table for all of the information.  One of the columns is for an image of the tool.  Is there a way to place each image in a cell and have it resized to fit the cell dimensions (including my text inset settings)?  I'm using CS4 and the images are all tiff files, although I also have psd files of each.  Any suggestions would be appreciated.

    Table cells don't adjust automatically except in the vertical direction when set to "at least" some dimension, and I suspect you don't really want that anyway. Keep in mind that column width is constant through the whole table, so fitting the cell to the largest image is going to give you a giant coumn width that isn't used for smaller product shots in the same table.
    What about making an image frame the size you want, and setting the fitting options to fit proportionally? Copy that frame and paste into the cell, then place the image in the frame.

  • Background Image In Table Cell

    I'm not sure what I'm doing wrong or missing here. This is the first time that I'm using an image as a background. I've made a table with a 100% width with 3 colums and 3 rows. The left and right table cells have been merged and the 3 middle rows are at a width of 938 pixels. I have cropped the images correctly. The right column lines up perfectly, but the left column does not line up like it's supposed to with the image. You can take a look at it by going to http://www.wattsconcepts.com/new
    Here is the code below if anyone wants to take a look at it. Any help in solving this is greatly appreciated. I am using Dreamweaver CS5.5
    Thank you for your time!
    <!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=utf-8" />
    <title>Watts Concepts - Kentucky Web Design - Harrodsburg, Kentucky</title>
    <style type="text/css">
    body {
              margin-left: 0px;
              margin-top: 0px;
              margin-right: 0px;
              margin-bottom: 0px;
              background-color: #000;
              background-image: url();
    </style>
    </head>
    <body>
    <table width="100%" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td rowspan="3" align="left" valign="top" background="images/left-index.jpg"> </td>
        <td width="938" align="center" valign="top"><img src="images/logo-index.jpg" width="938" height="172" /></td>
        <td rowspan="3" align="left" valign="top" background="images/right-index.jpg"> </td>
      </tr>
      <tr>
        <td align="center" valign="top"><img src="images/eye-index.jpg" width="938" height="296" alt="Reach Your Audience Today" /></td>
      </tr>
      <tr>
        <td align="center" valign="top"><img src="images/test-index.jpg" width="938" height="197" /></td>
      </tr>
    </table>
    </body>
    </html>

    Your HTML code should ideally be as follows:
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Watts Concepts - Kentucky Web Design - Harrodsburg, Kentucky</title>
    <style type="text/css">
    body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    background-color: #000;
    </style>
    </head>
    <body>
    <table width="938px" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="938" align="center" valign="top"><img src="images/logo-index.jpg" width="938" height="172" /></td>
      </tr>
      <tr>
        <td align="center" valign="top"><img src="images/eye-index.jpg" width="938" height="296" alt="Reach Your Audience Today" /></td>
      </tr>
      <tr>
        <td align="center" valign="top"><img src="images/test-index.jpg" width="938" height="197" /></td>
      </tr>
    </table>
    </body>
    </html>
    Also, you don't need 3 columns for this website. 1 column and 3 rows should do. Also, never use 100% for <table> width. It's bad practice as you're making your site fluid which will render your site to malfunction on some browsers
    And you had the entire 3 sections as 1 image as your CSS body background-image. This is bad practice. Crop only what you want for each section, never give the entire merged site as 1 image.
    Try the code I've given you above and it should work perfect.
    A quick tip: Try learning and using DIV with pure CSS styling instead of tables. Tables are a thing of the past. You could just google it and you have tons of free resources on how to create a site using DIV. Also, there's a beautiful tutorial posted by one of our senior members here: http://www.adobe.com/devnet/dreamweaver/articles/dw_html5_pt2.html that explains how to create HTML5 site with Pure CSS styling using DIV tags.
    Cheers,
    ST

  • Place image in table cell in pages for iOS 5

    Can I place an image into a table cell in pages for iphone? This would keep me from having to take my expensive MBA out on the dangerous (for the computer) jobsite.  It would change my life to be able to do this on the iphone as my reports require it.  As of yet I've found no way to do this.
    Thanks in advance for your help!
    ~CR

    Put the text cursor in the cell and use the regual Place command. The image will be placed as an inline graphic in the empty paragraph.

  • Insert shape over image in table cell

    Want to use circles, ovals, lines with arrows to point to some part (text or image) of a cell in a table.
    Need to emphasize certain areas of graphics in a document used as a step by step type document.
    If I add the shape outside the table and then try to drag/drop on to the image in the cell, the entire cell jumps to a new empty cell.
    Can nod get image to appear over the image in the table cell.

    Hello,
    do you think about this, please have a look here: http://help.adobe.com/en_US/dreamweaver/cs/using/WSc78c5058ca073340dcda9110b1f693f21-7b86a .html.
    Another way, to add text over an image uses Nancy O.'s Demo here (I would prefer by using PS or similar):
    http://alt-web.com/DEMOS/CSS-Sold-Out-Text-over-image.shtml
    Hans-Günter

  • How to display system date on table cells

    hi all,
    I would like to display the PC date onto a specified cell on a table. I have attached here my vis. I don't know how to get the date displayed at the table cell On the front panel when I run it. Please help.
    Attachments:
    data.vi ‏32 KB
    getPCdate.vi ‏9 KB

    Hi,
    The table control is simply a 2D array of string. So all you need to do is to pick up the Date from the appropriate .vi and replace the array element (using replace array subset) and write the whole table back again. (Example attached for LV 6.0.x)
    // it takes almost no time to rate an answer
    Attachments:
    Untitled_1.vi ‏13 KB

  • Displaying ssize_t value in table cell

    Hello,
    I want to display a number of type ssize_t in a numeric table cell. In the UI editor, the cell has been set to intptr_t.
    Running the code in debug64 works fine, in debug I receive the error message:
    FATAL RUN-TIME ERROR:   Invalid argument type: found 'int', expected '__int64'.
    I have to add: in the UI editor I have created the table with one row only, I add more rows programmatically using InsertTableRows (but the cell types should be inherited). The error only shows up when filling the cell of the last row.
    Ideas?
     

    LuisG wrote:
    However, the (5,1) cell that you already have still has int64. This must be because you created that row before you changed the data type for future cells.
    Hi Luis,
    thanks - you are correct (of course )
    But...
    If I change the default values there is a popup that tells me exactly this.... But it also seems to offer applying those changes to the existing cell. However it appears that clicking Yes has no effect...
    I agree that it is my fault, I misunderstood this statement - it does not promise to actually apply the value, it only asks if I would like to... 

  • Images as table cell content

    Hi,
    we are using thumbnail images for representing some employee status in a table. Images are displayed successfully.
    Problem is the white space between two cells, we want to eliminate the space between two cells. I have tried cell width property but it doesn't help.
    Any other suggestions to achieve this.
    Thanks a lot.
    Rgds

    Hi Sharanya,
    I could not find property cell spacing and cell padding property for cell.
    I am on Nw04.
    Is there other way we can achieve this.
    Rgds

  • Adding Image to table cell

    hello,
    I want to add Image related to particular file to cell of the JTable,
    I already have name of the file in cell but want to display file or directory name with its related icon.
    i am using TableCellRenderer ,but don't know how to keep both filename and icon.
    tell if you are aware of it.
    thanx

    The cell renderer component for the DefaultTableCellRenderer is a JLabel and this has a setIcon() method. You can extend this DefaultTableCellRenderer and inside the getTableCellRendererComponent(JTable table,
    Object value,
    boolean isSelected,
    boolean hasFocus,
    int row,
    int column) method you decide from the parameters which Icon (or ImageIcon) you want to display and then use setIcon() .

  • How do I get rid of white space on one side of image in table cell?

    I'm making a disjointed rollover and when ever I add images it creates too much white space to the right of the cell.  How can I make the picture fit, so space is not wasted?  See image sample with red arrows where I want to remove space.  I've removed the width size from my table, hoping it would "spring to shape" around the images, but no go.

    HTML:
    Cellpadding="0"
    Cellspacing="0"
    CSS:
    table {border-collapse: collapse}
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Display resized images in table

    hi, experts,
    I would like to display images on the table view
    in the column properties, I choose the "Image URL"
    !http://img35.imageshack.us/img35/16/17295270.png!
    the images are displayed on the table correctly.
    however, I would like to resize the image (not phyiscally resize the images)
    I choose Custom Text Format and type _@[html]"<img width=""50"" height=""50"" src=""@H"">"_
    !http://img35.imageshack.us/img35/4553/58315768.png!
    but the images cannot be displayed
    !http://img710.imageshack.us/img710/3879/51723842.png!
    thank you very much!

    set your column format to HTML and create a sting like:
    '<img src= "http://www.commentsyard.com/graphics/smile/smile33.jpg" WIDTH=105 HEIGHT=97>'
    Regards John
    http://obiee101.blogspot.com/

  • Displaying BLOB images from table in a report

    I am trying to upload images to a table, display them in a report afterwards. I have succeeded in the first part, but not in the second.<br>
    <br>
    I can display images in a report if they are in located in wwv_flow_file_objects$ where they are automatically put after 'File browse... + Submit'. <br>
    But, if I move (insert into table + delete from ..object$) I cant display it in a report correctly. I saw the HOWTO document (the code was from there), but for some reason, it doesn't work.<br>
    <br>
    What am I doing wrong? How should I correct the column link or the procedure?<br>
    <br>
    REPORT SQL:<br>
    <br>
    id,<br>
    name,<br>
    filename,<br>
    img src="display?p_photo_id=' || nvl(id,0) || '" height="50" width="50"'<br>
    --wwv_flow_file_objects$ display<br>
    --img src="p?n=' || nvl(id,0) || '" height="50" width="50" ' img,<br>
    BLOB_CONTENT,<br>
    MIME_TYPE<br>
    from images;<br>
    PROCEDURE 'display':<br>
    create or replace procedure display (p_photo_id in number)<br>
    as<br>
    l_mime varchar2(255);<br>
    l_length number;<br>
    l_file_name varchar2(2000);<br>
    lob_loc BLOB;<br>
    begin<br>
    select mime_type, blob_content, name, dbms_lob.getlength(blob_content)<br>
    into l_mime, lob_loc, l_file_name, l_length<br>
    from images where id = p_photo_id;<br>
    owa_util.mime_header(nvl(l_mime,'application/octet'), FALSE );<br>
    htp.p('Content-length: ' || l_length);<br>
    htp.p('Content-Disposition: filename="' || l_file_name || '"');<br>
    owa_util.http_header_close;<br>
    wpg_docload.download_file( Lob_loc );<br>
    end;<br>
    <br>
    Many thanks!<br>

    Alayan - If you're using XE, that shoud be the first thing you tell us. There is a separate forum for that product.
    But as long as you're here, a couple points: you reference the "display" procedure in the img tag without qualifying it with an owner. How is the Embeded PL/SQL Gateway supposed to know what "display" is (unless you created a public synonym)? Next, in XE you need to explicitly enable access to procedures that are invoked this way. See the XE forum for discussion about that technique and read the doc here: http://download-uk.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25309/adm_wrkspc.htm#BEJCGJFJ.
    Scott

Maybe you are looking for

  • HT1925 I've done this step by step and now iTunes won't start ... !

    followed the preocedure and reinstalled iTunes... now it won't startup... get message "Please tell Microsoft about this problem..." where do i start attempting to solve this one...? thanks in advance ed

  • Unable to create project in JDeveloper3.2

    Platform : Windows XP, Oracle8i : 8.1.6, Java : j2sdk1.4.0 I have a problem creating a Project in JDeveloper3.2. I installed JDeveloper[c:\jdev32] by downloading jdev9i_902_base.zip file from OTN website. I modified the java home in jdev.conf 'cause

  • Preserving aspect ratio 16:9

    I've placed several Flash videos on a Web site, all 4:3 standard definition. All look fine. I have one video that's 16:9 widescreen high-definition. When I try to place it on the same site (using the same HTML snippet code as the others), much of the

  • Adobe installation issue: "initializes" but does not "retrieve installation"

    Once it has initialized, it stays at 0% when the screen says "retrieving installation." I really need to view PDF files for school! Please help!

  • IWeb rollovers not working

    I've created a site in IWeb, when I publish to my local folder or the web, the rollovers in my navigation bar do not work. They used to work fine, until I added a few more pages to complete my site. My nav bar is a text box with my links inserted as