cancel
Showing results for 
Search instead for 
Did you mean: 

Object query in HWC applications

Former Member
0 Kudos

In HWC application I have two screens,both screens have list-view .

How fire object query when one tuple is selected from listview on first screen ,target window is second screen having again listview which contains data fetched from object query (executed on first screen)

Accepted Solutions (0)

Answers (2)

Answers (2)

Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

The following sample may also be of interest.

Cascading Choices  https://cw.sdn.sap.com/cw/docs/DOC-148888

This sample will illustrate two techniques to allow a user to select a country, province or state and then a city. The first technique will use listviews, the second will use one screen with select elements.

midhun_vp
Active Contributor
0 Kudos

Is the list views standard or custmized ?

I am assuming that both the list views are standard.

Solution:

Create a menu item in the second screen with the query that you need to execute once second screen is opening. Lets say "GetMySecondList".

As a result a method will be created, menuItemCallbackSecond_ScreenGetMySecondList();

You can find it in the file workflow_jquerymobilelookandfile.html

You need to call this as below in the custom.js file

function customBeforeShowScreen(screenToShow, screenToHide) {

if(screenToHide === "First_Screen" && screenToShow==="Second_Screen") {

                 menuItemCallbackSecond_ScreenGetMySecondList();

                     

                              return true;

                    }

}

You can hide the menu item you created using jquery. If you are on SUP 2.1.3 you can create custom action instead of menu item to no need to write code to hide the menu item.

--Midhun VP

Former Member
0 Kudos

I dont want to introduce extra button.I want to fire object query on tuple selection action

midhun_vp
Active Contributor
0 Kudos

As I mentioned you can hide the button. And you can call the button's online request where ever you want.