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 7839719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:31:48+00:00 2026-06-02T15:31:48+00:00

For my GWT project, I initially constructed a List and a *KEY_PROVIDER* to uniquely

  • 0

For my GWT project,

I initially constructed a List and a *KEY_PROVIDER* to uniquely identify my records in the List. Now instead of List I have connected to the Postgres database and am wondering as to if I need to pass an object of the ProvidesKey to the database OR remove it completely when using a database.

EARLIER–

// Make a provider, connect the List with the provider!
final ListDataProvider<Contact> sortProvider = new ListDataProvider<Contact>(KEY_PROVIDER);
sortProvider.setList(CONTACTS);

NOW–

// Create a data provider.
MyDataProvider sortProvider = new MyDataProvider();
sortProvider.addDataDisplay(table);

I am not sure how it needs to be done now?

Do I need to pass-

MyDataProvider sortProvider = new MyDataProvider(KEY_PROVIDER);

instead?

What should be the best practice? 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-02T15:31:49+00:00Added an answer on June 2, 2026 at 3:31 pm

    Well the ProvidesKey interface is only used on the client side (GWT) to identify your objects. This is important for knowing which object in a list is selected and also for manually selecting another row in your CellTable/CellList.

    If you don’t specify a ProvidesKey implementation the CellWidgets will use the equals function of your DTO’s to check if they are equal or not. You might run into problems if the object itself changes. So it’s always good practice to specify a ProvidesKey implementation and doesn’t depend on whether you use a ListDataProvider, a AsyncDataProvider or a custom data provider.

    BTW what is MyDataProviderin your example? Is it a subclass of AsyncDataProvider?

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

Sidebar

Related Questions

I have gwt-project that is comunication to database. Application design mvp pattern and view
I have a GWT project A and another project B on another computer. Now
I have a gwt project that uses gwt-mosaic. Here is the error message I
I have a GWT project in which I need to manually specify currency, number
I have a Smart GWT Project where the data that is to be displayed
In my project.gwt.xml file I have <script src=http://maps.google.com/maps?gwt=1&amp;file=api&amp;v=2&amp;sensor=false;key=MYKEY /> But, when I load my
My gwt project have flexTable show data of image and button on each row
I created an GWT project in eclipse. Now I tried to implement openId with
I have the following code from a GWT Project that is part of the
I'm working on a GWT project, and I have a bunch of Java classes

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.