cancel
Showing results for 
Search instead for 
Did you mean: 

setSelectedDatalinkValue not firing Browser SelectionEvent

pmdzuba
Explorer
0 Kudos

I have a function associated with the selectionevent for a Browser applet that works fine when selecting a item but when in javascript I set the datalink value and the event does not fire.  This did work in 11.5 but we are converting it to 12.2 and it's not working.  Any ideas?

Accepted Solutions (1)

Accepted Solutions (1)

pmdzuba
Explorer
0 Kudos

This was fixed and then in 12.2.4 build 80 it stopped working.  We patched our server with 12.2.4 build 92 and now this works like it suppose to. 

HariCS23
Contributor
0 Kudos

Good to hear that Paul. You didn't to wait until MII 14 release.

Answers (2)

Answers (2)

former_member185280
Active Contributor
0 Kudos

FYI While researching something else I came across sap note 1429552

Text:

Symptom

setSelectedDatalinkValue() not triggering selection event in ibrowser

Reason and Prerequisites

Javascript selection event was not fired when data value changed in case of list/dropdown.

Solution

Programmatically fired selection event when setSelectedDatalinkValue() is called.The fix is available in MII release 12.1 SP5

pmdzuba
Explorer
0 Kudos

Thanks.  I did find this note and included it in the support ticket that I opened up to SAP.  The note said it was going to get fixed in 12.1 sp5 but 12.2 must have decided not to carry the fix forward .

jcgood25
Active Contributor
0 Kudos

Hi Paul,

I recommend entering a support ticket for further investigation, especially if you have the 11.5 and 12.2 difference identified.

I didn't try this out, but at face value I would question why the method you mention would trigger the behavior of a user selecting an item wih the mouse.  Doesn't that event just update the hidden datalink value associated with the visible item in the iBrowser?  If you were setting the selected item by the value of a datalink field that would be different since that would imply picking something from the list.

pmdzuba
Explorer
0 Kudos

Hi Jeremy.

I think during our customer validation we came upon this issue also.  I think I just set the value and then called the SelectionEvent function manually.  I was thinking that we might have put a ticket in back then but my memory is not the greatest.  My opinion is that setSelectedDatalinkValue should be the same as a user selecting the value from list and therefore firing off the SelectionEvent function.  If I was only doing a setDatalinkValue and not the Selected function I would expect it not to fire of the function.

Thanks for your reponse.

pmdzuba
Explorer
0 Kudos

In PowerBuilder when setting values in a datawindow you have buffers.  Primary! and Changed!.  This is acting the same way where if you set the DatalinkValue it's only at the surface until the browser is completely painted.  Once control is returned back to the page then you can use getSelectedDatalinkValue() in a button and it will return the value that you set.  Before returning back to the page it always returns 0 or the default value even though you used setSelectedDatalinkValue(value).  By not really setting this value, the SelectionEvent doesn't get triggered.  I think in 11.5 this buffered value actually did get set.  Not sure if I'm explaining it correctly but that is all I got.

jcgood25
Active Contributor
0 Kudos

Customer validation, now I remember....doing some digging I ran into customer message:  47990/2010

Please reference this when logging a support ticket.