>
> There's one big flaw with your proposal: it's not really “transparent”; 
> the code “using” it has to know it's there (i.e. it's not AOP as you 
> described it), because some @UiField could be 'null' or not visible 
> (depending on actual implementation).
> I believe applying such a rule as “this widget might not be created at 
> all” globally might solve some use cases, but opens other issues: e.g. how 
> do I layout my screen depending on what's actually visible?
>

I've just realize what you meant Thomas, but I really don't agree, that's 
why I didn't get it :

   - AOP can intercept methods to completely abort their call, it is still 
   AOP (it is even surely what AOP is for). It can clearly be used to hide an 
   element, that still doesn't mean the code that undergoes the AOP influence 
   has to know there was an AOP code. It just has to sustain that possibility 
   but it doesn't know from where it came.
   - The "result hosting" code has anyway to deal with a field that doesn't 
   exist or that is invisible. It has to either do it manually in traditional 
   GWT, or have it done by another automatic/configurable process in what I'm 
   proposing.

Behind the AOP there can be many possible solutions, GWT is not obliged to 
decide which to adopt, this can be handled as separate solutions: for 
example : 

   - A map of profiles where each profile has a map of UiBinder name keys 
   where it specifies in the value the look and visibility of fields (this way 
   only fields that have special treatment are handled specifically)
   - The inverse process: methods in the Widget mangaer interface to say 
   isVisible(String uiWidget, String field), getStyles(String uiWidget, 
   String field). Which allows a more abstract interface but can show 
   performance issues on large applications
   - a magic client factory that handles all this in a special library

Possibilities are open. The important thing is to be able to catch the 
moment a widget is about to be created to be able to have control on the 
decision. That's the whole point of this feature request

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/ae8635a1-371a-4b5d-9d9f-947b110f518b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to