cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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