Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 60252 invoked from network); 12 Apr 2004 14:15:21 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 12 Apr 2004 14:15:21 -0000 Received: (qmail 39588 invoked by uid 500); 12 Apr 2004 14:15:03 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 39491 invoked by uid 500); 12 Apr 2004 14:15:03 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 39476 invoked from network); 12 Apr 2004 14:15:03 -0000 Received: from unknown (HELO smtp813.mail.sc5.yahoo.com) (66.163.170.83) by daedalus.apache.org with SMTP; 12 Apr 2004 14:15:03 -0000 Received: from unknown (HELO alpha) (uchenna@sbcglobal.net@67.119.10.36 with login) by smtp813.mail.sc5.yahoo.com with SMTP; 12 Apr 2004 14:15:03 -0000 From: "Uchenna Igwebuike" To: Subject: RE: Help with binding - CFORMS Date: Mon, 12 Apr 2004 07:14:54 -0700 Message-ID: <004d01c42098$879da570$6500a8c0@alpha> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: <407A4964.3050700@outerthought.org> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N When I bind a form without selecting any data to the bean, I don't get any errors, but when it contains some selections I get the following error uncaught JavaScript exception: at material (file:/C:/projects/zes/construction/jboss-3.2.3/server/default/tmp/deplo y/tmp16629ZESApplication-0.1.ear-contents/Mercury.war/inventory/flow/inv entory.js, Line 64) at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line 164): org.apache.commons.jxpath.JXPathException: Exception trying to create xpath measureCollection; Factory is not set on the JXPathContext - cannot create path: /facility[1] The stack trace shows that the exception is thrown in the binding implementation org.apache.cocoon.forms.binding.MultiValueJXPathBinding, within doSave(Widget frmModel, JXPathContext jctx) throws BindingException method. Below is that block of code, is this not implemented completely ?? or is my configuration not correct??? (Note the sample in the distribution only binds the data to the bean during the loading) if (values != null) { // first update the values for (int i = 0; i < values.length; i++) { String path = this.rowPath + '[' + (i+1) + ']'; >>>>> Pointer rowPtr = multiValueContext.createPath(path); Object value = values[i]; if (value != null && convertor != null) { value = convertor.convertToString(value, convertorLocale, null); } rowPtr.setValue(value); } Below is my set up -----------Form Model ----------- material.facility.label material.facility.hint material.facility.help -------- Binding ------------------------ -- Form template - --------- material.facility.avialable.label material.facility.avialable.label -- Java Bean ---------- private Collection facility = new ArrayList(); public Collection getFacility() { return facility; } public void setFacility(Collection facility) { this.facility = facility; } -----Original Message----- From: Marc Portier [mailto:mpo@outerthought.org] Sent: Monday, April 12, 2004 12:47 AM To: users@cocoon.apache.org Subject: Re: Help with binding - CFORMS Uchenna Igwebuike wrote: > Does anyone have an example on how to bind data from and to a bean using > an ArrayList field to store multivalue data from a form > not yet (that I know of) what have you tried? and what doesn't work? -marc= -- Marc Portier http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center Read my weblog at http://blogs.cocoondev.org/mpo/ mpo@outerthought.org mpo@apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org