(domino tags for JSP) viewloop stops at the first category!

Hello,

I have a problem with my code and my DB…

Here is a link to a picture on which you can see the structure of the DB :

http://balances.celeonet.fr/example.jpg

Here is my code :

domino:viewloop

<td><domino:viewitem col="2"/></td>

<td><domino:viewitem name="Request"/></td>

    <td><domino:viewitem name="Status"/></td>

<td><domino:viewitem name="Department"/></td>

<td><domino:viewitem name="From/On"/></td>

</domino:viewloop>

(In my example, I try to show the name5)

So, instead of “Category1, Status1, …”, “Category1, Status2, …”,“Category2, Status1, …”, “Category2, Status2, …”

I just have:

“Category1, Status1, …”

Why?? How can I solve this problem?

Remarq: If I show another name and if there are several lines in the part “Status”, they will be shown…

Thank you in advance !

Philippe Gabert

Subject: (domino tags for JSP) viewloop stops at the first category !!

The iterates over the , and as your picture shows, each ‘row’ (we’d call it a viewentry) is sparse tabular - the row with ‘Name5’ has no values in the other columns, the next ‘row’ only has a value in the category column, and so on with each following row.

So to get those values to print out on each line, you will need to save them off as you loop through the view.

The JSP tags are built on top of Domino’s Java classes (Notes.jar or NCSO.jar) and you will need to access the underlying ViewEntryCollection class and ask it the type of the current row (viewentry).

To access the underlying Domino Java class used by any Domino JSP tag, provide that tag with an id - in this case:

Now you can ask for the indent level - where are we in the category nesting - by

<% int curIndent = curViewEntry.getIndentLevel(); %>

There’s also a tag you can use inside the viewloop to determine if the current entry is a category:

<domino:viewloop id=“curViewEntry”>

domino:ifCategoryentry

   remember the category value

</domino:ifCategoryentry>

</domino:viewloop>

There are other tags like that - search domtags.tld for ‘>if’ for a quick list, no javadoc - designer help file documents them.

Happy Coding!

Steve

Subject: RE: (domino tags for JSP) viewloop stops at the first category !!

Thank you for your help, but my problem is not solved.

In fact, with the code :

<domino:viewloop id=“curViewEntry”>

<tr>

	<td><domino:viewitem col="2"  /></td>

	<td><domino:viewitem name="Request"  format="RAW" /></td>

	<td><domino:viewitem name="Status"  /></td>

	<td><domino:viewitem name="Department"  /></td>

	<td><domino:viewitem name="From/On"  /></td>

	<td><% out.println(curViewEntry.getIndentLevel()); %></td>

</tr>

</domino:viewloop>

It shows the first line and the getIndentLevel returns always 3.

I don’t really understand how it works…

Philippe

Subject: RE: (domino tags for JSP) viewloop stops at the first category !!

I need a little more information - could you include a sample that shows how you use the domino:session, domino:db and domino:view tags, and also the view’s selection formula?

When you use that view in the Notes client, how may documents do you see? Are you using that same id in the domino:session tag?

Steve