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

URL in TableView cell

How can a table view cell be defined to be a URL? When the user clicks on the URL the content needs to show up in a separate browser window.

We are using JSPDynPage for implementing the iView.

Thanks

Deepak

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Apr 27, 2004 at 09:17 AM

    Hello Deepak,

    you must set the type to html, there is a method for this:

    For example for an column:

    TableView.setColumnType(TableColumnType.LINK, 1);

    Best Regards,

    Patrick

    http://www.unternehmensportale.biz

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      You have to set also the reference and the target.

      Here's an example:

      TableColumn userCol = table.getColumn("EMail");

      userCol.setType(TableColumnType.USER);

      And then you have to define a CellRenderer:

      public class HelpFeedbackTableCellRenderer implements ICellRenderer

      {

      public void renderCell(int row, int column, TableView tableView, IPageContext rendererContext)

      {

      if (column == 4)

      {

      Link l = new Link("EMail");

      l.addText("EMail");

      l.setReference("mailto:" + tableView.getValueAt(row,column).toString());

      l.setTarget("_top");

      l.setLinkDesign(LinkDesign.FUNCTION);

      l.render(rendererContext);

      }

      }

      }

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.