cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: [1.8-dev patch] Global Vars in XSP - xsp:variable
Date Fri, 22 Sep 2000 13:07:28 GMT
Donald Ball wrote:
> 
> On Thu, 21 Sep 2000, Kevin Sonney wrote:
> 
> > On Thu, 21 Sep 2000, Donald Ball wrote:
> > > hrm? in what sense can you not pass <xsp:expr> expressions into esql?
> >
> > <page>
> > <xsp:logic>
> >       UserRecord user = new UserRecord(<response:get-parameter
> > name="user"/>);
> > </xsp:logic>
> > <esql:execute-query>
> >       &sql_driver_info;
> >       <esql:query>select meu_item from menu_list where menu_allowed =
> > <xsp:expr>user.getMenuAllowed()</xsp:expr></esql:query>
> >       <esql:results>
> >       <meuitem><esql:get-string column="menu_item"/></menuitem>
> >       </esql:results>
> > </esql:execute-query>
> >
> > will generate something along the lines of
> >
> > Class or Variable 'user' not declaired : user.getMenuAllowd()
> 
> that's strictly due to the fact that i'm using those silly interior
> methods. maybe i'll make that optional, you're not the only one to get
> bitten here... note if you're using global variables in this sense, your
> xsp page will _not_ be threadsafe.

This is the reason why we didn't have <variable> in <structure> and I
still think this is the way to go since global variables simplify your
job at first but bite you back when you turn around.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message