Hi,
I made a simple flowscript which would call a home made java class.
Here is the flowsctipt :
cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");
function main()
{
importClass(com.myCompany.myProject.User);
importPackage(java.util);
var form = new Form
Hi Helma,
I tried to comment the form but it does not work.
The only wayto make things working "correctly" is to comment the line
var newUser = new Packages.com.myCompany.myProject.User();
and the ones which refer to the newUser objects.
Does my class needs to extend, implement special cl
Helma,
If I use your sample script I only have a white page with no code.
Also, I must say that I adapted your sample to my app :
cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");
importPackage(Packages.toto.titi);
function main()
{
//var form = new Form("forms/logi
>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
Hi,
Finally I had access to the Jetty messages:
My class is in .../webapp/WEB-INF/class/org/apache/
(both User.java and home compiled User.class are uner the same path)
I know that this place is not the better one, but it is just for
testing.
So, in my flowscript I have (followinf Helma's eg):
When I try and import the following class into my flowscript:importClass(Packages.com.paypal.soap.api.*);I get an: 'missing name after . operator' error message. If I do the following:importClass(Packages.com.paypal.soap.api);I get an: Not a Java class: [JavaPackage com.paypal.soap.api]error messag
Hello Stephane,
it is very simple! You only have to write:
...
importClass(Packages.com.xyz.MyClass);
...
In your code the string "Packages." is missing!
see also at http://cocoon.apache.org/2.1/userdocs/flow/java.html
I hope that helps!
Dirk
Stephane Delort wrote:
Hi,
I made a simple flowscript w
Xtemplate
}
If this works, add the form and check again.
HTH.
Bye, Helma
> -Original Message-
> From: Stephane Delort [mailto:[EMAIL PROTECTED]
> Sent: Friday, 18 June 2004 12:52
> To: [EMAIL PROTECTED]
> Subject: [flowscript] importclass ?
>
>
>
> Hi,
>
Not really. I use home-made classes myself and that works ok. What exactly
does not work if you use my sample script?
Bye, Helma
> -Original Message-
> From: Stephane Delort [mailto:[EMAIL PROTECTED]
> Sent: Friday, 18 June 2004 13:21
> To: [EMAIL PROTECTED]
> Subje
> -Original Message-
> From: Stephane Delort [mailto:[EMAIL PROTECTED]
> Sent: Friday, 18 June 2004 14:09
> To: [EMAIL PROTECTED]
> Subject: [flowscript] importclass ?
>
>
> Helma,
>
>
> If I use your sample script I only have a white page with no
>
ane Delort [mailto:[EMAIL PROTECTED]
> Sent: Friday, 18 June 2004 15:57
> To: [EMAIL PROTECTED]
> Subject: [flowscript] importclass ?
>
>
> >Note that you haven't added the user to the page (the viewdata
> construction)
> >in your script, so there is not
Andrew Madu wrote:
>
> When I try and import the following class into my flowscript:
>
> importClass(Packages.com.paypal.soap.api.*);
>
> I get an:
>
> '*missing name after . operator*'
>
>
> error message. If I do the following:
>
>
> i
Jason,The error messages are pretty clear, importClass() requires a Java class as an argument, my bad! Yes I should have simply stated importPackage(). Time for some sleep me thinks!!!regardsAndrew
13 matches
Mail list logo