On Thursday, September 12, 2013 3:18:57 PM UTC+2, Jordan Amar wrote:
>
> Thanks, good trick ! I thought the UIBinder would also attempt to get my 
> provided widget through the same kind of method (i am talking of foo()). 
> But it did not :) (now that I am riting this i think such methods require a 
> @UIFactory annotation right ?)
> However, I think there is some kind of error in your proposal. I think 
> foo() (or fooEditor) should be of type IsEditor. Once I did this it worked.
>

Well, there's an error in my proposal, but IsEditor is not necessarily 
needed. Any class that implements Editor or IsEditor will be fine. All 
that's needed is that each and every subeditor can be discovered at 
compile-time via static analysis only (and not looking for the subclasses 
of the declared field types or methods return types, only the declared 
types; this is where my example had an error: Editor<SomeType> is not 
specific enough. If IsEditor<Foo> works for you, then Foo should work just 
as well.
 

> Now I have another problem. It seems like SimpleBeanEditorDriver<T,E> is 
> expecting the Editor to be a plain class. Am I right ?
>

No, but the complete tree of editors must be discoverable from the 
interface.
 

> I tried to specify an interface that extends Editor and IsEditor (which 
> actually returns "this"), but calling Driver.edit() does not fill my fields.
> Is it possible to do so ?
>

Yes, but it's useless.
 

> Does my interface have to declare all the editor accessors (fooEditor(), 
> barEditor()) as well ?
>

Yes, because interfaces cannot have fields. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to