Web application and loading content dynamically | Community
Skip to main content
d-wnuk
Level 2
January 31, 2019
Solved

Web application and loading content dynamically

  • January 31, 2019
  • 1 reply
  • 2152 views

Hi,

I have built microsite which is supposed to generate a calendar invite file (*.ics) given an event id as a parameter. Web app is build with two elements - the first one is javascript block which looks like this:

var eventID = ctx.vars.eventID;

var myQuery = xtk.queryDef.create(

     <queryDef schema="xyz:eventSchema" operation="get">

          <select>

               <node expr="@event_id"/>

               <node expr="@event_name"/>

               ...

          </select>

          <where>

               <condition expr={"@event_id= '" + eventID + "'"} />

          </where>

     </queryDef>);

var res = myQuery.ExecuteQuery();

ctx.eventDetails = <eventDetails/>;

ctx.eventDetails = <eventDetails event_id={res.@event_id} ...}/>;

And then, there is a page block where I have another script to generate *.ics file and html code but I have an issue with displaying values. The above solution seems to works as expected for default id (id=0) - I'm able to access all values for this default id, however when I'm changing id to another one, the site refreshes but the content stays the same as for default value, e.g.:

microsite.adobe-campaign.com/webapp/app&id=0 => event_id = 1, event_name = 'default event name'

microsite.adobe-campaign.com/webapp/app&id=12345 => event_id = 1, event_name = 'default event name' (values do not change)

I assume that at some point values from query may be stored in const instead of variable but I have no clue how (or where) it can be change.

Any help would be greatly appreciated.

Dominik

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by d-wnuk

In meantime I found the solution and it was trivial. I wrongly assumed that my parameter event_id is automatically matched with 'id' in the microsite link. The solution works as expected using the following link:

microsite.adobe-campaign.com/webapp/app&id=0&event_id=12345

1 reply

d-wnuk
d-wnukAuthorAccepted solution
Level 2
February 11, 2019

In meantime I found the solution and it was trivial. I wrongly assumed that my parameter event_id is automatically matched with 'id' in the microsite link. The solution works as expected using the following link:

microsite.adobe-campaign.com/webapp/app&id=0&event_id=12345