on 12-01-2005 7:41 PM
I am trying to create a 2-line tableview cell where the first line is a link and the second line is just text. I almost have it working, but I cannot get cell data to properly recognize the <br>.
Here is the code I have in my iterator method RENDER_CELL_START:
DATA: lcl_link TYPE REF TO cl_htmlb_link.
DATA: lcl_bee_table TYPE REF TO cl_bsp_bee_table.
DATA: lcl_bsp_element TYPE REF TO cl_bsp_element.
DATA: lv_javascript TYPE string.
DATA: lv_str1 TYPE string.
FIELD-SYMBOLS: <row> TYPE ANY,
<col> TYPE ANY.
FIELD-SYMBOLS: <f1> TYPE ANY,
<f2> TYPE ANY.
ASSIGN p_row_data_ref->* TO <row>.
ASSIGN COMPONENT p_column_key OF STRUCTURE <row> TO <col>.
CASE p_tableview_id.
WHEN 'results'.
IF p_column_key = 'NUMM'.
ASSIGN COMPONENT 'KEY' OF STRUCTURE <row> TO <f1>.
CONCATENATE 'showDetail("' <f1> '");' INTO lv_javascript.
lcl_link = cl_htmlb_link=>factory( id = p_cell_id
text = <col>
onclientclick = lv_javascript ).
ASSIGN COMPONENT 'TEXT' OF STRUCTURE <row> TO <f2>.
* Add break between key and text
CONCATENATE '<br>' <f2> into lv_str1.
lcl_bsp_element = cl_htmlb_textview=>factory( text = lv_str1 ).
CREATE OBJECT lcl_bee_table.
lcl_bee_table->add( lcl_link ).
lcl_bee_table->add( lcl_bsp_element ).
p_replacement_bee = lcl_bee_table.
ENDIF.
ENDCASE.
ENDMETHOD.
What I end up with is something that looks like
<u>0000012345</u>This is the text
(the blank line above is intentional - it looks like the <br> is processed BEFORE all text instead of in the middle)
What I want is
<u>0000012345</u>
This is the text
Any ideas/suggestions/inspirations/words of wisdom?
Hi Gregory,
try it with the following:
...
CREATE OBJECT lcl_bee_table.
lcl_bee_table->add( lcl_link ).
lcl_bee_table->add_html( html = `<br>` ).
lcl_bee_table->add( lcl_bsp_element ).
p_replacement_bee = lcl_bee_table.
instead of the 'concatenate' line
Regards,
Rainer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
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.