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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:45:51+00:00 2026-05-12T00:45:51+00:00

I was trying all of yesterday to try and integrate a SQL Database with

  • 0

I was trying all of yesterday to try and integrate a SQL Database with SmartGWT for a lazy list but I just couldn’t figure out how to implement it. (JavaDoc, and example of a lazy list)

What I want to do is create a list of a bunch of “sites” all over the world. The problem is there will probably be about a million of them, so I’m trying to load as few as possible at a time. Each site in my DB has an address, so I’m trying to sort them in the tree structure like (Country->State->City->Sites). Every time you go down a level there will be a query to the DB asking for all of the next level (Whether that be all the cities that have sites in the state chosen, or what ever).

Any help is greatly appreciated.

ALSO:
In the example linked the folders and leafs are the type of element, is there a way to keep folders, folders, and then leafs a separate type of object?

  • 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-12T00:45:52+00:00Added an answer on May 12, 2026 at 12:45 am

    After a while I finally got it. I ended up creating my own RPC that would serve up an array of strings that would represent the names of all the TreeNodes for the next level.

    So entry point would be:

    private NodeServiceAsync nodesRpc; //The RPC that grabs more nodes
    private Tree data; //The data structure to hold all of the nodes
    private ColumnTree list; //The GUI element that is shown on in the browser
    public void onModuleLoad() {
        nodesRpc = (NodeServiceAsync) GWT.create(NodeService.class);
        data = new Tree();
        list = new ColumnTree;
    
        list.setAutoFetchData(true);
        list.setLoadDataOnDemand(true);
    
        list.addNodeSelectedHandler(new NodeSelectedHandler () {
            public void onNodeSelected(NodeSelectedEvent event) {
                if(/*Node is folder and hasn't been opened before*/) {
                    //Get More Nodes        
                    AsyncCallback<String[]> callback = new NodeGetter<String[]>();
                    nodesRpc.getData(event.getNode(), callback);
                }
    
                else if(/*Node is not a folder (at the end) */) {
                    //Do something else
                }   
            }
        });
        list.setData(data); //Make the GUI Element Represent The Data Structure
        RootPanel.get().add(list); //Add to screen
    }
    

    The serverlet on the server side creates the query, executes, then translates the ResultSet into an array of Strings and passes that back. All the callback has to do, back on the client side, is translate that array into an array of TreeNodes and attach them to the original Node that was clicked on. Finally after all of this the GUI element is redrawn with the new nodes.

    I was surprised that there was very little down time between node loads (less then 1 sec) even when sometimes a hundred or so nodes where being queried then displayed.

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

Sidebar

Ask A Question

Stats

  • Questions 258k
  • Answers 258k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Interesting question. As mentioned by Domonic Roger, if its working… May 13, 2026 at 11:04 am
  • Editorial Team
    Editorial Team added an answer It only matters if you use an expression instead of… May 13, 2026 at 11:04 am
  • Editorial Team
    Editorial Team added an answer alt text http://img64.imageshack.us/img64/2280/screenshot20100106at125.png This uses TextMate's mate command line helper… May 13, 2026 at 11:04 am

Related Questions

I've just started learning how to use pygame yesterday. I was read this one
Yesterday, I asked this question and never really got an answer I was really
I've just built a crap load of Telerik reports for my web site project,
( This question about refactoring F# code got me one down vote, but also

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.