PDA

View Full Version : FieldLabel - GWT warning



DarekKay
12 Jan 2012, 5:25 AM
Using a FieldLabel causes a GWT warning:

[DEBUG] [gxt_3_0] - Rebinding com.sencha.gxt.theme.base.client.field.FieldLabelDefaultAppearance_FieldLabelTemplate_render_SafeHtml__String_id__Style_style__boolean_isTop__int_labelWidth__int_padding___SafeHtmlTemplates
[DEBUG] [gxt_3_0] - Invoking generator com.google.gwt.safehtml.rebind.SafeHtmlTemplatesGenerator
[TRACE] [gxt_3_0] - Constructing interface com.sencha.gxt.theme.base.client.field.FieldLabelDefaultAppearance_FieldLabelTemplate_render_SafeHtml__String_id__Style_style__boolean_isTop__int_labelWidth__int_padding___SafeHtmlTemplates
[TRACE] [gxt_3_0] - Generating method body for render0()
[WARN] [gxt_3_0] - Template with variable in CSS attribute context: The template code generator cannot guarantee HTML-safety of the template -- please inspect manually or use SafeStyles to specify arguments in a CSS attribute context
[WARN] [gxt_3_0] - Template with variable in CSS attribute context: The template code generator cannot guarantee HTML-safety of the template -- please inspect manually or use SafeStyles to specify arguments in a CSS attribute context

It only appears in the Eclipse GWT "Development Mode" view, but still is quite annoying since I'm using FieldLabels a lot. And here a simple code of course:

public void onModuleLoad()
{

TextField textField = new TextField();
FieldLabel fieldLabel = new FieldLabel(textField, "My textfield");

ContentPanel cp = new ContentPanel();
cp.setPixelSize(400, 200);
cp.add(fieldLabel);

RootLayoutPanel.get().add(cp);
}

Edit: the error message formattig got kinda lost, so here a screenshot:

30650