cancel
Showing results for 
Search instead for 
Did you mean: 

webdynpro tables

Former Member
0 Kudos

In a View, I have 2 Web Dynpro Tables, lets say Entity Table and Lending Unit Table. An Entity has zero or more Lending Units and each Lending Unit belongs to exactly one Entity. In short, a 1:M relationship. Eg. Entity A has Lending units 1,2,3. Entity B has Lending Units 4,5,6.

On first load of the View, the Entity Table will be populated. When the user selects an entry (say Entity A)in the Entity Table, it will fire up onLeadSelect event (which I provided implementation code) to populate the Lending Unit Table with lending units of the selected entity (eg 1,2,3). When I selected another entry in the Entity Table (say selecting Entity B), using Ctrl + Left Mouse Click (to multi-select entities), it does not fire up onLeadSelect event. My intention is to populate the Lending Unit Table with lending units from the 2nd selected entities also (ie. 4,5,6). I understand that it will not fire up the event as the second selection of the entity is not the lead selection.

Since the Web Dynpro Table only supports 2 events, onFilter (which is not applicable) and onLeadSelect, is there any workaround for this scenario?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Well, you can try to exploit one WD feature available since SP7. WD has own specific postbacks (request-response roundtrip) these are not associated with any action event handler. These postbacks are invoked for example on table multi-selection events.

The only place where you can hook into this sequence is calculated attribute getter (not sure for setter).

So, try the following:

1. Create singleton sub-node AllLendings under node Entity.

2. Write a supply function for AllLendings these collect all lendings from parent node (just traverse parentElement.node() and check all elements with flag isMultiselected or with index equals to lead selection)

3. Create calculated read-only attribute in context directly under wdContext.

4. In getter function for your attribute write wdContext.nodeAllLendings.invalidate(); return blah-blah-blah;

5. Bind this attribute to TextView UI element (I guess you can make it visibility BLANK but not NONE, otherwise getter will not be invoked)

6. Build, deploy, try.

I do not try exactly this solution myself, but I guess it should work -- we have used this WD feature for tracking "dirty" state of node elements, what is in fact very similar.

Regards,

VS