Image in Iterator ( Table View )

Hallo Friends,
would be nice if some one let me know, if its possible to replace the text contents with image or something like that in bee replecement.
IF assigned = 'X'.
p_replacement_bee = CL_HTMLB_TEXTVIEW=>FACTORY(
id = p_cell_id
text = '@01@'
encode = 'true'
tooltip = lv_cwa
I want to put a gif or some image in text here under specific condition.
..... Many thanks,

Hi Marek,
you have to use the following coding:
DATA: icon_plane TYPE STRING.
icon_plane = CL_BSP_MIMES=>SAP_ICON( id = 'ICON_WS_PLANE' ).
p_replacement_bee = CL_HTMLB_IMAGE=>FACTORY( id = p_cell_id src = icon_plane ).
And take a look at Brains weblog: https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/213. [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] This is where I got this code and were you will find  a lot more information regarding the iterator.
regards
Thomas
Message was edited by: Thomas Ritter

Similar Messages

  • Calling a Breadcrumb image inside a Table view column

    Hi
    I want a sample code to call any bread crumb related image inside a table view column.
    Please help with a code snippet.

    I mean that, inside the iterator class of the tableView, write this code in the RENDER_CELL_START method.
    method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
      CASE p_column_key.
        WHEN 'ICON'.
    p_replacement_bee = CL_HTMLB_IMAGE=>FACTORY(       id        = p_cell_id                              src      = '@3J@'  ).
        ENDCASE.
    Inside the method, GET_COLUMN_DEFINITIONS you need to append a column for icon, see the code below:
    APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
        <def>-COLUMNNAME = 'ICON'.
        <def>-TITLE      = 'Display Icon'.
    For more info you can refer to weblog on HTMLB TableView Iterator by Brian.
    Hope I am clear.
    Regards,
    Ravikiran.C

  • How to set image size in a table view

    Hi,
    I've just built a small VC application showing some process chain logs in a table view. For the different status types Error, Warning and Success I show the well-known traffic light icons. But up to now I haven't found out how to set the image size in a table view (height & width field is greyed out for the table). Any ideas? Or is it just not possible?
    Thanks for your help,
    Heiko

    Hello Heiko,
    I don't know, if it is possible, but I would say,
    it's not implemented yet. Maybe you can change the picture size and use then the pictures, that might be a workaround, if you can't change the height and width in VC.
    Best Regards,
    Marcel

  • Check box in tabel view?when to use itereator and when to use table view

    hi,
    I want to have a check box along with the other 7fields  in the table view.
    when the checkbox is checked and the merge complete push button is clicked, the respective code for merge is to be executed.
    how can I do this?
    could anyone tell me hw to get a check boz in table view
    when to use a  iterator in BSP, how table view n iterator in comparision ae used or function/work.
    Regards,
    Pavan P.

    Hi Pavan,
    Table View is an BSP element used to display mass data in a layout similar to a table (table view).
    <b>Iterator</b>is an attribute to modify rendering row-by-row, and make it dependent on the clicked row. In this way, you define an action from a particular line. This action is defined in columnDefinitions or overWriteDefinitions.
    <htmlb:tableView id = "tvX"
                     headerText          = "Department List"
                     design              = "standard"
                     headerVisible       = "true"
                     width               = "30%"
         selectedRowKeyTable = "<%= selectedrowindextable %>"
         onRowSelection      = "MyEventRowSelection"
         sort                = "server"
         keepSelectedRow     = "TRUE"
         selectionMode       = "MULTISELECT"
         table               = "<%= i_dept %>" >
    </htmlb:tableview>
    In your <b> OnInputProcessing </b>, Use this Iterator table to get the data of selected records.
    IF selectedrowindextable[] IS NOT INITIAL.
    DESCRIBE TABLE selectedrowindextable LINES no .
    Rgds,
    Jothi.
    Pls do close the thread if ur problem is solved.

  • Urgent!!!How to add a Dropdown in a Table View Iterator CLass?

    Hi All,
    I want to add a Drop Down List in the Table View Iterator Class. I am not able to do that.
    If any of you have done please reply, as it is very urgent.
    Please give the code extract possible (with data defination too)
    Regards,
    Dhaval
    Points will be given
    Mark this as Urgent

    Hi
    You need to modify RENDER_CELL_START method of your iterator class and you use the p_replacement_bee attribute to output the drop down
    The example below outputs the units of measure for a material
    data:
            col_dropdown   TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX,
            col_listitem   TYPE REF TO CL_HTMLB_LISTBOXITEM,
            table_bee      TYPE REF TO cl_bsp_bee_table,
    CASE p_column_key.
        WHEN 'Column Name'.
    needs to change.  way too slow to select each time.
            prod_id = <current_line>-matnr.
            CALL FUNCTION 'Z_GET_UOM'
              EXPORTING
                PRODUCT_ID = prod_id
              IMPORTING
                UOMLIST    = uom_list.
            clear uom_line.   append uom_line to uom_list.
            CREATE OBJECT table_bee.
            CREATE OBJECT col_dropdown.
            rowidx = p_row_index.
            shift rowidx left deleting leading space.
            concatenate p_column_key rowidx into  col_dropdown->id.
            col_dropdown->width     = '100%'.
            col_dropdown->selection = <current_line>-zieme.
            table_bee->add( level = 1 element = col_dropdown    ).
            loop at uom_list into uom_line.
              CREATE OBJECT col_listitem.
              col_listitem->key    = uom_line-name.
              col_listitem->value  = uom_line-value.
              table_bee->add( level = 2 element = col_listitem    ).
            endloop.
            p_replacement_bee     = table_bee.

  • BSP COMPILER & Table view  ITERATOR

    Hi Gurus,
       Can any  body give the follwing details
    1.What is BSP Compiler?
    2.What is Table view iterator?
    Thanks in Advance,
    Regards,
    Ravi.

    Hi,
    1.the compiler builds the internal code you put in your pages.
    practical reference:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/11099890-0201-0010-d695-ac642d35c708">pdf by Karl Kessler</a>
    2.a bsp table view iterator can be checked here:
    <a href="/people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator">Weblog by Brian McKellar</a>
    <a href="/people/thomas.jung3/blog/2004/09/15/bsp-150-a-developer146s-journal-part-xi--table-view-iterators by Thomas Jung</a>
    basically it's used for customizing diplay of tables
    grtz
    Koen
    Message was edited by: Koen Labie

  • Resize theb image in the Tab Bar and Table View

    Hi,
    I have image of 64x64.
    I want to resize the image to fit it into Table View and also in the Tabbar.
    I don't want to provide separate images for each.
    Is it possible?

    The mozilla.widget.render-mode preference works in beta 6, but this preference has now been removed from the latest development builds and will not work in beta 7 or later.
    Removed by the part 2 patch for [https://bugzilla.mozilla.org/show_bug.cgi?id=596494 Bug 596494] – Update render mode on device removal

  • Image table views

    Hi all,
    I have a basic question about tableviews with user generated photos. I want to create a scrollable table view feed where each cell (the entire cell) is of an image that is uploaded by users, with a editable text box over the image in the tableview (much like the VEVO app tableview on the iphone).
    Would I have to create a custom class for this UItableview, or is there already a template for this?

    Where should i store the images
    Store the image inside the project as 'Resources'.
    And how should I place in the table
    One method is to add the image by first drawing a CGRect and then placing the image inside...like this:
    CGRect myImageRect = CGRectMake(18.0f, 13.0f, 172.0f, 42.0f);
    UIImageView *myImage = [[UIImageView alloc] initWithFrame:myImageRect];
    [myImage setImage:[UIImage imageNamed:@"allrnd.png"]];
    myImage.opaque = YES; // explicitly opaque for performance
    self.view addSubview:myImage];
    [myImage release];
    If you have multiple images, repeat the code block and change the name if myImage to something unique and change the f values shown for placement as required.
    Try to get the image as close as possible to the rect they will fill to avoid unnecessarily bloating the project/app size overall. In the example above, the image sits at 18 pixels from the left, 13 pixels down from the top and is 172 wide and 42 tall.
    See this doc from Apple for details:
    http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Referenc e/CGGeometry/Reference/reference.html

  • Cell Binding/Table View Iterator

    Hi Friends,
    I am getting error while editing the particular cell of column table view. when I enter the changes, they are not updating in the cell.I used the following code.
    method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS .
    APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
    <def>-COLUMNNAME = 'RELDATE'. <def>-EDIT = 'X'.
    method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_ROW_START .
    m_row_ref ?= p_row_data_ref.
    endmethod.
    method
    IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START .
    CASE p_column_key.
    WHEN 'RELDATE'.
    IF p_edit_mode IS NOT INITIAL.
      DATA: Rdate TYPE STRING.
      Rdate = m_row_ref->RELDATE.
      p_replacement_bee = CL_HTMLB_INPUTFIELD=>FACTORY(
                              id        = p_cell_id
                              value     = Rdate
                               type      = 'DATE'
                               VALUE = PCELL_BINDING
                                showHelp  = 'TRUE'
                                encode = 'TRUE').
    I am bit confused abt MVC.Please mail me the exact code changes to be done in MVC-Class controller.
    Regards
    CSM Reddy

    Pls check the code, & mail me back in case of any errors.
    method DO_HANDLE_EVENT .
    DATA: itabtype  type standard table of stdview1.
    DATA: tv TYPE REF TO cl_htmlb_tableview.
      tv ?= cl_htmlb_manager=>get_data(
                              request      = runtime->server->request
                              name         = 'tableView'
                              id         = 'stdview1' ).
      IF tv IS NOT INITIAL.
        DATA: tv_data TYPE REF TO cl_htmlb_event_tableview.
        tv_data = tv->data.
        IF tv_data->prevselectedrowindex IS NOT INITIAL.
          FIELD-SYMBOLS: <row> like LINE OF ITABTYPE .
         READ TABLE ITABTYPE INDEX tv_data->prevselectedrowindex
         ASSIGNING <row>.
          DATA value TYPE string.
          value = tv_data->get_cell_id( row_index    =
                       tv_data->prevselectedrowindex
                                         column_index = '6' ).
          DATA: inputfield TYPE REF TO cl_htmlb_inputfield.
          inputfield ?= cl_htmlb_manager=>get_data(
                              request      = request
                              name         = 'DESCRIPTION'
                              id           = value ).
    <row>-DESCRIPTION = inputfield->value.
    ENDIF.
    ENDIF.
    Regards
    CSM Reddy

  • Set a colour to a row in a table view which does not use an iterator

    Hi ,
      I have an application , which displays data using a table view.
    How can i set colour to a row based on the value of one of its coloums.
    The table view does not use an itertator.
    Thanks
    Arun

    you can use the following code in the ONMANIPULATION event to modify the color of the row. but be aware that if SAP changes rendering ot htmlb:tableview it may not work.
    this code sample set the bgcolor of row 2 to blue.
    DATA: httpbody TYPE string .
    CALL METHOD response->if_http_entity~get_cdata
      RECEIVING
        data = httpbody.
    REPLACE ALL OCCURRENCES OF '<tr rr="2"' IN httpbody WITH '<tr rr="2" bgcolor="blue"' IGNORING CASE .
    CALL METHOD response->if_http_entity~set_cdata
      EXPORTING
        data = httpbody.
    Regards
    Raja

  • Table View Navigation

    I've a table view with one column being an image (clickable). I have 40 rows of records (say for example) and I display 15 at a time in my table view.
    When I navigate to page 3 of my tableview (for example) and click on row to edit (lineedit mode) my view page stays put on page 3 of table view (that's the way it should be). However, after row selection, when I click on my image (which generates a server event and I do my stuff) it goes back to the 1st page of the tableview. The point to note that it does keep the rowselection (on the 3rd page) and changes the icon image as it suppose to but somehow it navigates to the 1st page every time.
    Is there a way to control the navigation?
    Thanks,
    Partho

    I've added
    runtime->keep_context = 1. in my do_handle_event
    and also added
    keepSelectedRow       = "TRUE" in my htmlb:tableview
    but still it navigates to the 1st page.
    It is this section in the render cell iterator
        IF p_edit_mode IS INITIAL.
        ELSE.
           img->onclick = 'image_click'.
        ENDIF.
    which fires the server event and always goes back to the 1st page.
    Please help.
    Thanks,
    Partho

  • How to use a Table View in AppleScriptObjC

    How can I use a table view and add data to it? And how can I display a button cell and image cell in the table? Thanks.

    Hi all,
    Actually i need some more clarification. How to use the same select statement, if i've to use the tabname in the where clause too?
    for ex : select * from (tab_name) where....?
    Can we do inner join on such select statements? If so how?
    Thanks & Regards,
    Mallik.

  • Error while creating a hyperlink for a field in a table view

    Hi all,
    I have created a table view to display the lead information.Now i wanted to make the lead number to be made as a hyperlink.I have tried the delow code
    <htmlb:tableView id = "tvX"
    headerText = "Leads Details"
    headerVisible = "true"
    design = "alternating"
    visibleRowCount = "5"
    visibleFirstRow = "<%= firstvisiblerow %>"
    fillUpEmptyRows = "true"
    onHeaderClick = "MyEventHeaderClick"
    onRowSelection = "select"
    selectionMode = "singleselect"
    table = "<%= activities %>"
    iterator = "<%= z_it %>"
    sort = "SERVER" >
    <htmlb:tableViewColumns>
    <htmlb:tableViewColumn
    columnName = "object_id"
    type = "link" >
    </htmlb:tableViewColumn>
    </htmlb:tableViewColumns>
    </htmlb:tableView>
    But am getting the following error whlle am activating the code
    Internal error occured during runtime generation
    of Class CL_O2D59X6KFES8AMMPAFQ6AV1R3WF (Dump ID:
    DBIF_REPO_SQL_ERROR).
    When i remove the code for <htmlb:tableViewColumns> this error does not exist
    Can canyone help me in solving this?
    Thanks

    Hi,
    in iterator method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
    you need to call method  cl_hrrcf_iterator=>get_bee_link to define the link for a specific filed.
    for example check the below code.
    IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
      CASE p_column_key.
        WHEN 'PERNR'.
        CALL METHOD cl_hrrcf_iterator=>get_bee_link
            EXPORTING
              p_cell_id       = p_cell_id
              p_onclientclick =link_url
              p_column_key    = p_column_key
              p_row_data_ref  = p_row_data_ref
              p_tooltip_alias = l_alias
            IMPORTING
              po_bee          = p_replacement_bee.
        ENDCASE.
    endmethod.
    vijay

  • BSP: How to create check box in a column of a Table View

    Hi All,
    I have a table view in Web IC scenario. my requirement is to display check box in one of the column of the table view.. so that i can select multiple lines from the table and do some calculations!.
    Anybody have any hint/clue
    Thanks in advance,
    sudeep v d.

    Hi,
    This can be achieved by using a Table iterator.
    Please check the standard examples for this.
    Thanks,
    Rashmi.

  • How to select a row in a single-select table view?

    Hello folks,
    I have a table view with a 'details' button. When a row is selected and 'details' is pressed, the table view disappears and a form view is displayed (like the toggle button in PCUI). I have implemented this using a navigation link. When I press 'cancel' in the form view, another navigation link takes the user back to the table view.
    My problem is, when the table view reappears, there is no row selected (the row that was selected previously, is de-selected). How do I make sure that the row remains selected?
    I tried using the collection_wrapper->mark() method in the inbound plug of the table view, but it works only for multi-select table.

    Hi Masood,
    Thanks for your reply.
    I had already tried using MARK ( iv_index = lv_index ), but it did not work because the first statement in the MARK method is
      check ME->MULTI_SELECT = ABAP_TRUE.
    Mine is a single-select table. So, using the MARK of the iterator object, with either the IV_BO or the IV_INDEX parameter also does not work. Is there any other way for a table with single row selection?
    Thanks!!!
    Rohan.

Maybe you are looking for

  • From ESB to BPEL via DB Adapter.

    Hi' All! I've a database table with a clob holding an XML document. I also have a BPEL flow excepting a whole XML document. How do I map the Clob field to the BPEL flow in ESB? Rgds, Henrik

  • Jsf 2.0 datatable grid

    Hi I would like to display a list in a grid format instead of rows of data. With jsf 1.2, the tag <t:datatable> provided this feature, but that is not compatible with 2.0 Is there any other option? thanks

  • My iPhoneis disabled and says to connect to iTunes.  How can I get the phone unlocked?

    My daughter tried to change her code to unlock her phone and the phone locked up and says that her phone is diabled and to connect to iTunes.  Is there any thing to do to unlock fix this problem?

  • CAF GP...

    Dear Friends,    What is this CAF GP...? Why and How it is used in SAP Netweaver? Regards Santhosh kumar.N

  • Brand New Apple User trying to import video files from FreeAgent External..

    hard drive. Previous Dell owner and now I have converted. I have files saved to my FA Drive in a .MOD version and cannot play them on my Apple. What do I have to do to accomplish this? I have a JVC Everio HD camcorder. Any help for a newbie would be