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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:01:30+00:00 2026-05-24T22:01:30+00:00

I am using eclipse with the Google Toolkit and I have created a widget

  • 0

I am using eclipse with the Google Toolkit and I have created a widget with a listbox, vertical split panel and a couple of buttons. What I am trying to do is have a list of files in a local directory listed in the listbox and I want to be able to click on a file and have it displayed in the top part of the split panel. I found out the hard way about browsers and file IO and not being able to use java.io.File.

What are my options? Can I put the data files inside a jar or something and have the widget read it in that way? I need to do this as a test run, to implement an new feature with working with the data. It’s not going to be any kind of final server hosted application, I am not concerned about how the actual files will be loaded in the future.

Any suggestions would be greatly appreciated.

Respectfully,
DemiSheep

  • 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-24T22:01:31+00:00Added an answer on May 24, 2026 at 10:01 pm

    If you just need a hard-coded list of values to visually test your widget, you can simply put these values in a String array and load it from there. Or you can http GET the strings from a server using RequestBuilder. You can keep a simple file (CSV, XML, JSON etc.) in your war directory and load this file using Request builder.

    Example code from GWT developer guide:

    import com.google.gwt.http.client.*;
    ...
    
    String url = "http://www.myserver.com/getData?type=3";
    RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(url));
    
    try {
      Request request = builder.sendRequest(null, new RequestCallback() {
        public void onError(Request request, Throwable exception) {
           // Couldn't connect to server (could be timeout, SOP violation, etc.)
        }
    
        public void onResponseReceived(Request request, Response response) {
          if (200 == response.getStatusCode()) {
              // Process the response in response.getText()
          } else {
            // Handle the error.  Can get the status text from response.getStatusText()
          }
        }
      });
    } catch (RequestException e) {
      // Couldn't connect to server
    }
    

    Make sure you inherit HTTP module:

    <inherits name="com.google.gwt.http.HTTP" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a google-app-engine java project in Eclipse using Google's Eclipse plugin. My
I am using the Google Application Engine plugin for Eclipse 3.4, and I have
I am using Google Web Toolkit's Swing Designer in Eclipse to create and edit
I have developed the Google map application in android using Eclipse and AVD. Is
hey guys,i created a google map based application in android using eclipse..i created an
im trying to install the google GUI builder Window maker pro im using eclipse
I've run through the Google Web Toolkit StockWatcher Tutorial using Eclipse and the Google
I've created Google App Engine project in Java using Eclipse following the book Beginning
I've been using Pydev/Eclipse to develop Google App Engine (GAE) applications but I've been
Im using Eclipse 3.4, EclipseMe 1.7.9. Im trying to deploy/create package a simple project

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.