Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 18174 invoked from network); 21 Nov 2003 21:02:12 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 21 Nov 2003 21:02:12 -0000 Received: (qmail 47190 invoked by uid 500); 21 Nov 2003 21:01:58 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 47137 invoked by uid 500); 21 Nov 2003 21:01:57 -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 Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 47124 invoked from network); 21 Nov 2003 21:01:57 -0000 Received: from unknown (HELO web41904.mail.yahoo.com) (66.218.93.155) by daedalus.apache.org with SMTP; 21 Nov 2003 21:01:57 -0000 Message-ID: <20031121210203.5144.qmail@web41904.mail.yahoo.com> Received: from [65.116.199.18] by web41904.mail.yahoo.com via HTTP; Fri, 21 Nov 2003 13:02:03 PST Date: Fri, 21 Nov 2003 13:02:03 -0800 (PST) From: Timothy Larson Subject: [Patch] Output widget support for ScriptableWidget.java To: dev@cocoon.apache.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1043615439-1069448523=:4598" 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 --0-1043615439-1069448523=:4598 Content-Type: text/plain; charset=us-ascii Content-Id: Content-Disposition: inline Attached is a patch for Woody's ScriptableWidget.java to support getting and setting the value of an Output widget. --Tim Larson __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ --0-1043615439-1069448523=:4598 Content-Type: text/plain; name="ScriptableWidget.diff" Content-Description: ScriptableWidget.diff Content-Disposition: inline; filename="ScriptableWidget.diff" diff -Naur orig/ScriptableWidget.java mod/ScriptableWidget.java --- orig/ScriptableWidget.java 2003-11-21 15:57:48.000000000 -0500 +++ mod/ScriptableWidget.java 2003-11-21 15:56:50.000000000 -0500 @@ -53,6 +53,7 @@ import org.apache.cocoon.woody.formmodel.BooleanField; import org.apache.cocoon.woody.formmodel.Field; import org.apache.cocoon.woody.formmodel.MultiValueField; +import org.apache.cocoon.woody.formmodel.Output; import org.apache.cocoon.woody.formmodel.Repeater; import org.apache.cocoon.woody.formmodel.Widget; import org.mozilla.javascript.Context; @@ -140,7 +141,8 @@ if (sub != null) { if (sub instanceof Field || sub instanceof BooleanField || - sub instanceof AggregateField) { + sub instanceof AggregateField || + sub instanceof Output) { return sub.getValue(); } return wrap(sub); @@ -242,6 +244,10 @@ BooleanField field = (BooleanField)sub; value = unwrap(value); field.setValue(value); + } else if (sub instanceof Output) { + Output field = (Output)sub; + value = unwrap(value); + field.setValue(value); } else if (sub instanceof Repeater) { Repeater repeater = (Repeater)sub; if (value instanceof NativeArray) { --0-1043615439-1069448523=:4598--