I've drawn a blank. Does GWT have a widget that produces the HTML P tag?
I want just the P tag to appear in the DOM, without any extraneous DIV's.
I've drawn a blank. Does GWT have a widget that produces the HTML P tag?
I want just the P tag to appear in the DOM, without any extraneous DIV's.
GWT doesn't have such a widget. But you can easily create one. The SimplePanel has a protected constructor which allows it to create a panel with any HTML tag. To create a panel with the P tag, simply extend the SimplePanel and create it with your own constructor:
public class PPanel extends SimplePanel {
public PPanel() {
super((Element) Document.get().createPElement().cast());
}
}