cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Hermann <christoph.herm...@guschtel.de>
Subject Re: Repost from users list: Cforms Repeater - Cancel delete action via javascript
Date Tue, 30 Aug 2005 16:37:23 GMT
Sylvain Wallez schrieb:

Hello,

>>> Then you can simply call someWidget.setValidationError(...) from within
>>> your event listener.

>> Well this is actually what is not working.
>> If i do a repeater.setValidationError(...); in my "normal" action, i do
>> not get any validation error (as written in the docs: "When an action
>> widget was activated, validation will not be performed. ...").

> Well, although a repeater, as every widget, can have a validation error,
> there's no associated presentation defined for it in the styling
> stylesheets, which explains why you don't see the error!

Okay. Thanks for your help so far. I get the validation Error displayed,
but not correctly:
repeater.setValidationError(new
Packages.org.apache.cocoon.forms.validation.ValidationError("general.field-required",false));

This is ok, but the error displays as "".

When i try to enable i18n:

repeater.setValidationError(new
Packages.org.apache.cocoon.forms.validation.ValidationError("general.field-required",true));

OR

repeater.setValidationError(new
Packages.org.apache.cocoon.forms.validation.ValidationError("someString"));

i get:
---snip---
org.apache.cocoon.transformation.I18nTransformer: nested i18n:text
elements are not allowed. Current state: 10

org.apache.cocoon.ProcessingException: Error executing pipeline.:
org.xml.sax.SAXException:
org.apache.cocoon.transformation.I18nTransformer: nested i18n:text
elements are not allowed. Current state: 10
---snap---

I copied a Stacktrace to the end of this message.

>> Even when calling form.validate(); (This is what i did).
>>  
>>
> 
> form.validate() validates the whole form by calling each widget's
> validators. This isn't what you want to do here.

I thought (referring to the docs) that no validation takes place when
submitted via a "normal" action. This is why i wanted to trigger the
whole Form validation.

Christoph

--- Stacktrace: ---

org.xml.sax.SAXException:
org.apache.cocoon.transformation.I18nTransformer: nested i18n:text
elements are not allowed. Current state: 10
	at
org.apache.cocoon.transformation.I18nTransformer.startI18NElement(I18nTransformer.java:1226)
	at
org.apache.cocoon.transformation.I18nTransformer.startElement(I18nTransformer.java:1136)
	at
org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:94)
	at
org.apache.cocoon.forms.transformation.EffectWidgetReplacingPipe$StylingContentHandler.startElement(EffectWidgetReplacingPipe.java:876)
	at org.apache.cocoon.forms.util.I18nMessage.toSAX(I18nMessage.java:118)
	at
org.apache.cocoon.forms.validation.ValidationError.generateSaxFragment(ValidationError.java:85)
	at
org.apache.cocoon.forms.transformation.EffectWidgetReplacingPipe$ValidationErrorHandler.endElement(EffectWidgetReplacingPipe.java:910)
	at
org.apache.cocoon.forms.transformation.EffectPipe.endElement(EffectPipe.java:522)
	at
org.apache.cocoon.components.sax.XMLTeePipe.endElement(XMLTeePipe.java:89)
	at
org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XMLByteStreamInterpreter.java:100)
	at
org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByteStreamInterpreter.java:73)
	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:267)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:483)
	at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.handleCocoonRedirect(ConcreteTreeProcessor.java:298)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.access$000(ConcreteTreeProcessor.java:47)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor$TreeProcessorRedirector.cocoonRedirect(ConcreteTreeProcessor.java:339)
	at
org.apache.cocoon.environment.ForwardRedirector.redirect(ForwardRedirector.java:59)
	at
org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo(AbstractInterpreter.java:209)
	at
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.forwardTo(FOM_JavaScriptInterpreter.java:894)
	at
org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.forwardTo(FOM_Cocoon.java:698)
	at
org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsFunction_sendPage(FOM_Cocoon.java:269)
	at inv6.invoke()

Mime
View raw message