hi, so what you want is actually NOT that user-written XML directly is injected into the DOM, rather you're about to create an own UiBinder? So, if someone writes the code
<b><lab:button name="Run Me" evaluate="MyEvaluator"/></b> you want to map the <lab:button/> element to the GWT-Button widget, right? - start using UiBinder :-) if you want to handle it absolutely dynamically, so - <lab:button/> would really cause a DOM.addWidget(new Button()) then you have to extend all of GWT widgets you want to support and override the getElement() method - this would be the DOM element the widget appends its own code to. So you can control it then On 23 Jul., 00:16, Thomas Dvornik <[email protected]> wrote: > Hello, > > I'm creating an application that parses XML. After parsing, the > corresponding widgets gets created and added to the page. To provide > more customization, a user can include XHTML tags for formatting. > These tags should go directly to the page in the spot they were > specified. For example, lets say I have a "button" tag and the user > writes: > > <b> <lab:button name="Run Me" evaluate="MyEvaluator"> </b> > > the HTML should look something like > > <b> <GWT button widget code> </b> > > My first attempt was to do the following. > > dBox.add(new HTML("<"+tagName+">")); > dBox.add(button); > dBox.add(new HTML("</"+tagName+">")); > > GWT, in the case where the tagName is "b", produces > > <div class="GWT-html"> <b></b> <div> > <GWT button widget code> > > Since then, I also tried overwriting methods and classes, turning > everything into HTML then adding one HTML widget, and some other > unsuccessful approaches. I don't want to write the GWT button code by > hand, because that defeats the purpose of using GWT. Plus I am using a > lot more widgets then just buttons. > > Does anyone know a solution to this problem or can get me pointed in > the right direction. It seems the simplest solution is to stop GWT > from creating the additional div tag. Ideally, the solution would also > work for SmartGWT, although I'll take anything at this point. > > Thanks! > > Tom -- 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.
