Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 83453 invoked from network); 8 Apr 2004 16:50:29 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 8 Apr 2004 16:50:29 -0000 Received: (qmail 31282 invoked by uid 500); 8 Apr 2004 16:50:16 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 31256 invoked by uid 500); 8 Apr 2004 16:50:16 -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 31240 invoked from network); 8 Apr 2004 16:50:16 -0000 Received: from unknown (HELO keow.org) (69.41.247.100) by daedalus.apache.org with SMTP; 8 Apr 2004 16:50:16 -0000 Received: (qmail 11712 invoked by uid 1000); 8 Apr 2004 17:02:54 -0000 Date: Thu, 8 Apr 2004 18:02:54 +0100 From: Tim Larson To: dev@cocoon.apache.org Subject: Re: disabling widgets Message-ID: <20040408170254.GD9688@keow.org> References: <407142EA.9000906@apache.org> <20040405153742.GV20141@keow.org> <40753DC0.2060503@reverycodes.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40753DC0.2060503@reverycodes.com> User-Agent: Mutt/1.3.28i 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 On Thu, Apr 08, 2004 at 07:55:44AM -0400, Vadim Gritsenko wrote: > Tim Larson wrote: > >We need to be able to specify the hidden state and the > >selection of {both|output|input|neither} both statically in > > +1 > > >the widget definitions and dynamically via flowscript, Java, > >binding, and event handling, but not via the view, of course. > > I don't see a necessity to provide so much flexibility. Ok, maybe not all of it yet, but I do have a use case right now for being able to dynamically switch between the normal "both" mode and "output"-only mode. In the Form Model GUI I want to default to showing the widget definitions with an easy-on-the-eyes read-only summary, and for each widget definition have a button/checkbox/tab/whatever to switch just the selected widget definition(s) to collections of editable input widgets like the sample has now. We could solve this several ways: * Make the both|output|etc. setting dynamically settable as suggested above. * Introduce "alias" widgets to hold configuration, while referencing other widgets for the data, and then wrap alternate "both" and "output" alias widgets in a "choice" widget to control what is sent to the view layer. * (Hacky) Have the view layer contain a hidden input for these output widgets so that readFromRequest does not reset these output-styled field widgets to null. * (Non-portable, but sometimes a good option) Only use client-side tools (js/xul/etc.) to switch between modes. WDYT --Tim Larson