Forum

HomeHomeCoreCoreGeneralGeneralSeveral query template in the same module...Several query template in the same module...
Previous
 
Next
New Post
8/6/2012 10:48 AM
 

Hello,


It's seem that impossible to display several query template simultaneously in the same module.

Could somebody validate it?


If yes, what could be the more elegant way to display several query templates? I can use several modules, passing a querystring parameter and make a refresh of the page but in this case I will lose the current state of my main query template...


Another option could be to launch several "ows.Fetch" in one javascript to various modules on my page and it will probably work but I have 6 modules to refresh when I click on the link in the first module.


I'm not sure that's the most efficient way to work and I'm not sure of the result (not tested).


Do somebody have an elegant solution/idea for that problem?


Thanks for your help,

Dom

New Post
8/6/2012 6:23 PM
 

Dom,

 

Yes only 1 query template per OWS "config GET request".

 

Option 1

If you want to have a lot of queries and results returned in one ows on one GET request and have them rendered on the server in one payload then you can use the Named Queries and concatenate on a per row basis. Create a Named Query call it like Render1. Set an ACTION token like Render1 and append your rows. Then assign  [Render1,A] is assigned to the columns in the row for render.. <b>[FirstName,Render1] [LastName,Render1] </b>

 

Option 2

Although it might be better to use a query string to create 6 "Template Queries" if that's what you want and are familiar with.. and simply render out a template that then "fetch" six different query strings of the same OWS into DIV elements using the non-querystring section of the config. You just need to put each template in an IF ...   like IF '[myQuery,Q]' = 'profile' THEN... and place the profile query template into it.

 

Option 3

Best would be to not render on the server at all, and write JS to pull just the JSON from the OWS config using a queryString to get just the data you need, and render it on the client.... ie..   ?query=profile     returns a application/json mime type and {'FirstName' : 'John'} 

 

Hope that helps some...

New Post
8/7/2012 1:47 AM
 
Hi Brad, thank for this answer. It'clear and I discover more ways to solve my problem. I will test it asap. Dom
Previous
 
Next
HomeHomeCoreCoreGeneralGeneralSeveral query template in the same module...Several query template in the same module...


 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seattle, WA • info@openwebstudio.com

Bookmark & Share Bookmark and Share