Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 50399 invoked from network); 1 Sep 2006 15:53:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Sep 2006 15:53:48 -0000 Received: (qmail 91451 invoked by uid 500); 1 Sep 2006 15:53:47 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 91337 invoked by uid 500); 1 Sep 2006 15:53:46 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 91326 invoked by uid 99); 1 Sep 2006 15:53:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Sep 2006 08:53:46 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Sep 2006 08:53:45 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5792E7142F4 for ; Fri, 1 Sep 2006 15:50:23 +0000 (GMT) Message-ID: <25616867.1157125823356.JavaMail.jira@brutus> Date: Fri, 1 Sep 2006 08:50:23 -0700 (PDT) From: "Lars Trieloff (JIRA)" To: dev@cocoon.apache.org Subject: [jira] Updated: (COCOON-1906) [PATCH] simple-xml binding does not work with non file sources In-Reply-To: <11479914.1157125162633.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/COCOON-1906?page=all ] Lars Trieloff updated COCOON-1906: ---------------------------------- Attachment: cocoon-formsbinding-sourceutil.patch This patch adds another method to the SourceUtil class that helps Rhino in resolving the ambiguity between toSAX(Source,ContentHandler) and toSAX(XMLizable,ContentHandler) when dealing with a SitemapSource. The example above runs perfectly when this patch is applied. > [PATCH] simple-xml binding does not work with non file sources > -------------------------------------------------------------- > > Key: COCOON-1906 > URL: http://issues.apache.org/jira/browse/COCOON-1906 > Project: Cocoon > Issue Type: Bug > Components: Blocks: Forms, * Cocoon Core > Affects Versions: 2.2-dev (Current SVN) > Reporter: Lars Trieloff > Attachments: cocoon-formsbinding-sample.patch, cocoon-formsbinding-sourceutil.patch > > > The cocoon forms flowscript API comes with a helper method form.loadXML, that retrieves data from an xml document. The current implementation however does not work with documents that are referenced not as files, but as SitemapSources, e.g. via the cocoon:/ or xmldb:// pseudo-protocol. In this case the Rhino engine is unable to resolve the ambiguity between two method signatures: > org.mozilla.javascript.EvaluatorException: "resource://org/apache/cocoon/forms/flow/javascript/Form.js", line 287: The choice of Java constructor toSAX matching JavaScript argument types (org.apache.cocoon.components.source.impl.SitemapSource,org.apache.cocoon.forms.util.XMLAdapter) is ambiguous; candidate constructors are: > void toSAX(org.apache.excalibur.xml.sax.XMLizable,org.xml.sax.ContentHandler) > void toSAX(org.apache.excalibur.source.Source,org.xml.sax.ContentHandler) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira