cancel
Showing results for 
Search instead for 
Did you mean: 

valueHelpRequest event of the Input control in SAP UI5 working unexpectedly

0 Kudos

Greetings Folks,

I have a scenario wherein I have a Table (of 5 columns) inside an IconTabFilter of a view. Of which 2nd column of the table is Input field with F4. I have handled the F4 with valueHelpRequest of Input field. I have also created a fragment myDialog having just a SelectDialog control. I am creating an instance of the selectDialog in the eventHandler onValueHelp of valueHelpRequest as you can see below in the code snippet.

onValueHelp: function (oEvent) {
		
		this.selectedInp = oEvent.getSource().getId(); 
		var oDialog = new sap.ui.xmlfragment("fragments.fragments.myDialog", this);
			
		oDialog.setTitle("Cities");
		oDialog.open();
			
                this.getView().addDependent(oDialog);
			
		oDialog.bindAggregation("items", {
			path: "/city",
			template: new sap.m.StandardListItem({
					              title: "{cityName}",
					              description: "{state}"
				})
			});
	},

The problem I am facing is, whenever I click on the F4, the dialog box doesn't pop up at the next instance I mouse-click. In fact, it holds the screen and again if I mouse click, then the dialog-box appears. Something like this:

1) I click F4 and there is no dialog box appearing and the screen holds

2) Now if I mouse-click AGAIN, then the Dialog Box appears

Ideally, as soon as I press the F4, this dialog box shall appear. But here this isn't the behavior.

What changes/addition in code do I have to in order to exhibit the correct behavior.

Any input is highly welcomed. I appreciate your time.

View Entire Topic
former_member197827
Participant
0 Kudos
Hi PRATHAMESH,

try this.Wait for some time to get the DOM generated.

setTimeout(function(){
oDialog.open();
}, 500)

Regards,
Sagar
0 Kudos

Hi Sagar,

Thanks for your time. However, the issue has been resolved. Keep sharing though !

Regards,

Prathamesh