cancel
Showing results for 
Search instead for 
Did you mean: 

how to trigger controller from SimpleForm?

former_member593030
Participant
0 Kudos

Hello All,

I am using below link as an example,

https://sapui5.hana.ondemand.com/#/sample/sap.uxap.sample.ObjectPageFormLayout/preview

The input field is available in Simple form - block/employment/BlockJobInfo.view.xml

Suppose

<Input value=" " maxLength="8" width="200px" showValueHelp="true" valueHelpRequest="onSearch/>

So how to trigger onSearch event in controller?

Accepted Solutions (0)

Answers (2)

Answers (2)

jorge_cabanas
Participant

Hi,

Even though looking the example you provide it's not so much clear for me what are you asking for, please check this link: https://sapui5.hana.ondemand.com/#/sample/sap.m.sample.InputKeyValueTabularSuggestions/code/C.contro...


You have there several methods to implement it.

Kind regards,

former_member593030
Participant
0 Kudos

Hello Jorge,

Thanks for this link, After using this,I am getting this error.

Any Idea About this?

unbenannt.png

Uncaught Error: Missing template or factory function for aggregation suggestionItems of Element sap.m.Input#__xmlview0--jobinfo-Collapsed--HomeCompCode1 !

AbhishekSharma
Active Contributor
0 Kudos

Hi Sujoy,

You have one Textbox in your simple form and you want to trigger an event, if this understanding is correct then try below code in your Controller of view where you have created simpleform.

onSearch: function (evt) {
 var oInput = sap.ui.getCore().byId("inputAmount").getValue()
 <your code to call backend, oInput will have value from textbox>
}