Sorting database

X-Application Version: 3.1.3,
Tamino Version : 3.1.1
Platform : Windows2000
WebContainer : Tomcat 3.3
JDK Version : 1.3.1
Hello,
I have just downloaded a new version of Tamino X-Application and tried if my previous application is OK. In my previous version I used “querysort” , eg. , which worked correctly, but presently I have got a message: Error message: Exception when creating query. I have tried to change the value for : “[/AAA/blabla=’${VAL_/AAA/blabla$}’]” but it is not a good idea. Could you tell me what the problem is and how to correct it .
Best regards,
vs

Hi,

in your existing application you have used the mechanism of the query builder. With X-Application 3.1.3 you are able to use a new query mechanism, which allows almost arbitrary queries. Therefore this mechanism uses and supports the variables handling.

Now, it seems that you have tried to mix both alternatives.
First of all, the query builder does not support the variables handling. If you like to use flexible queries within your application, then you have to modify your search.jsp page.

In order to see a good examples, I would recommend you to have a look onto the
Property example, we provide with X-Application(see: \examples\jsp\property) . The search.jsp Page shows how to use the new query mechanism. As a second suggestion I would recommend you to read the Chapter ?? of the Documentation, where building flexible queries is described step by step.

If this mail will not help you, or if you do not want to switch to the new query mechanism, then I would appreciate it if you would send me a copy of your error page including the stack trace. This would make it easier to pursue your Problem.

Thanks in advance

Thorsten

Hi,
Thank you for your reply. I’ve changed the source code of search.jsp and now I have no error, but unfortunately my database isn’t sorted.
Maybe I have been doing something wrong.
Now this is my source code of search.jsp :





<xapp:setvar

name=“querySearch” scope=“session”

value="/Abon_nowy${FILTER_/Abon_nowy/nazwa$}${FILTER_/Abon_nowy/imie$}${FILTER_/Abon_nowy/tele

fon$}${FILTER_/Abon_nowy/lokalizacja/miasto$}${FILTER_/Abon_nowy/lokalizacja/pokoj$}${FILTER_/Abon_nowy/email$}${filterSort$}" default=""/>



<xapp:setvar name=“filterSort” scope=“session” value=" sortby(${VAL_/Abon_nowy/nazwa$})" default="" />



<xapp:setvar
name=“FILTER_/Abon_nowy/nazwa” scope=“session"
value=”[/Abon_nowy/nazwa=’${VAL_/Abon_nowy/nazwa$}’]" default=""/>



<xapp:action type=“query” arg="${querySearch$}" form=“form1”><a
href=“javascript:document.forms[‘form1’].submit();”>

</xapp:action>





Regards,
vs

Hi,

you used “sortby”. “Sortby” sorts within a document, but you want to sort over all your results from ‘many’ documents.
In this case please use “sortall” instead.

Cheers Thorsten