Page 1 of 1

creating dynamic pages

Posted: Thu Jul 04, 2013 11:16 am
by Sean Kelley

I am wondering how to create dynamic page ids in web app. I have a rest populated list on page A. On click, the list item navigates to page B, which invokes a service call to appery database to return data mapped to page elements.

Right now the page B is the same id no matter what data is being requested. I would like each click on page A to point me to a new page id. In this case, b-uniqueid etc so that the final web app displays the url: .../b-uniqueid.html

How would I go about this?


creating dynamic pages

Posted: Thu Jul 04, 2013 1:07 pm
by Maryna Brodina

Hello! It's not allowed by jqm unfortunately.


creating dynamic pages

Posted: Fri Jul 05, 2013 11:43 am
by Sean Kelley

How would I go about creating shareable content from my database results? As I said, right now I use page A input value (record id) to run service to return the database record results which are displayed on page B. How do I change my approach to create mechanism so that I can share or email a unique link to that result page?


creating dynamic pages

Posted: Fri Jul 05, 2013 1:04 pm
by Maryna Brodina

Hello! You can pass parameters to page B through GET parameters and on that page on Success event get all parameters and use them to invoke the service. URL will look like this http://appery.io/app/view/xxxxxxxxxxx...


creating dynamic pages

Posted: Tue Aug 05, 2014 4:11 pm
by Zhong Liu

Hi Maryna

But I can not find the 'Success' event on page, I can find 'load' event instead, could you please show me with a snapshot of screen, thank you.


creating dynamic pages

Posted: Tue Aug 05, 2014 5:20 pm
by Evgene Karachevtsev

Hello Zhong,

The events Success, Complete and Error you can only add on services. First you should add the service on the page, and then you'll see them. More info here: http://devcenter.appery.io/documentat...


creating dynamic pages

Posted: Wed Aug 06, 2014 1:26 am
by Zhong Liu

Hi Evgene,

What I want to do is to get the parameter pass to a page on url like appery.io/app/view/xxxxxxxx/b.html?id=xxxx. if I put a service on this page, can I get the parameters on page url?


creating dynamic pages

Posted: Wed Aug 06, 2014 4:11 am
by Yurii Orishchuk

Hi Zhong,

Yeap, you can navigate to the page with certain URL parameters with following JS code:

pre

//Note1: you need replace "Screen2" with your page name.
//Note2: in "data" section you need specify parameters that's you need.
Apperyio.navigateTo("Screen2", { data : { 'paremeter1': '123', 'parameter2': '456' } });

/pre

Also you can get these parameters from url with following code:

pre

var search = location.search;
alert(search);

/pre

Regards