View Full Version : Grid Loader Question

7 Dec 2009, 11:03 AM
If I have a web app that will allow the browsing of an automobile database, I am wondering how to best write the listener code.

Visual layout of the page:
I have three lists on the left side of the page consisting of "Make", "Model", and "Year", and then I have a Grid that takes up the rest of the page that will display automobiles depending on what the user selects from the lists on the left.

When I click on an item in "Make", it will modify the contents of the "Model" and "Year" lists to match all data that corresponds to that particular make, and it will display everything of that make of automobile in the automobile grid. If I click on an item in the "Model" list, it will modify the "Year" data, and display all automobiles of that make and model in the automobile grid. Clicking on a year will then further refine the automobile table to show every automobile for that make, model, and year.

The Problem:
I'm using RpcProxy to load BeanModel data into a ListStore for the grid that displays automobile data. Inside the proxy, I make a call to my service. The problem is, I have methods in my service to getByMake(), getByModel(), and getByYear(). I don't know how to use a click listener for each of the three lists (Make, Model, and Year) so that I can have the loader call the proper query and load the proper data, depending on what has been clicked. Does anyone have any suggestions? What's giving me the biggest problem is three controls can make calls to change the data of the same grid.

Thanks in advance for any help. I really appreciate it!