ravisangar / smartgwt

Automatically exported from code.google.com/p/smartgwt
0 stars 0 forks source link

Problems with Themes and DynamicForm.setFieldErrors(...) #123

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Fields that are flagged via 'setFieldErrors(...)' seem to always get a blue
background. See attached screenshot (Skin: Enterprise) and Testcase.

--- snip ------------------------------------------

public void onModuleLoad() {

    final DynamicForm form = new DynamicForm();

    TextItem t1 = new TextItem("foo");

    ButtonItem b1 = new ButtonItem("go", "click me");
    b1.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            form.setFieldErrors("foo", "bar", true);
        }
    });

    form.setFields(t1, b1);

    form.draw();
}

--- snap ------------------------------------------

Original issue reported on code.google.com by nikolas....@gmail.com on 17 Feb 2009 at 10:41

Attachments:

GoogleCodeExporter commented 9 years ago
Can you describe what you'd like the desired behavior to be?

Original comment by sanjiv.j...@gmail.com on 17 Feb 2009 at 2:13

GoogleCodeExporter commented 9 years ago
I didn't expect any change to the background color of the flagged FormItems. It 
seems
to me that they are set to a background color (medium blue) matching the
SilverWave-Theme, no matter what Theme you are actually using.

Original comment by nikolas....@gmail.com on 17 Feb 2009 at 4:08

GoogleCodeExporter commented 9 years ago
The backgroundColor is governed by the formCellError / formTitleError set up in
skin_styles.css
You can disable this styling entirely via showErrorStyle 
http://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/widgets/form/Dyn
amicForm.html#getShowErrorStyle()

(Or you can modify it by changing this skinning file in your application)

Original comment by smartgwt...@gmail.com on 21 Feb 2009 at 1:15

GoogleCodeExporter commented 9 years ago
Thanks for the explanation.

Original comment by nikolas....@gmail.com on 21 Feb 2009 at 1:22