Ok, main concept is that there is real need to CREATE widgets not only by combining existed widgets.
Example 1: I need create widgets from the hand created DOM Element complex (Diego case described here http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/78c45552015ea220) or from the existed node in html page (my case) It is live example. It's like some sort of template engine. I have very complex panel with element model mainly static with some slots where dynamic widgets should be attached. I don't want to write Kb of code to build this panel with Composite(wrapper) and static panels, labels, tables etc. It is static content. Nearest analogy - It's like servlet and jsp. I can write html tags to the output from the servlet (evil) or I can create a jsp where all static data will be contained in plain html and work only with the dynamic parts. It's the same case. How much elements from DOM are really dynamic (has listeners or could be manipulated from code etc?) in the real applications? 10%? 20%? As I understand this example not in the mainstream concept of gwt, but nevertheless... Example 2: I need to create widgets from strings. It is tables of course :) Data received from the server side should be displayed as table...biiig table. And I need to put external widgets there. Grid and FlexTable are not helpers in this case (yes, I know about gwt- incubator tables, but I write my own implementation ;). But I agree, this case is very specific. As I understand it is not API bloating, ti is just normal flexible API. Now gwt widget model is very monolithic and highly tied. I don't want to totally rewrite widget model like some gwt-libs do(ext-gwt etc), I'm satisfied with it in general, but in some details I am not. I want just to extend it. I understand developers care about users, but some users want more and don't like excessive care. Yesterday, I try to hack package visibility for setParent and create base Component something like Folke suggest, but moving forward I discover Widget.removeFromParent and final accord - if the parent is not HasWidgets widget throws runtime exception. Сheckmate. :( It is especially strange, because Composite doesn't implement HasWidgets but it used as parent for wrapped widget!!! What is going on? And about realization with Composite and/or Panel. I know that I can use them to achieve end, not all cases, but.. there is good russian proverb: "it's like remove tonsils through a...hmmm...back", too much unnecessary work. As I understand setParent() method is package protected because of it is invisible(utility) part of the atomic attach/detach operations. But, attention, I understand It! I do can do the same right things that gwt developers do. I 'll be very careful with parent-child relations in YOUR widget model in MY application. I promise! :) With best regards, Dmitry. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
