cancel
Showing results for 
Search instead for 
Did you mean: 

Tableview question

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

thomasalexander_ritter
Active Contributor
0 Kudos

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

athavanraja
Active Contributor
0 Kudos

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