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