File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Help!" Watch "Help!" New topic


Viji Bharat
Ranch Hand

Joined: Sep 18, 2000
Posts: 101
I need some technical advice/help. I have a requirement to display search results in a grid form of display based on a search criteria. I found a similar applet in for used car model search. How it works is this -> Let us assume that someone is looking to buy cars. They enter the car model name, any year model as the search criteria in a form and click on search. Now, the search results are displayed in the form of a grid as given below:
Grid title row --> Year (sliding bar to narrow the range if reqd.) Model # Price etc.
Grid rows-->The values (Year, model#, Price) are listed one below the other.
Could someone give me some guidance on how I go about creating an applet that meets this requirement? What components should I use? What is the best method (applet/servlet) to adopt? I know that this sounds very basic but I need some help in getting started as I am new to Java programming.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Your first decision will be whether to use an applet or plain HTML to present the results. If the user only wants to see the table and does not need to interact with it, why not just use a servlet to do the search and generate a HTML table?
Where do the search results come from?

author of:
Viji Bharat
Ranch Hand

Joined: Sep 18, 2000
Posts: 101
Thanks for your response Bill.
With regards to your qn, yes, some user interaction might be required. Something more than just a HTML page with search results is needed. For eg. when the user gives the initial search request, it could be --> display available car model (all year, all prices). Once the results are displayed in a grid form, they might want to use a sliding bar that is on top of the grid to narrow the year range OR price range. The idea of the applet comes from the applet found in (search used cars) which is neat and interactive. (see link below) /?srv=adlocator&act=index&zc=06053&flt=zr%2Cn_ms%2Cused&tf=/quick_usedforsale-index.tmpl&ct=used&rd=10
The search would be done on a database that has all data pertaining to cars/models/price.
Client side-
(1)A simple form to get the user's search criteria
(2)The search results displayed in a grid with sliding bars on top for narrowing the selection further
Server side
(1) Database search procedure
(2) Populating the grid with the search results and sending it back to the client
(3) Handling user interaction to refine the grid data
Am I approaching the problem right with regards to identifying the client/server tasks?
This being a specific requirement, I am not sure if I should bring it up in a general discussion forum like this. Javaranch moderators, please let me know if I should email any specific individual in this regard.

[This message has been edited by Viji Bharat (edited January 15, 2001).]
I agree. Here's the link:
subject: Help!
It's not a secret anymore!