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

BC-BSP-MVC: Pasing parameter from view to controller via column of button

Hello Experts-

I am developing an MVC application in BSP.

In this application, I have an internal table that I am getting through a function module from a Controller into its View. In the View, I am loading this internal table into a work area and am displaying its contents through an HTML Table (via <tr><td> tags).

I want a button in the last column of every row. Upon clicking any button, I want to be able to pass a particular parameter based on that row (eg., field from row) into the Controller.

How can I do this? Suggestions will be welcome.

Thanks,

- Vik.

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 18, 2004 at 03:45 PM

    Hello Vik,

    I guess one way would be populating values in input fields which are also dynamically generated. After clicking of the particular row button you can retreive the values from a particular input fields in DO_HANDLE_EVENT method of the controller.

    --Rajeev

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 19, 2004 at 02:39 PM

    Vik.

    i suggest you to use the htmlb:tableView with the iterator. You can find one public tip in the weblogs for using the tableView and the iterator. You can define the line structure of the tableview and catch the lineClick in the DO_HANDLE_EVENT of the view controller.

    Hope it help u.

    Regards

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you both.

      I was able to accomplish this by defining an intricate BSP loop that creates a TABLE using standard HTML tags.

      It required some coding but I was able to make a snippy little set of loops and conditional switches and parameter passes, etc to achieve what I desired.

      The reason I chose not to use the HTMLB:TableView control in this case was because I need the look of the data to be displayed to be a specific way.

      Thanks for your help though.