cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <mailingli...@c-ware.de>
Subject Re: ajax request and another cform in the same page
Date Mon, 14 May 2007 10:39:17 GMT
Hi Marc,

do I understand your problem correct, that you have two forms on your 
page? This can be a problem. Since having a deeper cook into JavaFlow I 
could see, that the form instance is bound to an AvalonContext with a 
fixed Name. This means, that one FormInstance should overwrite the other 
one. I don't exactyl know how this is implemented in FlowScript, but 
since Generators like the SuggestionListGenerator also looks for a 
hard-coded "CocoonFormsInstnce" object, I guess this is generally done 
that way.

Even if I know this doesn't help you solve the problem ... maybe it 
helps you find it.

Feel free to contact me. I will do my best to help you if you provide a 
little more detailed description of your problem / applicatoin setup / 
intention.

Chris

Marc Salvetti schrieb:
> Hello,
>
> i'm running in a tricky problem while trying to add a search form to 
> every page of the site.
> Anytime an ajax request is sent, either by a cform widget on another 
> form, or by a custom js function, i get an error 500 :
> *Couldn't evaluate expression cformsHelper.pushWidget(id)*
> resource://org/apache/cocoon/forms/generation/jx-macros.xml - 45:52 	//
>
>
> with a NPE in the pushWidget() method.
> Caused by: java.lang.NullPointerException
> 	at org.apache.cocoon.forms.generation.JXMacrosHelper.pushWidget(JXMacrosHelper.java:163)
> 	at org.apache.cocoon.forms.generation.JXMacrosHelper.pushWidget(JXMacrosHelper.java
> :231)
> 	at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
>
> 	at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:268)
> 	at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:61)
> 	at org.apache.commons.jexl.parser.ASTReference.execute
> (ASTReference.java:68)
> 	at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:50)
> 	at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:86)
> 	at org.apache.cocoon.components.expression.jexl.JexlExpression.evaluate
> (JexlExpression.java:47)
> 	... 135 more
>
>
> By looking at the source, it appears that the member updatedWidgets 
> has not been initialized before the call to pushWiget, which cause the 
> NPE. Apparently, this is initialized in the call to form.process(), 
> every time the form is submited.
>
> But in my case, i don't submit this form, but either another form or 
> no form at all, so i don't really know what i should do to fix this 
> problem.
>
> Any help  would be greatly appreciated,
>
> Marc



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


Mime
View raw message