Skip to Content
0

Creating view with material input field with F4 help

Aug 19, 2017 at 02:49 AM

110

avatar image
Former Member

Hi Gurus,

I need to develop a page in eclipse as material input field with F4 help where when user starts typing in search help for material it should get filtered out.And based on the material selected and pressed enter it should navigate to another view where it should show which all plants contain this material.

I searched forum but didn't find expected answer.

Can you please provide sample code to develop this in eclipse which will be really helpful and appreciated.

Thanks and Regards,
Ajay

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Sharath M G Aug 19, 2017 at 03:17 AM
1

You need to use an event called livechange, which gets triggered as the user types.

The best example for you to learn this is in the link below:

https://sapui5.hana.ondemand.com/explored.html#/sample/sap.m.sample.InputAssistedTabularSuggestions/preview

Check the way when user tpes, the assisted values appear below.

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Sharath,

Thanks for your valuable answer.

I need to select a material and on pressing enter on that material i need to show a table in another view which will display plants where that material is available. Means, it should show material-plant combination in the table.

Can you please send some sample code/app like what needs to be written in controller.js,index.html and view.xml in details for this development as i am very new to UI5.

Thanks and Regards,
Ajay

0

in view xml, you need to subscribe an event handler method for the event - submit. In the controller, define the event handler and perform the action to be perform like : check the user entered value(available through event parameter) and then attach the help values to the input.

Check the Explored link for many examples where such request is addressed.

0
Former Member

Thanks sharath

can you please share any example for reference purpose or in explorer where can i find such details.

Regards,
Ajay

0

Check this example: https://sapui5.hana.ondemand.com/explored.html#/sample/sap.ui.unified.sample.FileUploaderBasic/code/View.view.xml

In the view , for button - event press, an event handler is assigned. The logic for the handler is in controller.

0
avatar image
Former Member Aug 21, 2017 at 02:01 PM
0

Use for SearchField and a list and use livechange event and onSearch events. Refer to explorer.

In onSearch/ livechange event function you can read the value entered in SearchField and get materials using a oData read and bind it to the list.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Kuppireddi,

Thanks for your response.

Can you please provide an sample example to refer or in explorer where can i find such code?

Regards,
Ajay

0