On Fri, 2003-09-05 at 18:40, Stephan Niedermeier wrote:
> Hello,
>
> at first I would say that the concept of Control Flow is one of the
> best concepts I have ever heard in web development. The use of Flow
> Script is very easy and fantastic. But there is one big problem for
> me: It's not possible to use the Flow Script in professional
> applications! The reason: There are many, many problems of using
> Java-Code in the Flow Script.
>
> An example: Why cause the following lines a NullPointerException
>
> function main() {
>
> importClass(Packages.foo.bar.User);
>
> user = new User();
> user.setName("Donald Duck");
> user.setPassword("foo");
> user.setActive(false);
>
> cocoon.sendPage("example.jxt",{"user", user});
I think you got a typo here: {"user" : user}
note the colon between "user" and user.
As the other reply suggested, always use "var" when introducing new
variables. Otherwise your variable with belong to the global scope and
will cause implicit session creation.
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED] [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]