SAPUI5 Interview Questions Part C

Part C

27) How do you enable the debugging option for SAP NetWeaver OData services?
->Use the URL parameter sap-ds-debug=true.

28) What do you have to consider when choosing the SAPUI5 version for the application template?
->The SAPUI5 version must be available in your target deployment system.

29) How many complete columns (that include the header) will this table display on a phone?

30) What happens when you set the “minScreenWidth” property of a “sap.m.Column” to “Tablet”?
->The column is shown only on screens that are larger or equal than the size of a tablet.

31) What are semantic colors in sapui5?
->They are representations of states such as success, warning, and error.

32) Name some semantic states in SAPUI5?



33) How can you compose filters in SAPUI5?
->By creating multiple filters and concatenating them either with AND or OR

->By creating a single sap.ui.model.Filter object and specifying a path, an operator, and up to two values

34) Where are filters applied in SAPUI5?
->To an aggregation binding

35) Which filter operation can you use to filter items with a numeric value lower than X?

36) What can you do to enable your SAPUI5 application to adapt to the user’s device?
->As many controls are responsive out of the box, check whether you have to do anything at all.

->Set the compact density on devices without touch support.

37) What can a “device model” be used for?
->To check whether a device supports touch interaction

->To influence the user interface without coding, based on the characteristics of the device

38) What information is provided by the sap.ui.Device API?
->The device type (phone/tablet)

->Whether the device has touch support

->The browser name and version

39) Which control adapts its appearance on touch devices?
->The PullToRefresh control: It is represented as a simple button on non-touch devices, but the user needs to pull the page content down on touch devices to refresh it.

40) Why is it useful to have fragments in your app?
->To create reusable UI parts without a designated controller or other behavior code

41) What happens in the DOM tree when nesting XML views?
->Each XML view creates its own DOM element regardless of the nesting level.

42) What can you do to structure your application code better?
->Use subdirectories for related views and controllers.

->Use fragments to define reused UI parts only once.

->Put the functionality used in multiple controllers into a base controller and extend this controller in the other controllers in your app.

43) What are fragments primarily used for?
->To make parts of your view reusable

44) What are Dialogs in SAPUI5?
->They are rendered into a specific area (the static area) in the DOM.

->They need to be added to the “dependent” aggregation of the view to get access to the models.

45) What happens when you instantiate a dialog from a single-rooted fragment?
->The dialog instance is returned when you invoke the fragment factory.
->The dialog is instantiated but not displayed.

46) Which property of the routing configuration in the manifest.json file should you use to automatically display a target that is not found?

47) How many targets can you configure within a route in the manifest.json file?
->As many as you like

48) What is the correct sequence of called functions / handled callbacks of the OData model in the Add controller?
->on metadataLoaded - createEntry - submit - on success

49) What is the recommended place to configure a "TwoWay" binding for the OData model so that data changes in the view are written back to the model?
->In the "models" section of the manifest.json file

50) How are unit tests for your app started in SAP Web IDE?
->By selecting the run configuration Run Unit Tests

->By right-clicking the unitTests.qunit.html file and selecting an option from the Run menu

51) How do you register a unit test in QUnit?
->Call QUnit.test() in your test code with a speaking test description and a callback that contains at least one assertion.

52) Which testing features are provided by the SAP Fiori Worklist application template?
->A test suite that calls all your unit and integration tests

->Clear separation of test and production code

->Unit test setup (QUnit) and basic test coverage

53) Which options are available in SAPUI5 if you want to create a custom control?
->Extend an existing control with your own features.

->Create a composite control that reuses existing controls internally.

->Extend the sap.ui.core.Control base class and build a new control.

54) Which of the following are part of the control metadata?



55) What do you have to consider when defining control metadata?
->You can give an aggregation either one or many values by defining the multiplicity as “one” or “many”.
->You can make an aggregation invisible in the control API by setting the visibility to hidden.

Watch sapui5 video tutorials from youtube, here's the video on introduction to sapui5:

Next Post »