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

HTMLB - tableColumnView - link to new page - HOW????

Hello,

I'd like to be able to link the cells in a column of my table to a new page.

<htmlb:tableViewColumn

columnName = "dwaitti"

title = "Dialog Wait Time"

type = "LINK"

width = "50"

linkColumnKey = "dwaitti"

linkClickTarget = "chart.htm?f=dwaitti&s=<%=myStart%>&e=<%=myEnd%>" />

I've tried using linkClickTarget but that doesn't seem to do what I want? Whenever I click on this

column in any cell I get the current page reloaded. I've looked at the example for tableView but it doesn't seem to help to much either???

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Dec 16, 2003 at 08:34 PM

    Hallo Craig,

    In English one ? is sufficient to terminate any question.

    The question is what does linkColumnKey and linkClickTarget does?

    linkColumnKey: This is the name of a column inside your table, from which the URL will be fectched. So effectively the rendering code expect that inside the table, in column specified by linkColumnKey (in your example column dwaitti in your table) the URL to use. This string found in this column is effectively rendered out as the HREF of the <a> tag.

    linkClickTarget: Hard coded string that is used as target for this specific link. It is used to render the TARGET attribute of <a> tag. As you wish to stay on the same page, this does not really help you much.

    Another aspect that you should consider, is that you can submit the page (actually the <form> on HTML page) into another BSP page by setting the method (=POST) and action (=new URL) attributes of <htmlb:form>.

    Here are a few ideas for you to explore:

    (1) Restructure the data in the table, so that "chart.htm" is also one of the columns in the table. (Not always practical.)

    (2) Just render out a normal text in this cell. Activate cellClick events for tableView. Once you are back on the original page, look for this event, and do a navigation to the new page where you want to be.

    (3) Use the form method and action attributes to directly land on the new page. This is only really practical if you want to go there in all cases.

    (4) Write an iterator, and custom render this cell using the <htmlb:link> tag the way you want it.

    Given your description, I think that (2) above will probably the fastest way to go. If you have problems to make it fly, just say so that we can quickly build an example for you.

    brian

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      First Happy Holidays to all!

      OK,

      So perhaps someone can help with all of these issues.

      This little page I am working on is turning out to be a major discourager for the future of BSP's in my company.

      Using htmlb

      We want to create 3 pages.

      Page 1 (100% finished)

      System list, Data selection and Data type selection

      Page 2 (Row navigation and multiselect and column header click do not work)

      Receives the system list, start and end date and data type selection from page 1.

      On this page we show a table (tableView) with a visibleRowCount of 20. We want to use the page navigation to navigate through the visible rows, allowing the user to select the rows they want.

      If the user clicks on a column header it should then load Page 3 in a new window.

      Page 3 (page is there but nothing on it)

      Page 3 will load a graph of data. It will take the entire selected table (with start and end date and systems) and create a graph of the column header clicked. It will only load in the chart the data for the column selected and the rows selected or if no row is selected it will take the entire table.

      Now I have this application completed using Java, JSP and JSP Tags and it works beautifully. However with BSP and htmlb I can't get past loading the data onto page 2 (only the first 20 rows)

      Please help!