Page 1 of 2

Can I have the request and response values in same grid for query service?

Posted: Tue May 06, 2014 2:55 am
by Tooba Atif

I am using one grid which has multiple select and text boxes and I want the user to select the value from select box options and then according to that option my query service will get the result and print that in the text box below.
I followed this tutorial
http://docs.appery.io/tutorials/build...

But on page load the screen is blank as I am using one grid and even If i did not invoke the service the screen appears blank.
I don't want to use multiple grids please guide me how to fix this.


Can I have the request and response values in same grid for query service?

Posted: Tue May 06, 2014 4:10 am
by Yurii Orishchuk

Hi Tooba.

Here is a brief plan for your goals:

pre

1 User activate first select and choose an option.

2 "Value change" event handler for your first select will invoke the service.

Code: Select all

 2.1 This service gets request parameters from your first select(selected option). 

 2.2 This service put returned data into second select options(use mapping for that). 

/pre

This plan describes linking from first select to second select.

In the same way you can implement linking from second select to third select etc.

Regards.


Can I have the request and response values in same grid for query service?

Posted: Tue May 06, 2014 6:14 am
by Tooba Atif

Thanks Yurii.
The problem I am facing is that the grid is not appearing
like I have now used 2 seperate grids
when user selects the option from 1st grid then only 2nd grid elements appeared. Why is that?
I want to appear all the screen not after selecting the option.
Even if i remove the invoke service event then also the grid 2 that is to show the other select n text boxes would not appear unless I removed my mapping from grid 2.
I tried storing the select box value in local storage item and then using it in where clause but still encountered same issue.
Let me paste some sample images of my work.

Image

Screen:
Image


Can I have the request and response values in same grid for query service?

Posted: Tue May 06, 2014 7:47 am
by Evgene Karachevtsev

Hello, Tooba.

If you map some service results to your grid, the grid won't appear until you call this service


Can I have the request and response values in same grid for query service?

Posted: Tue May 06, 2014 7:50 am
by Tooba Atif

So there is no way to show the complete form elements? or I have to use separate grid for each element? Cant I disable the mapping somehow and then make them available on service invoke?


Can I have the request and response values in same grid for query service?

Posted: Wed May 07, 2014 9:25 am
by Evgene Karachevtsev

Hi Tooba,

You can't disable mapping. What logic are you going to implement? Perhaps, you should use the "master-detail" UI design: http://docs.appery.io/documentation/b...


Can I have the request and response values in same grid for query service?

Posted: Thu May 15, 2014 7:52 am
by Tooba Atif

I am still unable to load complete screen on page load. It has to wait for the option selected from the select box first and then according to response from rest service it shows the next grid on the screen.
I want to load the complete screen on same page before selecting the option from select box!


Can I have the request and response values in same grid for query service?

Posted: Thu May 15, 2014 9:40 am
by Kateryna Grynko

Hi Tooba,

Does it work with Page Show event? Did you tick "Render all pages in one HTML file" in App Settings?


Can I have the request and response values in same grid for query service?

Posted: Mon May 19, 2014 2:48 am
by Tooba Atif

Hi Katya,

No it did not work.
I have tried Render all pages check as well but still only one select box appears on the screen. I have to select the option and then only it shows the next grid elements. I am using 2 grids now one for select box and other for rest of the fields and a submit button.

Ask me if you need any other information.


Can I have the request and response values in same grid for query service?

Posted: Mon May 19, 2014 9:23 am
by Evgene Karachevtsev

Hello Tooba,

Does second grid depend on the value selected in first grid? If no, you can populate second grid as the first one with the service on "page show" event.