Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8751491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:03:27+00:00 2026-06-13T13:03:27+00:00

Does anybody have a solution to why I would be saving nulls to a

  • 0

Does anybody have a solution to why I would be saving nulls to a OneToMany List on a server entity through a GXT Grid that contains a ListStoreEditor sub-editor?

I’ve followed the Sencha Example, GridBindingExample to a tee.
http://www.sencha.com/examples/#ExamplePlace:gridbinding

public class MyEditor implements IsWidget, Editor<FooProxy> {
    interface Binder extends UiBinder<Widget, MyEditor> {}
    private static Binder uiBinder = GWT.create(Binder.class);

    public interface Driver extends SimpleBeanEditorDriver<MyProxy, MyEditor> {}    
    private Driver driver = GWT.create(Driver.class);

    private ListStore<BarProxy> store;
    ListStoreEditor<BarProxy> items;

    @Ignore
    @UiField(provided = true)
    Grid<BarProxy> grid;

    @Ignore
    @UiField
    ChildEditor childEditor;

    @Override
    public Widget asWidget() {
        MyProperties props = GWT.create(MyProperties.class);
        this.store = new ListStore<BarProxy>(props.key());

        List<ColumnConfig<BarProxy, ?>> columns = new ArrayList<ColumnConfig<BarProxy, ?>>();
        columns.add(new ColumnConfig<BarProxy, String>(props.itemName(), 300, "MyColumn"));

        this.grid = new Grid<BarProxy>(store,new ColumnModel<BarProxy>(columns));
        items = new ListStoreEditor<BarProxy>(store);

        Widget widget = uiBinder.createAndBindUi(this);
        driver.initialize(childEditor);

        childEditor.getCreateButton().addSelectHandler(new SelectHandler() {
            @Override
            public void onSelect(SelectEvent event) {
                RequestContext context = factoryProvider.get().barRequest();
                BarProxy entity = context.create(BarProxy.class);

                entity.setName("Eugene Qtest");
                entity.setAge(45);

                driver.edit(entity);
                store.add(driver.flush());  
            }       
        });

        return widget;  
    }
}

public class ChildEditor implements IsWidget, Editor<BarProxy> {
    interface Binder extends UiBinder<Widget, ChildEditor> {}
    private static Binder uiBinder = GWT.create(Binder.class);

    @UiField
    TextButton createButton;

    @Override
    public Widget asWidget() {
        return uiBinder.createAndBindUi(this);
    }

    public TextButton getCreateButton() {
        return createButton;
    }
}

On an upper level presenter in my code, I am calling:

RequestContext req = editorPresenter.getDriver().flush();
req.fire();

This does save all data elements that the GWT Editor captures. In my database it does create the row for the grid in the above code, but all the values are null, so when the RequestContext fires, the persist brings back an empty row within the grid. So there is no foreign key to associate the entity in the OneToMany relationship back to its parent entity.

Also, I’ve looked at the JSON request and response to the server and it doesn’t look like any of the values are being sent in the entity. It may be obfuscated, but it looks as though the other values are in plain text, so I don’t think the proxy entity values are even being passed.

Any help would be great! Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:03:28+00:00Added an answer on June 13, 2026 at 1:03 pm

    This took me days to figure out, with the help of Colin in the above comments, Thanks!

    The reason the grid was populating, but when you flushed the main editor on save, the values disappeared and a blank row was inserted into the grid, was because you have to implement the HasRequestContext interface on the editor to maintain the same RequestContext session. Below is my amended code.

    public class MyEditor implements IsWidget, Editor<FooProxy>, HasRequestContext<FooProxy> {
        interface Binder extends UiBinder<Widget, MyEditor> {}
        private static Binder uiBinder = GWT.create(Binder.class);
    
        private RequestContext ctx;    
    
        private ListStore<BarProxy> store;
        ListStoreEditor<BarProxy> items;
    
        @Ignore
        @UiField(provided = true)
        Grid<BarProxy> grid;
    
        @Ignore
        @UiField
        ChildEditor childEditor;
    
        @Override
        public Widget asWidget() {
            MyProperties props = GWT.create(MyProperties.class);
            this.store = new ListStore<BarProxy>(props.key());
    
            List<ColumnConfig<BarProxy, ?>> columns = new ArrayList<ColumnConfig<BarProxy, ?>>();
            columns.add(new ColumnConfig<BarProxy, String>(props.itemName(), 300, "MyColumn"));
    
            this.grid = new Grid<BarProxy>(store,new ColumnModel<BarProxy>(columns));
            items = new ListStoreEditor<BarProxy>(store);
    
            Widget widget = uiBinder.createAndBindUi(this);
            driver.initialize(childEditor);
    
            childEditor.getCreateButton().addSelectHandler(new SelectHandler() {
                @Override
                public void onSelect(SelectEvent event) {
                    RequestContext context = ctx.barRequest();
                    BarProxy entity = context.create(BarProxy.class);
    
                    entity.setName("Eugene Qtest");
                    entity.setAge(45);
    
                    ctx.edit(entity);
                    store.add(entity);  
                }       
            });
    
            return widget;  
        }
    
        @Override
        public void setRequestContext(RequestContext ctx) {
            this.ctx = ctx;     
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anybody have a good analogy (or, failing that, a good resource) for describing
Does anybody know of a good solution that can be used from php that
Does anybody have experience build app with PhoneGap's Build Service? I followed the steps
Does anybody have any experience with as3-spod? I downloaded the source code from github
does anybody have any experience writing up a offline data storage & access app
does anybody have any idea what's does this mean: onLoad=MyOnLoad? thanks
Does anybody have any advice on working in a Date Driven Development environment? Essentially,
Does anybody have experience programming for both the Intel Math Kernel Library and the
Does anybody have any experience/ knowledge in installing the aspImage.dll on a 64-bit Windows
Does anybody have any experience with TFS no longer letting somebody queue a new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.