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> <SmartGWT button widget code> </b>
My first attempt was to do the following.
window.addMember(new HTMLFlow("<"+tagName+">"));
window.addMember(button);
window.addMember(new HTMLFlow("</"+tagName+">"));
SmartGWT, in the case where the tagName is "b", produces
<Some sort of div> <b></b> <div>
<SmartGWT button widget code>
Since then, I also tried overwriting methods and classes, turning everything into HTML then adding one HTMLFlow widget, and some other unsuccessful approaches. I don't want to write the widget code by hand, because that defeats the purpose of using SmartGWT, or GWT for that matter. 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 just directly write "<b>" before and "</b>" after the widget, although I'm not sure if that can be done. Anything ideas?
Thanks!
Tom
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> <SmartGWT button widget code> </b>
My first attempt was to do the following.
window.addMember(new HTMLFlow("<"+tagName+">"));
window.addMember(button);
window.addMember(new HTMLFlow("</"+tagName+">"));
SmartGWT, in the case where the tagName is "b", produces
<Some sort of div> <b></b> <div>
<SmartGWT button widget code>
Since then, I also tried overwriting methods and classes, turning everything into HTML then adding one HTMLFlow widget, and some other unsuccessful approaches. I don't want to write the widget code by hand, because that defeats the purpose of using SmartGWT, or GWT for that matter. 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 just directly write "<b>" before and "</b>" after the widget, although I'm not sure if that can be done. Anything ideas?
Thanks!
Tom
Comment