zorba-the-geek / smartgwt

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

DynamicForm doesn't allow to wrap existing JavaScript object #87

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
- What is the problem?
It seems as for DynamicForm class in SmartGWT 1.0b1 it is impossible to
create object wraps existing JavaScript component - "fields" Java class
member is changed only by "setFields" Java class method call and
"getField"/"getFields" methods don't access underlaying JavaScript object
at all, use that "fields" member only.

- What version of the product are you using? On what operating system?
SmartGWT 1.0b1

Original issue reported on code.google.com by durinda....@gmail.com on 19 Jan 2009 at 12:48

GoogleCodeExporter commented 9 years ago
I still don't follow what the problem is? Can you describe what you're trying to
accomplish?

Original comment by sanjiv.j...@gmail.com on 20 Jan 2009 at 12:41

GoogleCodeExporter commented 9 years ago
As example I would expose ListGrid.getEditForm and call in JSNI code DynamicForm
constructor with JavaScriptObject as parameter:
---------------------------
    private static native DynamicForm getListGridEditForm(
            ListGrid grid) /*-{
        var _grid = grid.@com.smartgwt.client.widgets.grid.ListGrid::getJsObj()();
        var editForm = _grid.getEditForm();
        return
@com.smartgwt.client.widgets.form.DynamicForm::new(Lcom/google/gwt/core/client/J
avaScriptObject;)(editForm);
    }-*/;
---------------------------
The result is DynamicForm object with "fields" private member set to null.
DynamicForm.getFields returns null, DynamicForm.getField always returns null - 
no way
to use this object from Java code.

Original comment by durinda....@gmail.com on 20 Jan 2009 at 11:15

GoogleCodeExporter commented 9 years ago
Please try this against 1.0b2 or the latest build.

Original comment by sanjiv.j...@gmail.com on 24 Mar 2009 at 9:36

GoogleCodeExporter commented 9 years ago
Closing. If you're still having issues, add a note with details.

Original comment by sanjiv.j...@gmail.com on 26 Mar 2009 at 4:49

GoogleCodeExporter commented 9 years ago
I created #180 to reflect further changes required to make it useful

Original comment by durinda....@gmail.com on 30 Mar 2009 at 8:21