You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Kazmír, Jaroslav" <ja...@joanneum.at> on 2002/11/19 20:04:06 UTC

esql - dynamic result table

Hello,
 
Does someone know how generate dynamical result table, without using
<esql:get-columns/>?
I would like to get column, where in the first line will be label's of
column and another lines will be
Generated directly from result.
 
I am in this way:
 
                                 <esql:results>
                                        <xsp:logic>
                                       int columns =
<esql:get-column-count/>;
                                       </xsp:logic>
                                        <table class="dotted"
cellspacing="0" cellpadding="2" width="100%">
                                               <row>
                                                     <xsp:attribute
name="bgcolor">#AAAAAA</xsp:attribute>
                                                     <xsp:logic>
                                                     for (int x=1; x &lt;
columns+1; x++) {

                                                            <data>
                                                                   <b>
 
<esql:get-column-name column="1"/>
                                                                         
                                                                   </b>
                                                            </data>
                                                     }
                                               </xsp:logic>
                                               </row>
                                               <esql:row-results>
                                                     <row>
                                                            <xsp:logic>
                                                     for (int x=1; x &lt;
columns+1; x++) {

                                                            <data>
 
<esql:get-ascii column="1"/>
                                                                   </data>
                                                     }
                                               </xsp:logic>
                                                     </row>
                                               </esql:row-results>
                                        </table>
                                 </esql:results>
 
Everything is fine, but I don't know how I could change attributes number
COLUMN in tags
<esql:get-column-name/> and <esql:get-ascii/> and remove value "1" by value
of variable "x".
 
Thanx for some suggestion and help.
 
JayKay
 
----------------------------------------------------------------------------
-----------------
  Jaroslav Kazmir
  Institute of Information Systems & Information Management
  JOANNEUM RESEARCH Forschungsgesellschaft mbH
  Steyrergasse 17, A-8010 Graz, AUSTRIA
 
  phone:  +43-316-876-1140                 fax: +43-316-876-1191
  web:    http://iis.joanneum.at <http://iis.joanneum.at> 
  e-mail: mailto:jaroslav.kazmir@joanneum.at
<ma...@joanneum.at> 
----------------------------------------------------------------------------
-----------------
 

RE: esql - dynamic result table

Posted by Artur Bialecki <ar...@digitalfairway.com>.
I never actually used the esql logicsheet but did you
try <esql:column> tag. For example,

<esql:get-column-name>
 <esql:column><xsp:expr>x</xsp:expr></esql:column>
</esql:get-column-name>

Artur...

-----Original Message-----
From: Kazmír, Jaroslav [mailto:jaroslav.kazmir@joanneum.at] 
Sent: November 19, 2002 2:04 PM
To: 'cocoon-users@xml.apache.org'
Subject: esql - dynamic result table


Hello,
 
Does someone know how generate dynamical result table, without using
<esql:get-columns/>?
I would like to get column, where in the first line will be label's of
column and another lines will be
Generated directly from result.
 
I am in this way:
 
                                 <esql:results>
                                        <xsp:logic>
                                       int columns =
<esql:get-column-count/>;
                                       </xsp:logic>
                                        <table class="dotted"
cellspacing="0" cellpadding="2" width="100%">
                                               <row>
                                                     <xsp:attribute
name="bgcolor">#AAAAAA</xsp:attribute>
                                                     <xsp:logic>
                                                     for (int x=1; x
&lt; columns+1; x++) {

                                                            <data>
                                                                   <b>
 
<esql:get-column-name column="1"/>
 

                                                                   </b>
                                                            </data>
                                                     }
                                               </xsp:logic>
                                               </row>
                                               <esql:row-results>
                                                     <row>
                                                            <xsp:logic>
                                                     for (int x=1; x
&lt; columns+1; x++) {

                                                            <data>
 
<esql:get-ascii column="1"/>
 
</data>
                                                     }
                                               </xsp:logic>
                                                     </row>
                                               </esql:row-results>
                                        </table>
                                 </esql:results>
 
Everything is fine, but I don't know how I could change attributes
number COLUMN in tags
<esql:get-column-name/> and <esql:get-ascii/> and remove value "1" by
value of variable "x".
 
Thanx for some suggestion and help.
 
JayKay
 
------------------------------------------------------------------------
---------------------
  Jaroslav Kazmir
  Institute of Information Systems & Information Management
  JOANNEUM RESEARCH Forschungsgesellschaft mbH
  Steyrergasse 17, A-8010 Graz, AUSTRIA
 
  phone:  +43-316-876-1140                 fax: +43-316-876-1191
  web:    http://iis.joanneum.at
  e-mail: mailto:jaroslav.kazmir@joanneum.at
------------------------------------------------------------------------
---------------------
 


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>