cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Salvetti" <>
Subject ajax request and another cform in the same page
Date Mon, 14 May 2007 08:05:12 GMT

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(
	at org.apache.cocoon.forms.generation.JXMacrosHelper.pushWidget(
	at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(
	at org.apache.commons.jexl.parser.ASTMethod.execute(
	at org.apache.commons.jexl.parser.ASTReference.execute(
	at org.apache.commons.jexl.parser.ASTReference.value(
	at org.apache.commons.jexl.ExpressionImpl.evaluate(
	at org.apache.cocoon.components.expression.jexl.JexlExpression.evaluate(
	... 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,


View raw message