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

  • SEARCH
  • Home
  • 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 7605879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:16:42+00:00 2026-05-31T00:16:42+00:00

I am just creating a new Proxy: LayoutExampleRequest r = requestFactory.employeeRequest(); DepartmentProxy d =

  • 0

I am just creating a new Proxy:

     LayoutExampleRequest r = requestFactory.employeeRequest();
     DepartmentProxy d  = r.create(DepartmentProxy.class);
     r.save(d);
     departmentEditor.editProxy(d, r);

Then pass the Proxy and the Request(LayoutExampleRequest ) to my editor

      driver.edit(proxy, request);

Until here ! everything works as espected. I can save Department objects with null EmployeeProxy. Now iam getting with a suggest box Proxys of EmployeeProxy from the server.

        search = new SuggestBox(new SuggestOracle() {
        @Override
        public void requestSuggestions(final Request request,final Callback callback) {
            System.out.println(request.getQuery());

            //ignore less than 3
            if(request.getQuery().length() > 3){
                 requestFactory.employeeRequest().search(request.getQuery()).fire(new Receiver<List<EmployeeProxy>>(){
                    @Override
                    public void onSuccess(List<EmployeeProxy> response) {

                        List<MySuggestion<EmployeeProxy>> suggestions = new ArrayList<MySuggestion<EmployeeProxy>>();
                        for(EmployeeProxy e:response){
                            MySuggestion<EmployeeProxy> suggestion = new MySuggestion<EmployeeProxy>();
                            suggestion.setModel(e,e.getFirstName(),e.getFirstName()+" "+e.getLastName());
                            suggestions.add(suggestion);
                        }
                        callback.onSuggestionsReady(request, new Response(suggestions));
                    }
                 });
            }
        }
    });

MySuggestion is a wrapper class to handle the EmployeeProxy.

Now i want to add this EmployeeProxy to my DeparmentProxy since i have a @OneToOne on JPA.

        search.addSelectionHandler(new SelectionHandler<SuggestOracle.Suggestion>() {

        @Override
        public void onSelection(SelectionEvent<Suggestion> event) {             
            MySuggestion<EmployeeProxy> s = (MySuggestion<EmployeeProxy>)event.getSelectedItem();
            proxy.setSupervisor(s.getModel());
        }
    });

proxy is the EntityProxy for Department (I sent to my editor) driver.edit(proxy, request);

then i fire the driver:

              departmentEditor.getDriver().flush().fire(new Receiver<Void>() {
        @Override
        public void onSuccess(Void response) {
            Window.alert("Success");


            // refresh the datagrid
            Range range = dataGrid.getVisibleRange();
            dataGrid.setVisibleRangeAndClearData(range, true); //1st way

                            // create a new DepartmentProxy to bind to the Editor.
            createProxy();

            // change button text
            updateButton.setText("Save");

        }
        @Override
        public void onConstraintViolation(Set<ConstraintViolation<?>> violations) {
            for(ConstraintViolation v :violations){
                Window.alert(v.getMessage()+" "+v.getPropertyPath());
            }

        }

        @Override
        public void onFailure(ServerFailure error) {
            Window.alert(error.getMessage());
        }
    });

The problem is iam getting ConstraintViolations from the EmployeeProxy, is like the driver atach the EmployeeProxy but with null values.
(Iam validating my Entityes with JSR-330 )

Dont know how to make a relationship with a new Proxy with other taked from the server. in a @OneToOne relationship

Any help would be nice!

Thank you

/* UPDATE */
Something like this but with editor

            final LayoutExampleRequest r = requestFactory.employeeRequest();
    final DepartmentProxy d  = r.create(DepartmentProxy.class);

    d.setName("Name");
    d.setService(Service.CONTRACT_MANAGMENT);
    // get some random employee
    requestFactory.employeeRequest().findById(1).fire(new Receiver<EmployeeProxy>() {

        @Override
        public void onSuccess(EmployeeProxy response) {
            d.setSupervisor(response);
            r.save(d).fire(new Receiver<DepartmentProxy>() {

                @Override
                public void onSuccess(DepartmentProxy response) {
                    Window.alert("Kidding me! why editor cant get it work =p?");
                }
            });
        }
    });
  • 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-05-31T00:16:44+00:00Added an answer on May 31, 2026 at 12:16 am

    The problem was i put on my editor properties of the EmployeeProxy so when a user select the employeproxy would see information about it, so i delete them and then do the same and now works.

    Is like GWT when detects properties from another proxy on the editor thinks you will fill it. And the line:

    proxy.setSupervisor(s.getModel());

    doesn’t works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just found myself creating a class called InstructionBuilderFactoryMapFactory. That's 4 pattern suffixes on
Just creating a new iPhone application with CoreData. My application builds without any warnings
I was just creating a new table using MySQL Query Browser, and noticed there's
I am new to winforms. I am just creating a score card application. There
So I just tried creating a new classification type, [Export(typeof(ClassificationTypeDefinition))] [Name(String)] internal static ClassificationTypeDefinition
I'm just creating my own AboutBox and I'm calling it using Window.ShowDialog() How do
One simple method I've used in the past is basically just creating a second
I just started creating my data-access layer using LinqToSql. Everybody is talking about the
I just finished creating my first major application in C#/Silverlight. In the end the
I am just simply creating a web application. I wanted to insert a line

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.