cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathaniel Alfred" <>
Subject RE: Table with multiple rows in xsp:logic
Date Tue, 26 Apr 2005 07:17:45 GMT
Don't try to fake tags.  The beauty of XSP is that it guarantees wellformed output (if there
are no exceptions thrown).
Instead store the query result upfront in a List and then use a double nested loop:
  for( int outer = 0; outer &lt; idList.length(); outer += 4 ) {
          for( int inner = 0; inner &lt; 4; inner++ ) {
             int index = outer+inner;
             String id = index &lt; idList.length() ? (String)idList.get(index) : "&160;";
HTH, Alfred.

-----Original Message-----
From: Yves Vindevogel []
Sent: Montag, 25. April 2005 21:32
Subject: Table with multiple rows in xsp:logic


What I want to do is pretty basic. 
I have a loop in my results to show them inside a table 
Every four columns, I want to start a new row. 

How can I do this ? 

The code below shows what I try to do, but does not work. (And it's not the == instead of
the modulo) 
I'm just trying stuff in there. 

<xsp:logic>ct++ ;</xsp:logic> 
<a href="#">> 
<esql:get-string column="id"/> 

if (ct == 4) 
<xsp:text disable-output-escaping="true">&lt;tr&gt;</xsp:text> 
} ; 

Met vriendelijke groeten, 
Bien à vous, 
Kind regards, 

Yves Vindevogel 
This message is for the named person's use only. It may contain confidential, proprietary
or legally privileged information. No confidentiality or privilege is waived or lost by any
mistransmission. If you receive this message in error, please notify the sender urgently and
then immediately delete the message and any copies of it from your system. Please also immediately
destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail communications through their
networks. Any views expressed in this message are those of the individual sender, except where
the message states otherwise and the sender is authorised to state them to be the views of
the sender's company.

View raw message