[gwt-contrib] Re: RR: visibility logic management
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 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 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 -~--~~~~--~~--~--~---
[gwt-contrib] Re: data binding framework for GWT
Hi Ray, I can't answer you fully right now because I'm supposed to be leaving, but I'll think about your suggestion and get back to you. As it is, BoundFieldImpl constructs its editor lazily so perhaps a BoundField could be given an editor rather than constructing one itself. Also, regarding the problem of binding fields to arbitrary widgets, my existing API works with Editors and Viewers. Both interfaces define a Widget asWidget() that is expected to return this. In other words, it's sort of assumed that implementations of Editor and Viewer are also subclasses of Widget. Perhaps we don't need to worry about arbitrary widgets because of that. If you want to look at my code, take a peek at HasTextEditor in ca.petersens.gwt.databinding.client.ui. There could be more editors like it to support certain subtypes of Widget. Ian --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r3727 - in changes/jat/oophm-branch/plugins/xpcom: . VisualStudio
Author: [EMAIL PROTECTED] Date: Wed Oct 8 15:43:45 2008 New Revision: 3727 Modified: changes/jat/oophm-branch/plugins/xpcom/ExternalWrapper.cpp changes/jat/oophm-branch/plugins/xpcom/FFSessionHandler.cpp changes/jat/oophm-branch/plugins/xpcom/JavaObject.cpp changes/jat/oophm-branch/plugins/xpcom/Makefile.mac changes/jat/oophm-branch/plugins/xpcom/VisualStudio/firefox-xpcom.vcproj changes/jat/oophm-branch/plugins/xpcom/XpcomDebug.cpp changes/jat/oophm-branch/plugins/xpcom/install-template.rdf changes/jat/oophm-branch/plugins/xpcom/xpOOPHM.rc Log: Changes from review. Review by: bobv Modified: changes/jat/oophm-branch/plugins/xpcom/ExternalWrapper.cpp == --- changes/jat/oophm-branch/plugins/xpcom/ExternalWrapper.cpp (original) +++ changes/jat/oophm-branch/plugins/xpcom/ExternalWrapper.cpp Wed Oct 8 15:43:45 2008 @@ -58,6 +58,7 @@ return NS_OK; } +// TODO: handle context object passed in (currently nsIDOMWindow below) NS_IMETHODIMP ExternalWrapper::Connect(const nsACString & aAddr, const nsACString & aModuleName, nsIDOMWindow* domWindow, PRBool *_retval) { Debug::log(Debug::Spam) << "Address: " << aAddr << " Module: " << aModuleName << Debug::flush; @@ -101,6 +102,7 @@ userAgent.c_str(), sessionHandler.get()); + // TODO: return session object? *_retval = true; return NS_OK; } Modified: changes/jat/oophm-branch/plugins/xpcom/FFSessionHandler.cpp == --- changes/jat/oophm-branch/plugins/xpcom/FFSessionHandler.cpp (original) +++ changes/jat/oophm-branch/plugins/xpcom/FFSessionHandler.cpp Wed Oct 8 15:43:45 2008 @@ -96,7 +96,7 @@ Debug::log(Debug::Error) << "Error creating toString tear-off" << Debug::flush; } -// TODO(jat): what to do here? +// TODO(jat): show some crash page and die } } @@ -186,6 +186,7 @@ } jsval funcVal; + // TODO: handle non-ASCII method names if (!JS_GetProperty(ctx, global, methodName.c_str(), &funcVal)) { Debug::log(Debug::Error) << "Could not get function " << methodName << Debug::flush; return true; @@ -206,13 +207,9 @@ } } - // Debug::log(Debug::Spam) << "JS_IsExceptionPending: " << JS_IsExceptionPending(ctx) - //<< Debug::flush; if (JS_IsExceptionPending(ctx)) { JS_ClearPendingException(ctx); } - // Debug::log(Debug::Spam) << "JS_IsExceptionPending: " << JS_IsExceptionPending(ctx) - //<< Debug::flush; jsval rval; JSBool ok = JS_CallFunctionValue(ctx, JSVAL_TO_OBJECT(jsThis), funcVal, @@ -502,6 +499,7 @@ javaObjectsToFree.insert(objectId); } +// TODO: investigate multiple module/tab scenario static JSContextCallback oldCallback; static std::map contextMap; static bool registeredCallback = false; Modified: changes/jat/oophm-branch/plugins/xpcom/JavaObject.cpp == --- changes/jat/oophm-branch/plugins/xpcom/JavaObject.cpp (original) +++ changes/jat/oophm-branch/plugins/xpcom/JavaObject.cpp Wed Oct 8 15:43:45 2008 @@ -118,13 +118,13 @@ Debug::log(Debug::Spam) << "JavaObject::getProperty obj=" << obj << Debug::flush; SessionData* data = JavaObject::getSessionData(ctx, obj); if (!data) { +// TODO: replace the frame with an error page instead? *rval = JSVAL_VOID; return JS_TRUE; } int objectRef = JavaObject::getObjectId(ctx, obj); if (JSVAL_IS_STRING(id)) { JSString* str = JSVAL_TO_STRING(id); -#if 1 if ((JS_GetStringLength(str) == 8) && !strncmp("toString", JS_GetStringBytes(str), 8)) { *rval = data->getToStringTearOff(); @@ -135,14 +135,15 @@ *rval = INT_TO_JSVAL(objectRef); return JS_TRUE; } -#endif Debug::log(Debug::Error) << "Getting unexpected string property " << dumpJsVal(ctx, id) << Debug::flush; +// TODO: throw a better exception here return JS_FALSE; } if (!JSVAL_IS_INT(id)) { Debug::log(Debug::Error) << "Getting non-int/non-string property " << dumpJsVal(ctx, id) << Debug::flush; +// TODO: throw a better exception here return JS_FALSE; } int dispId = JSVAL_TO_INT(id); @@ -160,6 +161,7 @@ Debug::log(Debug::Spam) << "JavaObject::setProperty obj=" << obj << Debug::flush; if (!JSVAL_IS_INT(id)) { Debug::log(Debug::Error) << " Error: setting string property id" << Debug::flush; +// TODO: throw a better exception here return JS_FALSE; } @@ -178,11 +180,13 @@ SessionHandler* handler = data->getSessionHandler(); if (!ServerMethods::setProperty(*channel, handler, objectRef, dispId, value)) { +// TODO: throw a better exception here return JS_FALSE; } return JS_TRUE; } +// TODO: can this be removed now? JSBo
[gwt-contrib] Re: data binding framework for GWT
Ian, Something struck me about the way you are approaching things, that is, letting the BoundField's return widgets. With the new HasData stuff being proposed, why not let the programmer create the widget, and bind the field to an already created widget? (if the widgets export an interface like HasData which permits wiring them up.) That seems to provide more flexibility, since people tend to design the look and layout of the widgets and wire up the logic separately. Couldn't the API look more like this? PersonForm form = GWT.create(PersonForm.class); form.getFirstName().bind(existingWidget, personInstance); form.getLastName().bind(anotherExistingWidget, personInstance); or perhaps form.bindInstance(personInstance). getFirstName().bind(widget1). getLastName().bind(widget2); I realize there may be issues making this work with arbitrary subclasses of Widget, but let's leave that aside for a moment and assume the proper support can be added to the widgets. This would also seem to work alot better with the proposed UI Templating system being proposed. -Ray On Wed, Oct 8, 2008 at 11:28 AM, Arthur Kalmenson <[EMAIL PROTECTED]> wrote: > > I'm sorry to hear that. I hope you have a safe journey. > > Regards, > Arthur Kalmenson > > On Oct 8, 12:14 pm, "Ian Petersen" <[EMAIL PROTECTED]> wrote: >> On Wed, Oct 8, 2008 at 11:46 AM, Arthur Kalmenson <[EMAIL PROTECTED]> wrote: >> > Will you start a new Google Code project for this data binding >> > framework? >> >> I can do that, but my week has suddenly filled up--I'm driving from >> Toronto to Winnipeg tonight for a funeral and then I'll be back Sunday >> night--so I'm not sure when things will get done. If I have internet >> access between now and Sunday, I'll try to move forward during my >> trip. >> >> As for the rest of your post, I'll need to get back to it some other time. >> >> Ian > > > --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: RR: visibility logic management
There now appears to be a lot of activity in this area. Data binding, Validation, and now visibility has been raised so far. We've also seen inter-field dependent calculations (Ian's @Calculate) I would strongly urge contributors on this list to take a good look at XForms before reinventing the wheel, see http://www.w3.org/TR/xforms11/#model in particular. XForms defines for each piece of bound model data, a set of things called "model item properties" These properties encompass dynamic calculations that control validation, visibility, requirement, readonly, and computed field value. A given UI widget in XForms, when bound to a model node, changes its UI in response to the recalculation of these model item properties whenever the form changes. For example, let's say you have an internationalized Address entry form that contains entries for US postal addresses, but when someone chooses a country other than "US", some other fields become visible. In XForms, you'd simply place a "relavent" model item property on these hidden fields that check if the country != USA. Or, you could have a field that may or may not be required (can't be left empty or in default state) dependent on data or choices in other fields. Likewise, validity can be simple (based on XSD datatype conformance) to complex (mathematical expression evaluating to boolean) Fields can become editable or readonly based on other fields as well. Now, I'm not suggesting that we adopt XForms for GWT, since there is alot in the spec that makes it heavyweight. However, once we start adding annotations for Validity, Calculated, and Visibility, we may as well add those for ReadOnly and Required as well. I built applications using the XForms model as well as one of the early processor implementations, and my experience was very positive. XForm's form processing model brings Spreadsheet-like ease to setting up very complex web forms, and so I think people should give it a look for inspiration, when attempting to devise an advance forms framework for GWT. -Ray On Wed, Oct 8, 2008 at 1: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 > > > --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] RR: visibility logic management
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 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: GWT Issue 343 and the JSR-303 Draft (Implementing in GWT)
Excellent...thanks! I was missing the @Valid on the parent. On Oct 8, 12:52 pm, "chris.ruffalo" <[EMAIL PROTECTED]> wrote: > In the above Example the Parent field should also have an @Valid > annotation. > > Also, instead of updating in the GWT issue 343 thread I'm updating > here: > > http://code.google.com/p/gwt-validation/ > > It also has the Java5 release for download. > > On Oct 8, 12:51 pm, "chris.ruffalo" <[EMAIL PROTECTED]> wrote: > > > > > Yes it is, consider: > > > public class Parent { > > > [EMAIL PROTECTED] > > private String parentString = null; > > > [EMAIL PROTECTED] > > [EMAIL PROTECTED] > > private Child child = null; > > > /* > > GETTER AND SETTER METHODS GO HERE > > */ > > > } > > > public class Child { > > > [EMAIL PROTECTED] > > [EMAIL PROTECTED] > > private String childString = null; > > > [EMAIL PROTECTED] > > private Parent = null; > > > /* > > GETTER AND SETTER METHODS GO HERE > > */ > > > } > > > (Not that this example would require proper getter methods and some > > set values) > > > In this case the @Valid annotation causes the validator to Validate > > the child class according to the rules of that child class. The > > @NotNull validation is performed first howerver /and/ it should be > > noted that the @Valid annotation will not be processed on null objects > > in any case. The validators also contain logic to prevent cyclic > > reprocessing, for example if you set the bidirectional Parent<->Child > > relationship as is possible in the example Parent /will not/ be > > processed twice and therefore neither will Child. The protection > > isn't perfect but it should be enough for the needs of most people. > > > Let me know if you have any more questions. > > > On Oct 8, 9:00 am, rb <[EMAIL PROTECTED]> wrote: > > > > Is it possible to validate nested objects from a parent? > > > > Thanks, > > > Rex > > > > On Oct 6, 8:23 pm, "chris.ruffalo" <[EMAIL PROTECTED]> wrote: > > > > > Yea, easily. I didn't mean to make it Java6 specific. > > > > > isEmpty() seems like a better metaphor, I'll take a loot at it right > > > > now. > > > > > Thanks for pointing that out. > > > > > On Oct 6, 9:13 am, rb <[EMAIL PROTECTED]> wrote: > > > > > > Could this be changed to support Java 5? > > > > > > The String.isEmpty() and the AbstractValidator.unrollConstraintSet > > > > > have Java 6 specific stuff. > > > > > > A lot more people will be able to use this if you take out the Java 6 > > > > > stuff. > > > > > > Thanks, > > > > > Rex > > > > > > On Oct 2, 1:22 pm, "chris.ruffalo" <[EMAIL PROTECTED]> wrote: > > > > > > > Another release has been made > > > > > > @http://code.google.com/p/google-web-toolkit/issues/detail?id=343 > > > > > > > Please review and send me your comments. I'd like to target this > > > > > > for > > > > > > the GWT Incubator so I can get some more eyes on and stuff. > > > > > > > My CLA has been electronically submitted and I'm ready to go. > > > > > > > Chris Ruffalo > > > > > > > On Sep 12, 3:09 pm, "chris.ruffalo" <[EMAIL PROTECTED]> wrote: > > > > > > > > I've been looking at > > > > > > > :http://code.google.com/p/google-web-toolkit/issues/detail?id=343 > > > > > > > > And I've hit a few snags: > > > > > > > > Namely: > > > > > > > Hosted mode works fine but compiling tries to rebind twice (even > > > > > > > though I only have > > > > > > > one GWT.create()) and it can't create the printwriter because the > > > > > > > class it is trying to write > > > > > > > already exists. I guess I need a smarter generator. (?) > > > > > > > > How the heck can I reconcile the functionality of java regex and > > > > > > > compiled regex? I > > > > > > > guess I could have a javascriptPattern and javaPattern property on > > > > > > > each validator... but that > > > > > > > sounds like a lot of work for the user. That is unless I've > > > > > > > missed a > > > > > > > new development along the > > > > > > > lines of making that easier for developers. > > > > > > > > Anyway, any input would be appreciated and I think if I can > > > > > > > figure out > > > > > > > these snags and get my > > > > > > > CLA finished (I applied online last night) then I could post the > > > > > > > code > > > > > > > and people could start > > > > > > > poking at it a little bit because basic field/method level > > > > > > > validation > > > > > > > is working. > > > > > > > > Chris Ruffalo- Hide quoted text - > > > > > > > - Show quoted text -- Hide quoted text - > > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: data binding framework for GWT
I'm sorry to hear that. I hope you have a safe journey. Regards, Arthur Kalmenson On Oct 8, 12:14 pm, "Ian Petersen" <[EMAIL PROTECTED]> wrote: > On Wed, Oct 8, 2008 at 11:46 AM, Arthur Kalmenson <[EMAIL PROTECTED]> wrote: > > Will you start a new Google Code project for this data binding > > framework? > > I can do that, but my week has suddenly filled up--I'm driving from > Toronto to Winnipeg tonight for a funeral and then I'll be back Sunday > night--so I'm not sure when things will get done. If I have internet > access between now and Sunday, I'll try to move forward during my > trip. > > As for the rest of your post, I'll need to get back to it some other time. > > Ian --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: GWT Issue 343 and the JSR-303 Draft (Implementing in GWT)
In the above Example the Parent field should also have an @Valid annotation. Also, instead of updating in the GWT issue 343 thread I'm updating here: http://code.google.com/p/gwt-validation/ It also has the Java5 release for download. On Oct 8, 12:51 pm, "chris.ruffalo" <[EMAIL PROTECTED]> wrote: > Yes it is, consider: > > public class Parent { > > [EMAIL PROTECTED] > private String parentString = null; > > [EMAIL PROTECTED] > [EMAIL PROTECTED] > private Child child = null; > > /* > GETTER AND SETTER METHODS GO HERE > */ > > } > > public class Child { > > [EMAIL PROTECTED] > [EMAIL PROTECTED] > private String childString = null; > > [EMAIL PROTECTED] > private Parent = null; > > /* > GETTER AND SETTER METHODS GO HERE > */ > > } > > (Not that this example would require proper getter methods and some > set values) > > In this case the @Valid annotation causes the validator to Validate > the child class according to the rules of that child class. The > @NotNull validation is performed first howerver /and/ it should be > noted that the @Valid annotation will not be processed on null objects > in any case. The validators also contain logic to prevent cyclic > reprocessing, for example if you set the bidirectional Parent<->Child > relationship as is possible in the example Parent /will not/ be > processed twice and therefore neither will Child. The protection > isn't perfect but it should be enough for the needs of most people. > > Let me know if you have any more questions. > > On Oct 8, 9:00 am, rb <[EMAIL PROTECTED]> wrote: > > > Is it possible to validate nested objects from a parent? > > > Thanks, > > Rex > > > On Oct 6, 8:23 pm, "chris.ruffalo" <[EMAIL PROTECTED]> wrote: > > > > Yea, easily. I didn't mean to make it Java6 specific. > > > > isEmpty() seems like a better metaphor, I'll take a loot at it right > > > now. > > > > Thanks for pointing that out. > > > > On Oct 6, 9:13 am, rb <[EMAIL PROTECTED]> wrote: > > > > > Could this be changed to support Java 5? > > > > > The String.isEmpty() and the AbstractValidator.unrollConstraintSet > > > > have Java 6 specific stuff. > > > > > A lot more people will be able to use this if you take out the Java 6 > > > > stuff. > > > > > Thanks, > > > > Rex > > > > > On Oct 2, 1:22 pm, "chris.ruffalo" <[EMAIL PROTECTED]> wrote: > > > > > > Another release has been made > > > > > @http://code.google.com/p/google-web-toolkit/issues/detail?id=343 > > > > > > Please review and send me your comments. I'd like to target this for > > > > > the GWT Incubator so I can get some more eyes on and stuff. > > > > > > My CLA has been electronically submitted and I'm ready to go. > > > > > > Chris Ruffalo > > > > > > On Sep 12, 3:09 pm, "chris.ruffalo" <[EMAIL PROTECTED]> wrote: > > > > > > > I've been looking at > > > > > > :http://code.google.com/p/google-web-toolkit/issues/detail?id=343 > > > > > > > And I've hit a few snags: > > > > > > > Namely: > > > > > > Hosted mode works fine but compiling tries to rebind twice (even > > > > > > though I only have > > > > > > one GWT.create()) and it can't create the printwriter because the > > > > > > class it is trying to write > > > > > > already exists. I guess I need a smarter generator. (?) > > > > > > > How the heck can I reconcile the functionality of java regex and > > > > > > compiled regex? I > > > > > > guess I could have a javascriptPattern and javaPattern property on > > > > > > each validator... but that > > > > > > sounds like a lot of work for the user. That is unless I've missed > > > > > > a > > > > > > new development along the > > > > > > lines of making that easier for developers. > > > > > > > Anyway, any input would be appreciated and I think if I can figure > > > > > > out > > > > > > these snags and get my > > > > > > CLA finished (I applied online last night) then I could post the > > > > > > code > > > > > > and people could start > > > > > > poking at it a little bit because basic field/method level > > > > > > validation > > > > > > is working. > > > > > > > Chris Ruffalo- Hide quoted text - > > > > > > - Show quoted text -- Hide quoted text - > > > > - Show quoted text - --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: GWT Issue 343 and the JSR-303 Draft (Implementing in GWT)
Yes it is, consider: public class Parent { @NotNull private String parentString = null; @NotNull @Valid private Child child = null; /* GETTER AND SETTER METHODS GO HERE */ } public class Child { @NotEmpty @NotNull private String childString = null; @NotNull private Parent = null; /* GETTER AND SETTER METHODS GO HERE */ } (Not that this example would require proper getter methods and some set values) In this case the @Valid annotation causes the validator to Validate the child class according to the rules of that child class. The @NotNull validation is performed first howerver /and/ it should be noted that the @Valid annotation will not be processed on null objects in any case. The validators also contain logic to prevent cyclic reprocessing, for example if you set the bidirectional Parent<->Child relationship as is possible in the example Parent /will not/ be processed twice and therefore neither will Child. The protection isn't perfect but it should be enough for the needs of most people. Let me know if you have any more questions. On Oct 8, 9:00 am, rb <[EMAIL PROTECTED]> wrote: > Is it possible to validate nested objects from a parent? > > Thanks, > Rex > > On Oct 6, 8:23 pm, "chris.ruffalo" <[EMAIL PROTECTED]> wrote: > > > Yea, easily. I didn't mean to make it Java6 specific. > > > isEmpty() seems like a better metaphor, I'll take a loot at it right > > now. > > > Thanks for pointing that out. > > > On Oct 6, 9:13 am, rb <[EMAIL PROTECTED]> wrote: > > > > Could this be changed to support Java 5? > > > > The String.isEmpty() and the AbstractValidator.unrollConstraintSet > > > have Java 6 specific stuff. > > > > A lot more people will be able to use this if you take out the Java 6 > > > stuff. > > > > Thanks, > > > Rex > > > > On Oct 2, 1:22 pm, "chris.ruffalo" <[EMAIL PROTECTED]> wrote: > > > > > Another release has been made > > > > @http://code.google.com/p/google-web-toolkit/issues/detail?id=343 > > > > > Please review and send me your comments. I'd like to target this for > > > > the GWT Incubator so I can get some more eyes on and stuff. > > > > > My CLA has been electronically submitted and I'm ready to go. > > > > > Chris Ruffalo > > > > > On Sep 12, 3:09 pm, "chris.ruffalo" <[EMAIL PROTECTED]> wrote: > > > > > > I've been looking at > > > > > :http://code.google.com/p/google-web-toolkit/issues/detail?id=343 > > > > > > And I've hit a few snags: > > > > > > Namely: > > > > > Hosted mode works fine but compiling tries to rebind twice (even > > > > > though I only have > > > > > one GWT.create()) and it can't create the printwriter because the > > > > > class it is trying to write > > > > > already exists. I guess I need a smarter generator. (?) > > > > > > How the heck can I reconcile the functionality of java regex and > > > > > compiled regex? I > > > > > guess I could have a javascriptPattern and javaPattern property on > > > > > each validator... but that > > > > > sounds like a lot of work for the user. That is unless I've missed a > > > > > new development along the > > > > > lines of making that easier for developers. > > > > > > Anyway, any input would be appreciated and I think if I can figure out > > > > > these snags and get my > > > > > CLA finished (I applied online last night) then I could post the code > > > > > and people could start > > > > > poking at it a little bit because basic field/method level validation > > > > > is working. > > > > > > Chris Ruffalo- Hide quoted text - > > > > > - Show quoted text -- Hide quoted text - > > > - Show quoted text - --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: data binding framework for GWT
On Wed, Oct 8, 2008 at 11:46 AM, Arthur Kalmenson <[EMAIL PROTECTED]> wrote: > Will you start a new Google Code project for this data binding > framework? I can do that, but my week has suddenly filled up--I'm driving from Toronto to Winnipeg tonight for a funeral and then I'll be back Sunday night--so I'm not sure when things will get done. If I have internet access between now and Sunday, I'll try to move forward during my trip. As for the rest of your post, I'll need to get back to it some other time. Ian --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: data binding framework for GWT
Hi Ian, > I *think* validation > could be tied into the data binding framework in a pretty > straightforward way by extending Editor and Viewer to be > validation-aware. I agree, it shouldn't be too hard to tie validation into data binding, but... > I think data binding and validation probably need to be aware of each > other (or, at least, data binding needs to be aware of validation), > but I think they're separate concerns. To me, data binding is just a > way of automating the display and update of a bean's properties via > some widgets. Validation, on the other hand, is a way of making sure > that a property is within some bounds, or some combination of > properties together follow some rules. Data binding impacts > validation because the user could transform a bean into or out of a > valid state, and validation impacts data binding because you usually > need to give the user feedback about the validity of the bean being > edited, but I think the relationship between data binding and > validation is probably best mediated through a thin interface that > keeps things loosely coupled. > > What do you think? (Or anyone else, for that matter.) I agree, I think that they should be loosely coupled or completely decoupled. One question that arises from this is, who's role is it to display error messages to the user? Should it be the data binding framework, the validation framework or something else? Personally, I think that a third library should come into play here that will be able to apply the appropriate formatting to widgets when they are invalid/valid. I think that these three components should be tied together with listeners or handlers or some other implementation of the observer pattern. I'm thinking something like this: Widgets changes => bean is updated by data binding => data binding broadcasts that something has changed => validation picks up change and validates the bean => validation broadcasts results => formatter library catches new validation and updates widgets accordingly I think that we should get Chris Ruffalo in on the conversation so that something like this could be coordinated between these two frameworks. I know that Ray said the GWT will be implementing something themselves (http://groups.google.com/group/Google-Web- Toolkit-Contributors/browse_thread/thread/8c611ab8bb076ead) but I'm sure what you and Chris have done will help the GWT team out a lot. Will you start a new Google Code project for this data binding framework? Regards, Arthur Kalmenson On Oct 7, 3:47 pm, "Ian Petersen" <[EMAIL PROTECTED]> wrote: > Hi Arthur, > > On Tue, Oct 7, 2008 at 1:51 PM, Arthur Kalmenson <[EMAIL PROTECTED]> wrote: > >> I don't mean to nitpick, but it's actually the editor that puts back > >> the previous value, not the converter. The converter just throws a > >> ConversionException if the String couldn't be converted. It's up to > >> the editor to decide what to do with the ConversionException. > > > Ah, sorry, I misunderstood how it was working. Thanks for clearing > > that up. This also deals with the original use case I proposed above > > (not updating the model right away). I only thought of that case > > because it kept trying to convert and reverting the field to it's > > previous value, which prevented validation from running its course. > > I'll just create my own editor and leave the field the way it was. > > I read your comment on issue 343 > (http://code.google.com/p/google-web-toolkit/issues/detail?id=343#c31). > I haven't finished reading the Bean Validation JSR yet, and I haven't > looked at Chris Ruffalo's code, but I have dipped my toe into using > Hibernate validation in my own server-side code. I *think* validation > could be tied into the data binding framework in a pretty > straightforward way by extending Editor and Viewer to be > validation-aware. > > At the moment, Viewer and Editor just provide simple interfaces > to view (and edit) a value of type T. If there was some way to talk > about the validity of a given value, Viewer (and, by extension, > Editor) could be extended to provide feedback to the user when the > value it's displaying changes from invalid to valid or valid to > invalid. > > I assume that Hibernate validation-style validation requires some kind > of "validation service" that is external to the beans being validated. > (As opposed to the beans themselves somehow performing validation and > reporting the results.) If that's the case, a BoundField could listen > to its editor for EditorChangeEvents and filter the new value through > validation before/after/around updating the related bean. If you > perform validation at that time, you have access to the editor that > changed, the bean that's (in)valid, the property that's (in)valid, and > the validation state. You could probably give very rich feedback to > the user about that particular property, and there are a number of > rational ways to handle an invalid value. Handling multi-pr
[gwt-contrib] Re: Code Review: gwt-google-apis maps Status Code not translated - issue 189
Committed as r873. On Wed, Oct 8, 2008 at 10:06 AM, Miguel Méndez <[EMAIL PROTECTED]> wrote: > LGTM > > > On Tue, Oct 7, 2008 at 9:20 AM, Eric Ayers <[EMAIL PROTECTED]> wrote: > >> Hello Miguel, >> >> Here is another patch I'd like for you to review. It addresses issue 189 >> in the issue tracker: >> >> http://code.google.com/p/gwt-google-apis/issues/detail?id=189 >> >> The problem was very easy to solve, but I went ahead and added some more >> unit testing and eliminated some warnings from a couple of other tests. >> Note that I moved the StatusCodesTest.java file to the correct package in >> the test source tree as well. >> >> M maps/test/com/google/gwt/maps/MapsTestSuite.java >> M >> maps/test/com/google/gwt/maps/client/impl/MinimumMapVersionTest.java >> D maps/test/com/google/gwt/maps/client/StatusCodesTest.java >> A maps/test/com/google/gwt/maps/client/geocode/StatusCodesTest.java >> M maps/test/com/google/gwt/maps/client/MapWidgetEventsTest.java >> M maps/test/com/google/gwt/maps/client/geom/BoundsTest.java >> M maps/src/com/google/gwt/maps/client/geocode/StatusCodes.java >> >> -Eric. >> -- >> Eric Z. Ayers - GWT Team - Atlanta, GA USA >> http://code.google.com/webtoolkit/ >> > > > > -- > Miguel > -- Eric Z. Ayers - GWT Team - Atlanta, GA USA http://code.google.com/webtoolkit/ --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Code Review: gwt-google-apis gears fix typo in method name.
Thanks. Committed as r872 On Wed, Oct 8, 2008 at 10:08 AM, Miguel Méndez <[EMAIL PROTECTED]> wrote: > LGTM > > > On Tue, Oct 7, 2008 at 3:27 PM, Eric Ayers <[EMAIL PROTECTED]> wrote: > >> Hi Miguel, >> >> This patch addresses issue 183, a typo in a method name: >> >> http://code.google.com/p/gwt-google-apis/issues/detail?id=183 >> >> I renamed the method in the library class and updated the test. >> >> M test/com/google/gwt/gears/client/localserver/LocalServerTest.java >> M >> src/com/google/gwt/gears/client/localserver/ResourceStoreUrlCaptureHandler.java >> -- >> Eric Z. Ayers - GWT Team - Atlanta, GA USA >> http://code.google.com/webtoolkit/ >> > > > > -- > Miguel > -- Eric Z. Ayers - GWT Team - Atlanta, GA USA http://code.google.com/webtoolkit/ --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Code Review: gwt-google-apis gears Worker Pool Demo
Thanks for sending the image. I think that you meant to say that the file belongs in: samples/workerpool/src/com/google/gwt/gears/sample/workerpool/public/gwtLogoThumb.png? You should add more text to the sample to call out that you can interact with the animation only when using a worker thread to compute the value. Could there be a label better than "Calculation Type"? It is not that the calculation itself is changed, but really the way in which it is executed. Maybe "Execute calculation": Synchronously or Asynchronously. On Wed, Oct 8, 2008 at 10:13 AM, Eric Ayers <[EMAIL PROTECTED]> wrote: > Attached file that belongs in > > samples/Showcase/src/com/google/gwt/sample/showcase/client/gwtLogoThumb.png > > > On Wed, Oct 8, 2008 at 10:02 AM, Miguel Méndez <[EMAIL PROTECTED]> wrote: > >> On Mon, Oct 6, 2008 at 2:48 PM, Eric Ayers <[EMAIL PROTECTED]> wrote: >> >>> Hello Miguel >>> >>> Attached is a demo for the WorkerPool class that I would like for you to >>> review. >>> >>> The demo is a bit more rich than the demos for the other Gears features. >>> I intend to add documentation for a simple worker pool tutorial in the >>> Getting Started guide that will show a simple version of how to use >>> WorkerPool, so I felt justified in making a more complex demo. >>> >>> The demo shows how the interface is interactive when a worker pool thread >>> is running by giving a little animation to play with (and the results are >>> printed out as they come out). >>> >>> Also, there is a small enhancement to WorkerPool.sendMessage() part of >>> the attached patch that allows the user to pass a JSO as the message. It is >>> not necessary for the demo and I can't recall if I already sent it to you >>> for review or not. >>> >>> >>> M gears/src/com/google/gwt/gears/client/workerpool/WorkerPool.java >>> >> I did not realize that they had extended the API to allow the passing of >> boolean, >> string, number, array, object, and Blobs. Doesn't this mean that the >> WorkerPoolMessageHandler.MessageEvent >> class will need to be updated? It mirrors the messageObject parameter to >> the JS API's onmessage callback, but now messageObject.body should really be >> a JSO and we should expose messageObject.text. You'd need to figure out how >> to deal with the case where the caller passed a string because >> messageObject.body could contain a string in pure JS but in the Java wrapper >> String and JSO's are not compatible. >> >> A samples/workerpool/launch-scripts/linux/WorkerPoolDemo-shell >>> >> Did not review. >> >> >>> A samples/workerpool/launch-scripts/linux/WorkerPoolDemo-compile >>> >> Did not review. >> >> >>> >>> A samples/workerpool/launch-scripts/mac/WorkerPoolDemo-shell >>> >> LG >> >> >>> A samples/workerpool/launch-scripts/mac/WorkerPoolDemo-compile >>> >> LG >> >> >>> A samples/workerpool/launch-scripts/windows/WorkerPoolDemo-shell.cmd >>> >> Did not review. >> >> A >>> samples/workerpool/launch-scripts/windows/WorkerPoolDemo-compile.cmd >>> >> Did not review. >> >> A >>> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/WorkerPoolDemo.gwt.xml >>> >> LG >> >> >>> A >>> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/client/WorkerPoolDemoNoGears.java >>> >> LG >> >> >>> A >>> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/client/WorkerPoolDemo.java >>> >> LG - You should add some javadoc to the doSync*, doAsync*, and the >> stopCalculation methods. Also, on line 134 you may want a comment that >> explains why we use a deferred command to trigger either computation. >> >> A >>> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/client/AnimationToy.java >>> >> LG >> >> >>> A >>> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/client/PiSpigot.java >>> >> LG - The name did not make sense to me until I read the Java comment. >> >> >>> A >>> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/public/gears_init.js >>> >> You should not need to include the startup script since you will inherit >> it from Gears.gwt.xml. >> >> >>> A >>> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/public/pi_spigot_worker.js >>> >> Nice JS code! What is the plan for showing a worker thread in GWT? >> >> A >>> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/public/gwtLogoThumb.png >>> >> The file was not included in the patch; it prevented me from seeing the >> animation aspect of the demo. Could you send it to me? >> >> >>> A >>> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/public/WorkerPoolDemo.html >>> >> LG >> >> >>> >>> A samples/workerpool/build.xml >>> >> LG >> >> >>> M samples/build.xml >>> >> LG >> >> -- >> Miguel >> > > > > -- > Eric Z. Ayers - GWT Team - Atlanta, GA USA > http://code.google.com/webtoolkit/ > -- Miguel --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~-
[gwt-contrib] Flurry of Data binding threads
We all seem to be talking about data binding and validation a lot, and some of us are even implementing code about it. We on the GWT team hear the need and feel it ourselves. We have some notions of how we'd like to tackle this in a way that blends seamlessly with the rest of GWT, and are looking to start design and implementation in earnest before the year is out. This makes it unlikely that we'll accept core or incubator patches that implement such a system. That said, we don't want to shoot down the excellent work that's being done! If you have a system that's shaping up to meet your needs and that you want to share with the GWT community, please do! Set up a Google Code project, announce it here, embarrass us by shipping first and attracting a user base. We'll probably steal from you shamelessly and ask for your help as our own system takes shape. I hope this doesn't ruffle any feathers, and that you'll understand why we haven't been as responsive on some of these threads as we should have been. Thanks, rjrjr --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Code Review: gwt-google-apis gears Worker Pool Demo
Attached file that belongs in samples/Showcase/src/com/google/gwt/sample/showcase/client/gwtLogoThumb.png On Wed, Oct 8, 2008 at 10:02 AM, Miguel Méndez <[EMAIL PROTECTED]> wrote: > On Mon, Oct 6, 2008 at 2:48 PM, Eric Ayers <[EMAIL PROTECTED]> wrote: > >> Hello Miguel >> >> Attached is a demo for the WorkerPool class that I would like for you to >> review. >> >> The demo is a bit more rich than the demos for the other Gears features. >> I intend to add documentation for a simple worker pool tutorial in the >> Getting Started guide that will show a simple version of how to use >> WorkerPool, so I felt justified in making a more complex demo. >> >> The demo shows how the interface is interactive when a worker pool thread >> is running by giving a little animation to play with (and the results are >> printed out as they come out). >> >> Also, there is a small enhancement to WorkerPool.sendMessage() part of the >> attached patch that allows the user to pass a JSO as the message. It is not >> necessary for the demo and I can't recall if I already sent it to you for >> review or not. >> >> >> M gears/src/com/google/gwt/gears/client/workerpool/WorkerPool.java >> > I did not realize that they had extended the API to allow the passing of > boolean, > string, number, array, object, and Blobs. Doesn't this mean that the > WorkerPoolMessageHandler.MessageEvent > class will need to be updated? It mirrors the messageObject parameter to > the JS API's onmessage callback, but now messageObject.body should really be > a JSO and we should expose messageObject.text. You'd need to figure out how > to deal with the case where the caller passed a string because > messageObject.body could contain a string in pure JS but in the Java wrapper > String and JSO's are not compatible. > > A samples/workerpool/launch-scripts/linux/WorkerPoolDemo-shell >> > Did not review. > > >> A samples/workerpool/launch-scripts/linux/WorkerPoolDemo-compile >> > Did not review. > > >> >> A samples/workerpool/launch-scripts/mac/WorkerPoolDemo-shell >> > LG > > >> A samples/workerpool/launch-scripts/mac/WorkerPoolDemo-compile >> > LG > > >> A samples/workerpool/launch-scripts/windows/WorkerPoolDemo-shell.cmd >> > Did not review. > > A samples/workerpool/launch-scripts/windows/WorkerPoolDemo-compile.cmd >> > Did not review. > > A >> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/WorkerPoolDemo.gwt.xml >> > LG > > >> A >> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/client/WorkerPoolDemoNoGears.java >> > LG > > >> A >> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/client/WorkerPoolDemo.java >> > LG - You should add some javadoc to the doSync*, doAsync*, and the > stopCalculation methods. Also, on line 134 you may want a comment that > explains why we use a deferred command to trigger either computation. > > A >> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/client/AnimationToy.java >> > LG > > >> A >> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/client/PiSpigot.java >> > LG - The name did not make sense to me until I read the Java comment. > > >> A >> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/public/gears_init.js >> > You should not need to include the startup script since you will inherit it > from Gears.gwt.xml. > > >> A >> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/public/pi_spigot_worker.js >> > Nice JS code! What is the plan for showing a worker thread in GWT? > > A >> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/public/gwtLogoThumb.png >> > The file was not included in the patch; it prevented me from seeing the > animation aspect of the demo. Could you send it to me? > > >> A >> samples/workerpool/src/com/google/gwt/gears/sample/workerpool/public/WorkerPoolDemo.html >> > LG > > >> >> A samples/workerpool/build.xml >> > LG > > >> M samples/build.xml >> > LG > > -- > Miguel > -- Eric Z. Ayers - GWT Team - Atlanta, GA USA http://code.google.com/webtoolkit/ --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~--- <>
[gwt-contrib] Re: Code Review: gwt-google-apis gears fix typo in method name.
LGTM On Tue, Oct 7, 2008 at 3:27 PM, Eric Ayers <[EMAIL PROTECTED]> wrote: > Hi Miguel, > > This patch addresses issue 183, a typo in a method name: > > http://code.google.com/p/gwt-google-apis/issues/detail?id=183 > > I renamed the method in the library class and updated the test. > > M test/com/google/gwt/gears/client/localserver/LocalServerTest.java > M > src/com/google/gwt/gears/client/localserver/ResourceStoreUrlCaptureHandler.java > -- > Eric Z. Ayers - GWT Team - Atlanta, GA USA > http://code.google.com/webtoolkit/ > -- Miguel --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Code Review: gwt-google-apis maps Status Code not translated - issue 189
LGTM On Tue, Oct 7, 2008 at 9:20 AM, Eric Ayers <[EMAIL PROTECTED]> wrote: > Hello Miguel, > > Here is another patch I'd like for you to review. It addresses issue 189 > in the issue tracker: > > http://code.google.com/p/gwt-google-apis/issues/detail?id=189 > > The problem was very easy to solve, but I went ahead and added some more > unit testing and eliminated some warnings from a couple of other tests. > Note that I moved the StatusCodesTest.java file to the correct package in > the test source tree as well. > > M maps/test/com/google/gwt/maps/MapsTestSuite.java > M maps/test/com/google/gwt/maps/client/impl/MinimumMapVersionTest.java > D maps/test/com/google/gwt/maps/client/StatusCodesTest.java > A maps/test/com/google/gwt/maps/client/geocode/StatusCodesTest.java > M maps/test/com/google/gwt/maps/client/MapWidgetEventsTest.java > M maps/test/com/google/gwt/maps/client/geom/BoundsTest.java > M maps/src/com/google/gwt/maps/client/geocode/StatusCodes.java > > -Eric. > -- > Eric Z. Ayers - GWT Team - Atlanta, GA USA > http://code.google.com/webtoolkit/ > -- Miguel --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Code Review: gwt-google-apis gears Worker Pool Demo
On Mon, Oct 6, 2008 at 2:48 PM, Eric Ayers <[EMAIL PROTECTED]> wrote: > Hello Miguel > > Attached is a demo for the WorkerPool class that I would like for you to > review. > > The demo is a bit more rich than the demos for the other Gears features. I > intend to add documentation for a simple worker pool tutorial in the Getting > Started guide that will show a simple version of how to use WorkerPool, so I > felt justified in making a more complex demo. > > The demo shows how the interface is interactive when a worker pool thread > is running by giving a little animation to play with (and the results are > printed out as they come out). > > Also, there is a small enhancement to WorkerPool.sendMessage() part of the > attached patch that allows the user to pass a JSO as the message. It is not > necessary for the demo and I can't recall if I already sent it to you for > review or not. > > > M gears/src/com/google/gwt/gears/client/workerpool/WorkerPool.java > I did not realize that they had extended the API to allow the passing of boolean, string, number, array, object, and Blobs. Doesn't this mean that the WorkerPoolMessageHandler.MessageEvent class will need to be updated? It mirrors the messageObject parameter to the JS API's onmessage callback, but now messageObject.body should really be a JSO and we should expose messageObject.text. You'd need to figure out how to deal with the case where the caller passed a string because messageObject.body could contain a string in pure JS but in the Java wrapper String and JSO's are not compatible. A samples/workerpool/launch-scripts/linux/WorkerPoolDemo-shell > Did not review. > A samples/workerpool/launch-scripts/linux/WorkerPoolDemo-compile > Did not review. > > A samples/workerpool/launch-scripts/mac/WorkerPoolDemo-shell > LG > A samples/workerpool/launch-scripts/mac/WorkerPoolDemo-compile > LG > A samples/workerpool/launch-scripts/windows/WorkerPoolDemo-shell.cmd > Did not review. A samples/workerpool/launch-scripts/windows/WorkerPoolDemo-compile.cmd > Did not review. A > samples/workerpool/src/com/google/gwt/gears/sample/workerpool/WorkerPoolDemo.gwt.xml > LG > A > samples/workerpool/src/com/google/gwt/gears/sample/workerpool/client/WorkerPoolDemoNoGears.java > LG > A > samples/workerpool/src/com/google/gwt/gears/sample/workerpool/client/WorkerPoolDemo.java > LG - You should add some javadoc to the doSync*, doAsync*, and the stopCalculation methods. Also, on line 134 you may want a comment that explains why we use a deferred command to trigger either computation. A > samples/workerpool/src/com/google/gwt/gears/sample/workerpool/client/AnimationToy.java > LG > A > samples/workerpool/src/com/google/gwt/gears/sample/workerpool/client/PiSpigot.java > LG - The name did not make sense to me until I read the Java comment. > A > samples/workerpool/src/com/google/gwt/gears/sample/workerpool/public/gears_init.js > You should not need to include the startup script since you will inherit it from Gears.gwt.xml. > A > samples/workerpool/src/com/google/gwt/gears/sample/workerpool/public/pi_spigot_worker.js > Nice JS code! What is the plan for showing a worker thread in GWT? A > samples/workerpool/src/com/google/gwt/gears/sample/workerpool/public/gwtLogoThumb.png > The file was not included in the patch; it prevented me from seeing the animation aspect of the demo. Could you send it to me? > A > samples/workerpool/src/com/google/gwt/gears/sample/workerpool/public/WorkerPoolDemo.html > LG > > A samples/workerpool/build.xml > LG > M samples/build.xml > LG -- Miguel --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: GWT Issue 343 and the JSR-303 Draft (Implementing in GWT)
Is it possible to validate nested objects from a parent? Thanks, Rex On Oct 6, 8:23 pm, "chris.ruffalo" <[EMAIL PROTECTED]> wrote: > Yea, easily. I didn't mean to make it Java6 specific. > > isEmpty() seems like a better metaphor, I'll take a loot at it right > now. > > Thanks for pointing that out. > > On Oct 6, 9:13 am, rb <[EMAIL PROTECTED]> wrote: > > > > > Could this be changed to support Java 5? > > > The String.isEmpty() and the AbstractValidator.unrollConstraintSet > > have Java 6 specific stuff. > > > A lot more people will be able to use this if you take out the Java 6 > > stuff. > > > Thanks, > > Rex > > > On Oct 2, 1:22 pm, "chris.ruffalo" <[EMAIL PROTECTED]> wrote: > > > > Another release has been made > > > @http://code.google.com/p/google-web-toolkit/issues/detail?id=343 > > > > Please review and send me your comments. I'd like to target this for > > > the GWT Incubator so I can get some more eyes on and stuff. > > > > My CLA has been electronically submitted and I'm ready to go. > > > > Chris Ruffalo > > > > On Sep 12, 3:09 pm, "chris.ruffalo" <[EMAIL PROTECTED]> wrote: > > > > > I've been looking at > > > > :http://code.google.com/p/google-web-toolkit/issues/detail?id=343 > > > > > And I've hit a few snags: > > > > > Namely: > > > > Hosted mode works fine but compiling tries to rebind twice (even > > > > though I only have > > > > one GWT.create()) and it can't create the printwriter because the > > > > class it is trying to write > > > > already exists. I guess I need a smarter generator. (?) > > > > > How the heck can I reconcile the functionality of java regex and > > > > compiled regex? I > > > > guess I could have a javascriptPattern and javaPattern property on > > > > each validator... but that > > > > sounds like a lot of work for the user. That is unless I've missed a > > > > new development along the > > > > lines of making that easier for developers. > > > > > Anyway, any input would be appreciated and I think if I can figure out > > > > these snags and get my > > > > CLA finished (I applied online last night) then I could post the code > > > > and people could start > > > > poking at it a little bit because basic field/method level validation > > > > is working. > > > > > Chris Ruffalo- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---