cancel
Showing results for 
Search instead for 
Did you mean: 

How to add action on the field of a table UI element

Former Member
0 Kudos

Hi Experts,

In my Web Dynpro program, I have created one table - Table 1. For WBS Element field of Table 1, another screen is called. This screen contains list of values again in form of a table - Table 2. As per the client's requirement when user clicks on the list of values of Table 2, that particular element should get copied in the WBS Element field of Table 1. Also at the same time, the screen containing Table 2 should get closed.

Can you please let me know how I should proceed? In nutshell I want to know how I can add some action on the field of a table.

Thanks

S

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Staurt,

While you bind your table, you will get an option of setting the UI elements for the columns of table. Provide a UI element with some action eg. LinktoAction, Button, etc so that you can perform your business requirement when you click on that particular field.

Regards,

Murtuza

Former Member
0 Kudos

Hi Murtuza,

Thanks. The solution provided by you is not helping me. I right clicked on table and selected Create Binding. This caused Table Binding Wizard to get activated & Context to be displayed. After this I tried to change Editor to LinkToAction for the field of table. The Table Binding Wizard is showing following error message:

"Error for UIElement with lable WBSElement. Select an attribute of type 'boolean'."

Also, Table Binding Wizard is not showing any button although it shows LinktoAction. Can you please help me?

Thanks

S

Former Member
0 Kudos

Hi Murtuza,

Further to above, please note that field of table (WBSElement) is string. I can not change it to boolean.

Thanks

S

Former Member
0 Kudos

Hi Staurt,

Just select the <b>binding property</b> to <b>text</b> when you select the UI element as LinkToAction in your create binding option on table UI element.

Regards,

Murtuza

Former Member
0 Kudos

Hi Murtuza,

Thanks. It is now working. The solution provided by you is catering my need.

Regards,

Gaurav

Former Member
0 Kudos

Hi Stuart,

It's nice to know that the solution is worth for you but sdn has its own way to express thanks

Regards,

Murtuza

Former Member
0 Kudos

Hi Murtuza,

Here you go. Full credit for the correct solution.

Regards,

S

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try doing this:

1. Open the Table 2 in another Window - say Table2_Window.

2.Have a 'Select' button in this window in order to select a parlicular row/value depending on the WBS field.

3.Have a context variable(depending on the Type of the Value) created in the component controller.And Map it to the Table2_Window context.

4. When you select the particular row from the Table2_Window, then in the Select method,set the table context value to the Context Variable created.

5. In the Table1 view, bind the same component Controller context variable (created for the Table2 which is required to fill the WBS field) to the Table1 WBS field.

6.Destroy the window instance after setting the value in the Table2_Window.

-np

Former Member
0 Kudos

Hi Nandini,

Thanks. I have already done programming, context mapping as suggested by you. This solution is not acceptable to client.

The client is very demanding. He is telling us to provide following feature:

In Table 2, on clicking (or double clicking) on the WBS Element field, that WBS element should be transferred to WBS Element field of Table 1 & Window containing Table 2 should get closed.

My only worry is that how on clicking on some text field (WBS Element field ) of Table 2 - some event will be fired. We can fire event on click on button and not on text field!

Due to this reason, solution provide by Murtuza was somewhat relevant. However it is not working due to the reason explained by me in my reply to Murtuza posted today at 11.55 am.

Can you please help me.

Thanks

S

former_member185029
Active Contributor
0 Kudos

Hi,

You will have to do that using context mapping.

Please check some documents on context mapping so that you get complete idea abt how to proceed.

Ashu