Is there anyway we can convince you to use the Apache license rather then
the GPL?  That would bring your project base into the same license as GWT,
so it would be easier to grab code.

I like the idea of a set of widgets used to rapidly create forms.   It  will
be a little tricky to get right, because we'd want to explicitly not make
any assumptions about data binding or validation.   How cleanly we can do
that influences how much we should try this before the data
binding/validation framework is in place.

What about the idea of creating a QuestionWidget hierarchy? Then we would
have Questions like TextQuestion, RadioButtonQuestion, and, of course a
QuestionPanel, where the QuestionPanel takes in a set of QuestionWidgets
and QuestionLayoutRules.


The Questions could then implement HasValue<String/Boolean/Integer> and fire
SelectionEvents. This would make it easy for the QuestionLayoutPanel to
figure out when to fire a given QuestionLayoutRule, where a
QuestionLayoutRule takes in a set of Questions and is activated if any of
those Questions change state.  The hope is that we could then  share the
same visual framework with a variety of data-binding and validation
frameworks, as we are not putting anything but presentation code into the
actual Question widgets.  For instance, it might be possible to generate at
compile time QuestionPanel from an xforms template  :-)

So, here is some sample code.
      QuestionPanel MedicalForm = new QuestionPanel();
      List<String> yesNoMaybe = ListUtil.create("yes","no", "maybe");
      RadioButtonQuestion gender = new RadioButtonQuestion("gender",
yesNoMaybe);
      CheckBoxQuestion pregnant = new CheckBoxQuestion("Are you pregnant?",
yesNoMaybe);
      MedicalForm.add(gender);
      MedicalForm.addQuestionLayoutRule(new InsertIfEqualRule(gender,"yes",
pregnant));


   Cheers,

          Emily

On Wed, Oct 8, 2008 at 4:42 PM, Arthur Kalmenson <[EMAIL PROTECTED]>wrote:

>
> As I mentioned before (http://groups.google.com/group/Google-Web-
> Toolkit-Contributors/browse_thread/thread/b696e7319fc6bea/), I'm
> looking to contribute our project back to the incubator as I refactor/
> rebuild it. One of the main things that we were looking to simplify
> was visibility management.
>
> In our particular use cases, almost every application we build has a
> relatively extensive form with complex visibility logic. For example,
> if the user presses "Yes" on a radio button, another few fields open
> up and they fill those fields out. The way that this logic is
> currently done in GWT is through listeners and a lot of manual work.
> The module that we created was suppose to simplify this. Here's what
> we have so far.
>
> We have something called a FormatPanel that allows you to make calls
> like showIfSet(Widget a, Widget b, VisibilityRule rule). The
> VisibilityRule sets listeners and so receives events from widgets a
> and b. It then determines if widget "b" should be shown depending on
> the value of widget a. There is also a hideIfSet() method.
>
> Does this approach make sense? Let me know what you think. I'll
> continue updating this part of the project and I'll try to post some
> code and more concrete examples in the next few days. I'm just
> wondering if the approach makes sense to people. Thank you.
>
> Regards,
> Arthur Kalmenson
> >
>


-- 
"There are only 10 types of people in the world: Those who understand
binary, and those who don't"

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to