Skip to Content
author's profile photo Former Member
Former Member

Tableview question

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Aug 16, 2005 at 05:14 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 16, 2005 at 06:52 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 12:42 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.