taking out values from Tamino

X-Application Version: 3.1.2, 3.1.1
Tamino Version : 3.1.1
Platform : NT, Win2k, Solaris, …
WebContainer : Tomcat 3.3
JDK Version : 1.3.1

One new problem, sorry if I keep on sending you messages at this rate but I’ve really little time to finish my work and I need help soon.
With X-application it’s possible to display values taken from Tamino. Now I’d need to record some values in a jsp variable to make several operations on this.
I’ve tried to place bdm:display inside a jsp scriptlet, for example
inside a browse I would need to sum into a variable the number of elements which are
retrieved every time (it’s a join).

<bdm: browse …>
<bdm:directcommand “join”…>
<% i=i+ <bdm:display select=“$COUNT”> %>

It was not legal… is there any other way?

I don’t want to bother you with the details of my application which is somewhat complex, so I hope this can help to understand what I need. use a value returned by a query to Tamino as an input for a jsp variable.

I thought that a very dirty way to do that was
to avoid to use the count function, but to browse in the join result and to increase time after time the value of i.

It should work this way, but I wanted to know if there’s a better way to do it.

Thanks again
Paolo :rolleyes:

As far as I can see, you can access the number of documents resulting from a query as follows. The scriptlet uses X-Application’s Java API to obtain the number of documents from a cursor object. “myQuery” and “mySchema” have to be replaced by your values …

Michael


<BR><BR>...<BR><BR><%@ page import="com..xapp..jsp.*" %><BR><BR><%@ page import="com..xapp..businessdocument.*" %><BR><BR><BR>...<BR><BR><BR><%  <BR><BR>SessionContext sessionContext = ServletSessionContext.getSessionContext(pageContext); BusinessDocumentWorkspace ws = sessionContext.getWorkspace();<BR>Cursor cursor = ws.query("myDocName", "mySchema", "myQueryString", 10);<BR><BR>i += cursor.count();<BR>%><BR><BR>



Software AG Germany, Darmstadt

[This message was edited by Christian Freytag on 13 May 2002 at 13:56.]