rickilama54 / smartgwt

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

DynamicForm.focusInItem () behavior should be standardized and defined #384

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Call focusInItem () before calling setFields () like this:
1. final DynamicForm form = new DynamicForm ();
2. form.focusInItem (userNameFormItem);
3. form.setFields (userNameFormItem);

What is the expected output?
One of these:
1. For the form item to be focused independent of when focusInItem () is 
called, or
2. Get some kind of exception if the call to DynamicForm.focusInItem () is 
invalid, so 
that I have some way to know what went wrong.

What do you see instead?
Instead I see one of the following:
1. Blank page
2. Page displayed but the field is not in focus
3. DevMode exception (see attached) + a browser error "Plugin failed to connect 
to hosted 
mode server at localhost:9997"

What version of the product are you using? On what operating system?
Smart GWT 2.0
GWT 2.0.0
Windows XP Pro

Please provide any additional information below.
1. With SmartGWT 1.3, this call did not fail. It didn't focus the item, but it 
also did 
not fail, and the UI did paint
2. The documentation for DynamicForm.focusInItem () should also be updated

Original issue reported on code.google.com by shortpa...@gmail.com on 27 Dec 2009 at 8:19

Attachments:

GoogleCodeExporter commented 8 years ago
In general methods like focusInItem should only be called after the widget has 
been drawn. Only init time 
properties should be called before the widget is rendered. ie all setters.

If you need to call focusInItem upfront, then add it to 
Canvas.addDrawHandler(..).

In the future an assert failure might be added if methods like focusInItem are 
called prior to the widget being 
rendered.

Original comment by sanjiv.j...@gmail.com on 1 May 2010 at 6:22