Re: HTML without a DIV
You can enhance any widget or any gwt html portion of your widget using gwtquery: Widget mywidget = new Button(click-me); GQuery.$(mywidget).append(h1hi/h1); RootPanel.get().add(mywidget); Note that gquery is a pure gwt library, it is lightweight and has not external dependencies. - Manolo On Mon, Oct 15, 2012 at 5:19 PM, JeanV jve...@gmail.com wrote: I need to attach pure HTML to a FlowPanel and do not want to the HTML item to be surrounded by div or span - I'm basically using a third-party library that will dynamically look for items (a, img, p and others) within my panel and will break if it encounters a div or span. I've looked around and cannot find a solution. Can this be done. Jean PS: I hate that GWT adds div to everything! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/LFG5__Tnj7sJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
HTML without a DIV
I need to attach pure HTML to a FlowPanel and do not want to the HTML item to be surrounded by div or span - I'm basically using a third-party library that will dynamically look for items (a, img, p and others) within my panel and will break if it encounters a div or span. I've looked around and cannot find a solution. Can this be done. Jean PS: I hate that GWT adds div to everything! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/LFG5__Tnj7sJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: HTML without a DIV
and I cannot use UIBinding as this is a list of multiple items generated dynamically by a for loop. Need to also create h1 without putting it in a div On Monday, October 15, 2012 5:19:07 PM UTC+2, JeanV wrote: I need to attach pure HTML to a FlowPanel and do not want to the HTML item to be surrounded by div or span - I'm basically using a third-party library that will dynamically look for items (a, img, p and others) within my panel and will break if it encounters a div or span. I've looked around and cannot find a solution. Can this be done. Jean PS: I hate that GWT adds div to everything! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/u_e1I2wLTtQJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: HTML without a DIV
One possibility is to replace the FlowPanel with an HTML widget, generate a SafeHtml instance containing your raw HTML, and then call the #setHTML method. You could also build the markup using the DOM API, though that will almost certainly be slower and more verbose. GWT adds wrapper DIV/SPAN elements to widgets because that is the only way to ensure (mostly) consistent behavior in different contexts. It's a necessary trade-off for producing reusable components. And in any case, the fact that your third-party library can't handle intermediate container elements makes it appear rather suspect - a simple call to element.getElementsByTagName would easily handle this case. -Abraham -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/T9IhLDNiPu0J. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.