Suppose there is
<bdm:display select=“$COUNT”> ,
is it possible to assign the value of count to a jsp variable. Well I am not sure if it is possible and if yes how. This may be jsp-101, but i sure don’t know how to do it anybody ?
X-Application Version: 3.1.1
Tamino Version : 3.1.1
Platform : Solaris, …
WebContainer : Tomcat 4.01
JDK Version : 1.3.1
regards and thanks
Amit
Hello,
we checked your problem, but we did not find a solution for it. It seams to be a non-trivial task.
Could be the use of the $SIZE variable an acceptable workaround for you?
In contrast to the $COUNT, the use of $SIZE avoids the repetition of the query execution. It displays the last result of the count. More details about $SIZE can be found within documentation of X-Application:
Have a look at ?Jsp Tag Library Reference? → ?display?.
Write a post if $COUNT does not fit your requirements and why you want to store the result of the count tag. Perhaps, we can find a better solution for your problem.
Bye,
Christian.
[This message was edited by Christian Freytag on 22 Apr 2002 at 09:50.]
Thanks for your prompt reply,
Infact size would be better than count for my purposes.
The motive is to keep a track of number of results of query and the number of results that are on the current page. That is why i require that the $COUNT/$SIZE variable to assigned to a jsp variable
<% int num = $COUNT %>
BTW is there some way to find out number of results on the page ?
thanks
regards
Amit
Hello,
ok, new use case. Currently, we don’t have a tag or option for the count tag which returns the number of documents a browse list displays for the current page.
Workaround: you could create a dummy browse which iterates the documents. Within the body you increase a counter.
<% int docCounter = 0 %>
<bdm:browse … copy the attributes …>
<% docCounter++; %>
</bdm:browse>
If you don’t need the number before displaying the document list you can copy the counter into your existing browse tag.
Bye,
Christian.