on 04-03-2006 10:20 AM
Hi
I want a sample code to call any bread crumb related image inside a table view column.
Please help with a code snippet.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use this code in RENDER_CELL_START method of iterator class to display a Set State image in a table view column.
p_replacement_bee = CL_HTMLB_IMAGE=>FACTORY(
id = p_cell_id
src = '@3J@' ).
Regards,
Ravikiran.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
HI Ravikiran
The issue here is that the icon has to change each time for a different row depending on priority of the ticket.
For the same how do i implement this.?
Also please let me know what will be written in layout ; oninput processing so that the coding is clear on this end.
Regards
Bhavana Advani
If you go through the weblog specified by me in the previous post, you will get full idea of Table View Iterator.
/people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator
Coming to your question, if you want to have different icons upon different conditions, that is also possible. The code below will show one icon when flag = '1' and other icon when flag = '0'.
CASE p_column_key.
WHEN 'ICON'.
IF FLAG = '1'.
p_replacement_bee = CL_HTMLB_IMAGE=>FACTORY(
id = p_cell_id
src = '@3J@' ).
ELSEIF FLAG = '0'.
p_replacement_bee = CL_HTMLB_IMAGE=>FACTORY(
id = p_cell_id
src = '@01@' ).
ENDIF.
ENDCASE.
Regards,
Ravikiran.
PS: Assign points for replies which you find helpful.
If you want to just display an icon in the table view cell depending upon some condition, then you don't need to have anything in the OnInputProcessing event handler.
If you are going to edit some cells in the table view, then only you require to handle onInputProcessing event.
Coming to the layout, on how it looks like, it will have a status icon appended as the first column of the table view.
Hope I am clear.
Regards,
Ravikiran.
If you need just to display different icons, you can do it with iterator. If you dont want to go through that way you do as below in layout:
</htmlb:tableViewColumn>
<htmlb:tableViewColumn
columnName = "myicon"
title = "Image"
horizontalAlignment = "center" >
<htmlb:image src = "<%= CL_BSP_MIMES=>SAP_ICON( id = '@9S@' ) %>"/>
</htmlb:tableViewColumn>
Refer <b>SBSPEXT_HTMLB</b> for further help.
Dont forget to award points, if you find the reply helpful.
Regards,
Ravikiran.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.