on 08-15-2005 10:15 PM
Hello,
I am having a problem with the tableview in the IC Web
development.
Here is part of my HTMLB code:
<crmic:tableViewColumn columnName = "URL"
title = "<%= otr(ZFCC_DEV/DOC_LINK) %>"
type = "user"
width = "15" >
<crmic:link id = "$TVCID$"
reference = "$TVCVALUE$"
text = "Doc Link"
target = "_blank"
tooltip = "URL Link" />
</crmic:tableViewColumn>
It works fine without any conditions.
In this Tableview Column, embeded is a URL link to another
document.
However, how can I implement some logics to make this URL disabled or enabled based on some conditions?
The condition is that if the URL is empty, then disable
this link.
In other word, I would like to do something like this:
<% if ... = True %>
<crmic:link id = "$TVCID$"
reference = "$TVCVALUE$"
disabled = "???"
text = "Doc Link"
target = "_blank"
tooltip = "URL Link" />
<% endif. %>
How do I refer the current Table Column content?
BTW, the Disabled attribute is one of the CRM_BSP_IC HTMLB
extensions for Tableview.
Thanks,
Bin
Hello Bin,
That staf you do in the table Iterator her is a sample
cl_htmlb_inputfield=>factory( id = p_cell_id
disabled = 'TRUE'/'FALSE' ).
The Factory method have more properties !!!
it's recomended to that in the column CASE you work with column name and not the column index
Amit Barak.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bin,
you should also take a look at the table iterator. Check out Brians wonderful weblog <a href="/people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator. The iterator was designed to solve problems like yours.
Small example for the Iterator Method: IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START
method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
case p_column_key.
when 'URL'.
if url is not initial.
p_replacement_bee = CL_CRM_IC_LINK=>factory(...).
else.
p_replacement_bee = CL_HTMLB_TEXTVIEW=>FACTORY(...)
endif.
endcase.
endmethod.
regards
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what do you mean by disable the link? do you mean it should just show some text and not clickable? try the following sample.
[code]<crmic:tableViewColumn columnName = "URL"
title = "<%= otr(ZFCC_DEV/DOC_LINK) %>"
type = "user"
width = "15" >
<b><% if link is initial. %></b>
<htmlb: textView id ="te"
text = "Doc Link" />
<b><% else . %></b>
<crmic:link id = "$TVCID$"
reference = "$TVCVALUE$"
text = "Doc Link"
target = "_blank"
tooltip = "URL Link" />
<b><% endif. %></b>
</crmic:tableViewColumn>[/code]
i am not sure whether crmic has textView else as given in the example you can use htmlb:textView
Hope this helps.
Regards
Raja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.