Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 10159 invoked from network); 14 Oct 2006 05:20:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Oct 2006 05:20:26 -0000 Received: (qmail 78389 invoked by uid 500); 14 Oct 2006 05:20:24 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 78333 invoked by uid 500); 14 Oct 2006 05:20:24 -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 78322 invoked by uid 99); 14 Oct 2006 05:20:24 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Oct 2006 22:20:24 -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, 13 Oct 2006 22:20:23 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 955F57142FA for ; Fri, 13 Oct 2006 22:19:38 -0700 (PDT) Message-ID: <28564856.1160803178609.JavaMail.jira@brutus> Date: Fri, 13 Oct 2006 22:19:38 -0700 (PDT) From: "Antonio Gallardo (JIRA)" To: dev@cocoon.apache.org Subject: [jira] Commented: (COCOON-1825) Ajax errror when an active state widget become invisible state widget In-Reply-To: <729863521.1144935681641.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-1825?page=comments#action_12442267 ] Antonio Gallardo commented on COCOON-1825: ------------------------------------------ IN the first part of the patch, there is: + + I don't think it is a good idea to have the same id in 2 different elements. It seems like it might blow somewhere else. how we can fix this? > Ajax errror when an active state widget become invisible state widget > --------------------------------------------------------------------- > > Key: COCOON-1825 > URL: http://issues.apache.org/jira/browse/COCOON-1825 > Project: Cocoon > Issue Type: Bug > Components: Blocks: Forms > Affects Versions: 2.1.9 > Reporter: vincent Demay > Assigned To: Antonio Gallardo > > Some widget (field with selection-list and styling=radio, group, etc...) can not be hidden (state=invisible)in ajax mode. > I declare some widgets without state attribute in the form definition, my form is in ajax mode, when I set the widget state to INVISIBLE, the ajax response can not be applied to the form because ... is not available in source code. > I think about 2 patches : > *putting a in forms-field-styling.xsl where is not set > *or modifing abstractWidgetDefinition.java in ordre to generate a placeholder around each widget (but patch seems to need a lot of modification in forms-field-styling.xsl too) > Here is the patch for first > --- forms-field-styling.orig 2006-04-13 15:37:06.590221200 +0200 > +++ forms-field-styling.xsl 2006-04-13 15:38:22.525291200 +0200 > @@ -198,8 +198,9 @@ > > > > - > -
> + > + > +
> > > > @@ -224,6 +225,7 @@ > > >
> +
> > > > @@ -682,22 +684,24 @@ > | know where to insert the widget if it becomes visible > +--> > > - > + > > > > > - > + > > > > > - > + > > + > + > > > > Here for the second > --- AbstractWidget.orig 2006-04-13 15:31:07.851701200 +0200 > +++ AbstractWidget.java 2006-04-13 15:30:31.446616200 +0200 > @@ -483,6 +483,10 @@ > public void generateSaxFragment(ContentHandler contentHandler, Locale locale) > throws SAXException { > > + AttributesImpl placeHolderAttrs = new AttributesImpl(); > + placeHolderAttrs.addCDATAAttribute("id", getRequestParameterName()); > + contentHandler.startElement(FormsConstants.INSTANCE_NS, "placeholder", FormsConstants.INSTANCE_PREFIX_COLON + "placeholder", placeHolderAttrs); > + > if (getCombinedState().isDisplayingValues()) { > // FIXME: we may want to strip out completely widgets that aren't updated when in AJAX mode > String element = this.getXMLElementName(); > @@ -497,15 +501,9 @@ > > generateItemSaxFragment(contentHandler, locale); > > - contentHandler.endElement(FormsConstants.INSTANCE_NS, element, FormsConstants.INSTANCE_PREFIX_COLON + element); > - > - } else { > - // Generate a placeholder that can be used later by AJAX updates > - AttributesImpl attrs = new AttributesImpl(); > - attrs.addCDATAAttribute("id", getRequestParameterName()); > - contentHandler.startElement(FormsConstants.INSTANCE_NS, "placeholder", FormsConstants.INSTANCE_PREFIX_COLON + "placeholder", attrs); > - contentHandler.endElement(FormsConstants.INSTANCE_NS, "placeholder", FormsConstants.INSTANCE_PREFIX_COLON + "placeholder"); > + contentHandler.endElement(FormsConstants.INSTANCE_NS, element, FormsConstants.INSTANCE_PREFIX_COLON + element); > } > + contentHandler.endElement(FormsConstants.INSTANCE_NS, "placeholder", FormsConstants.INSTANCE_PREFIX_COLON + "placeholder"); > } > > public Object getAttribute(String name) { -- 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