cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: _esql_connection.connection should be public
Date Tue, 13 May 2003 12:18:40 GMT
On 13.May.2003 -- 01:53 PM, Enke, Michael wrote:
> Christian Haul wrote:
> > 
> > On 12.May.2003 -- 02:32 PM, Enke, Michael wrote:
> > > Torsten Curdt wrote:
> > > >
> > > > > IMHO a new esql tag would be the best.
> > > > > If we make it outside esql we have to care about all imports and
try/catch
> > > > > and what else is realted to java.sql.* in the xsp. This is not necessary
when
> > > > > we make it with esql.
> > > > > If we create a new tag for returning the connection, I propose also
to create a tag
> > > > > for returning a ResultSet and ResultSetMetaData.
> > > > > Than we have more freedom in manipulating/assigning all kind of DB
related data.
> > > >
> > > > not sure if ResultSet and ResultSetMetaData is really necessary but...
> > > > care enough for a patch? ;-)
> > >
> > > for variable asignment like:
> > >
> > > double d[] = new doubel[<esql:get-column-count/>];
> > > for(int i=0;i<d.length;i++) d[i] = _esql_query.getResultSet().getDouble(i+1);
> > >
> > > I can not say: d[i] = <esql:get-double><xsp:attribute name="column"><xsp:expr>i</xsp:expr></xsp:attribute></esql:get-double>
> > >
> > > Or can I?
> > 
> > Yes, you can:
> > 
> >   d[i] = <esql:get-double><esql:column><xsp:expr>i</xsp:expr></esql:column></esql:get-double>
> > 
> 
> Hi Chris,
> my code is (inside <xsp:logic>) now
> 
> double d = <esql:get-double><esql:column><xsp:expr>i+1</xsp:expr></esql:column></esql:get-double>;
> 
> This doesn't work. I see:

Sorry, my fault: It actually needs to be <esql:param name="column"/>,
not <esql:column/>:

 double d = <esql:get-double><esql:param name="column"><xsp:expr>i+1</xsp:expr></esql:param></esql:get-double>;


> But nevertheless, I started this thread because I need the connection inside xsp.
> In esql.xsl, there is a tag esql:get-connection:
> <xsl:template match="esql:connection/esql:get-connection">
>   <xsp:expr>_esql_connection</xsp:expr>
> </xsl:template>
> 
> This is probably an error and should read correctly:
> <xsl:template match="esql:connection//esql:get-connection">
>   <xsp:expr>_esql_connection.connection</xsp:expr>
> </xsl:template>
> (two slashes and .connection)
> but for this too, connection in Cocoon2EsqlConnection has to be public
> or it should call a getter method.

Right.

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

Mime
View raw message