Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 77743 invoked from network); 17 May 2006 21:03:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 May 2006 21:03:40 -0000 Received: (qmail 63345 invoked by uid 500); 17 May 2006 21:03:38 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 63270 invoked by uid 500); 17 May 2006 21:03:38 -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 63217 invoked by uid 99); 17 May 2006 21:03:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 May 2006 14:03:37 -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; Wed, 17 May 2006 14:03:37 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7B7A671429D for ; Wed, 17 May 2006 21:03:07 +0000 (GMT) Message-ID: <4341197.1147899787502.JavaMail.jira@brutus> Date: Wed, 17 May 2006 21:03:07 +0000 (GMT+00:00) From: "Simone Gianni (JIRA)" To: dev@cocoon.apache.org Subject: [jira] Closed: (COCOON-1804) Javascript FOM_SCOPE issue when using Java as the flow engine - ReferenceError: "cocoon" is not defined In-Reply-To: <140092866.1142962978121.JavaMail.jira@ajax> 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-1804?page=all ] Simone Gianni closed COCOON-1804: --------------------------------- Fix Version: 2.1.10-dev (current SVN) Resolution: Fixed Committed the patch > Javascript FOM_SCOPE issue when using Java as the flow engine - ReferenceError: "cocoon" is not defined > ------------------------------------------------------------------------------------------------------- > > Key: COCOON-1804 > URL: http://issues.apache.org/jira/browse/COCOON-1804 > Project: Cocoon > Type: Bug > Components: Blocks: Java Flow > Versions: 2.1.8 > Reporter: Andrew Madu > Priority: Blocker > Fix For: 2.1.10-dev (current SVN) > Attachments: javaflow-fomcocoon.diff > > I have created a java flow class which does the following: > //Load in validation file > FormInstance form = new FormInstance("forms/login.xml"); > My login map (snippet) is as follows: > Login.xml: > > > var success = true; > var newUserReg = new Packages.test.User(); > var username = widget.lookupWidget("username"); > var password = widget.lookupWidget("password"); > > try { > > var checkUserTest = newUserReg.getUser(username.value, password.value); > > if (checkUserTest != null) { > cocoon.session.setAttribute("user", checkUserTest); > success = true; > }else{ > username.setValidationError(new Packages.org.apache.cocoon.forms.validation.ValidationError(e, false)); > password.setValidationError(new Packages.org.apache.cocoon.forms.validation.ValidationError("The password, username combination does not exist. Please enter another one.", false)); > success = false; > } > } catch (e) { > username.setValidationError(new Packages.org.apache.cocoon.forms.validation.ValidationError(e, false)); > password.setValidationError(new Packages.org.apache.cocoon.forms.validation.ValidationError("e.", false)); > success = false; > } > return success; > > > I am getting an error message when the line 'cocoon.session.setAttribute("user", checkUserTest)' is hit.: > ReferenceError: "cocoon" is not defined > What is the issue here, can I create a session object from within form validation/javascript in another way? > Andrew -- 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