cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephane Delort" <Stephane.Del...@edag.de>
Subject [flowscript] importclass ?
Date Fri, 18 Jun 2004 13:56:32 GMT
>Note that you haven't added the user to the page (the viewdata
construction)
>in your script, so there is nothing to be displayed from the newUser
object.

Ok, but aren't we able to create objects whitout displaying them ?
(in my case a java class which will insert data in a database )

>I suppose main() works, although I would avoid using 'main' as name to avoid
>conflicts with assumptions elsewhere.

Yep, it was just a snippet, but I also changed it.

and by the way, it still does not work :(

I did not find a sample doing this kind of thing : calling an custom java class from the flowscript
with importClass ou importPackage.
If anyone saw one ......

Stephane



here is a copy of my latest try thanks to Helma :


cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");
function loginf()
{
     var form = new Form("forms/login.xml");
     form.showForm("login-display-pipeline");
     var model = form.getModel();

     var insert  = newUser.setName(model.name, model.password); // (a)
     var viewData = {user: newUser};
     cocoon.sendPage("confirm.jx",viewData);  // this page is never displayed if (a) and (b)
exists
}




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message