cancel
Showing results for 
Search instead for 
Did you mean: 

"Value help only" input in sap.m.Input type control

FranciscoAcuña
Explorer

Hello ui5 devs, 

I have a requirement in which I need to disable direct input in sap.m.Input type fields, users should only be allowed to select values from its Value Help Dialog.

In the past, this was achieved by using the "valueHelpOnly" property, or the "setValueHelpOnly" method to do it programatically. But both of these were deprecated recently, and the documentation doesn't specify if these were improved on or replaced by other functionalities.

The deprecated property achieves exactly what we need to do so we'll keep using it for now, but it would be nice to understand why it was deprecated in the first place and if the UI5 team provided us with a better option instead.

 

FranciscoAcua_1-1707166953108.pngFranciscoAcua_2-1707166976669.png

Kind regards, Francisco.

 

Ryan-Crosby
Active Contributor
0 Kudos
My guess would be because an input field that has only predefined values can effectively be handled with sap.m.Select or sap.m.Combobox

Accepted Solutions (0)

Answers (1)

Answers (1)

Edrilan_Berisha
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Francisco,

 

good question, so I did some research internally and I think I will not make you happy with the answer now but it states: "the property valueHelpOnly is deprecated, no replacement provided by UI5."

And I quote further:

"The reasons are linked to the proper accessibility state of the control, therefore we advise against its further use."

 

 

Best,

Edrilan Berisha

SAP S/4HANA Cloud Financials Development

 

FranciscoAcuña
Explorer
Hi Edrilan, thank you for your answer. So is there no recommendation from the UI5 team to achieve the same functionality that we always had with the property "valueHelpOnly"? This is highly unusual as I think this is a very common business scenario. In our case, the value help is a Table Select Dialog that allows the user to select from thousands of records so using different controls like sap.m.Select or Combobox isn't really an option.
Edrilan_Berisha
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Francisco, well I cannot give any further insights on that but this is what the UI5 team have stated. You could make use of Combobox or create your own validation on top which allows you to handle such a case by implementing such a thing using the liveChange Event and double check from your side if there is some manual user Input which deviates from the provided value help. Best, Edrilan